1 // RUN: %clang --target=x86_64-unknown-nacl -### %s -c -o %t.o 2>&1 | FileCheck %s -check-prefix=ECHO
2 // RUN: %clang -target x86_64-unknown-nacl %s -emit-llvm -S -c -o - | FileCheck %s
3 // RUN: %clang -target x86_64-unknown-nacl %s -emit-llvm -S -c -pthread -o - | FileCheck %s -check-prefix=THREADS
5 // ECHO: {{.*}} "-cc1" {{.*}}x86_64-nacl-defines.c
7 // Check platform defines
9 // CHECK: __LITTLE_ENDIAN__defined
10 #ifdef __LITTLE_ENDIAN__
11 void __LITTLE_ENDIAN__defined() {}
14 // CHECK: __native_client__defined
15 #ifdef __native_client__
16 void __native_client__defined() {}
19 // CHECK: __x86_64__defined
21 void __x86_64__defined() {}
29 // CHECK: __ELF__defined
31 void __ELF__defined() {}
34 // CHECK: _GNU_SOURCEdefined
36 void _GNU_SOURCEdefined() {}
39 // THREADS: _REENTRANTdefined
40 // CHECK: _REENTRANTundefined
42 void _REENTRANTdefined() {}
44 void _REENTRANTundefined() {}