Add include needed for MSVC.
[clang/acc.git] / test / CodeGen / address-space.c
blob3b6a8e654167ff6a8f6a446ce2bca4b29318ad32
1 // RUN: clang-cc -emit-llvm < %s | grep '@foo.*global.*addrspace(1)' &&
2 // RUN: clang-cc -emit-llvm < %s | grep '@ban.*global.*addrspace(1)' &&
3 // RUN: clang-cc -emit-llvm < %s | grep 'load.*addrspace(1)' | count 2 &&
4 // RUN: clang-cc -emit-llvm < %s | grep 'load.*addrspace(2).. @A' &&
5 // RUN: clang-cc -emit-llvm < %s | grep 'load.*addrspace(2).. @B'
7 int foo __attribute__((address_space(1)));
8 int ban[10] __attribute__((address_space(1)));
10 int bar() { return foo; }
12 int baz(int i) { return ban[i]; }
14 // Both A and B point into addrspace(2).
15 __attribute__((address_space(2))) int *A, *B;
17 void test3() {
18 *A = *B;