[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Driver / mipsel-nacl-defines.cpp
blob0f63d7659e518f73f43aa3a2d9a0e1e3610bc27c
1 // RUN: %clang -target mipsel-unknown-nacl -### %s -emit-llvm-only -c -o %t.o 2>&1 | FileCheck %s -check-prefix=ECHO
2 // RUN: %clang -target mipsel-unknown-nacl %s -emit-llvm -S -c -o - | FileCheck %s
3 // RUN: %clang -target mipsel-unknown-nacl %s -emit-llvm -S -c -pthread -o - | FileCheck %s -check-prefix=THREADS
5 // ECHO: {{.*}} "-cc1" {{.*}}mipsel-nacl-defines.c
7 // Check platform defines
9 // CHECK: _MIPSELdefined
10 #ifdef _MIPSEL
11 void _MIPSELdefined() {}
12 #endif
14 // CHECK: _mipsdefined
15 #ifdef _mips
16 void _mipsdefined() {}
17 #endif
19 // CHECK: __native_client__defined
20 #ifdef __native_client__
21 void __native_client__defined() {}
22 #endif
24 // CHECK: unixdefined
25 #ifdef unix
26 void unixdefined() {}
27 #endif
29 // CHECK: __ELF__defined
30 #ifdef __ELF__
31 void __ELF__defined() {}
32 #endif
34 // CHECK: _GNU_SOURCEdefined
35 #ifdef _GNU_SOURCE
36 void _GNU_SOURCEdefined() {}
37 #endif
39 // THREADS: _REENTRANTdefined
40 // CHECK: _REENTRANTundefined
41 #ifdef _REENTRANT
42 void _REENTRANTdefined() {}
43 #else
44 void _REENTRANTundefined() {}
45 #endif