blob: 20f41821a12f3a1c958a11ff0c7d02b038d84e03 [file] [log] [blame]
Chris Lattner72e1c6c2008-04-13 19:54:28 +00001// RUN: clang -emit-llvm < %s 2>&1 | grep '@foo.*global.*addrspace(1)'
2// RUN: clang -emit-llvm < %s 2>&1 | grep '@ban.*global.*addrspace(1)'
3// RUN: clang -emit-llvm < %s 2>&1 | grep 'load.*addrspace(1)' | count 2
Christopher Lambebb97e92008-02-04 02:31:56 +00004int foo __attribute__((address_space(1)));
5int ban[10] __attribute__((address_space(1)));
6
7int bar() { return foo; }
8
Christopher Lambb41a7d22008-02-04 02:35:11 +00009int baz(int i) { return ban[i]; }