diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2017-04-27 01:47:22 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2017-04-27 01:47:22 +0000 |
commit | 6b7fb45df342132973cf828b5802da7cc50838c6 (patch) | |
tree | ec1291d0c7a730b500cc7cb0b2ba414bc67fad83 /test/Preprocessor | |
parent | 59456511f4bab95ccd3c918dae256f5ec0f8fb39 (diff) |
Darwin: Define __STDC_NO_THREADS__ on Darwin targets
Darwin doesn't support C11 threads.h. Define `__STDC_NO_THREADS__` so
that users can check for it.
rdar://problem/18461003
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301508 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor')
-rw-r--r-- | test/Preprocessor/init.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Preprocessor/init.c b/test/Preprocessor/init.c index 5fb2011cd0..36ef9b2136 100644 --- a/test/Preprocessor/init.c +++ b/test/Preprocessor/init.c @@ -9690,3 +9690,12 @@ // MSVC-X64-NEXT:#define __CLANG_ATOMIC_SHORT_LOCK_FREE 2 // MSVC-X64-NEXT:#define __CLANG_ATOMIC_WCHAR_T_LOCK_FREE 2 // MSVC-X86-NOT:#define __GCC_ATOMIC{{.*}} + +// RUN: %clang_cc1 -E -dM -ffreestanding \ +// RUN: -triple=aarch64-apple-ios9 < /dev/null \ +// RUN: | FileCheck -check-prefix=DARWIN %s +// RUN: %clang_cc1 -E -dM -ffreestanding \ +// RUN: -triple=aarch64-apple-macosx10.12 < /dev/null \ +// RUN: | FileCheck -check-prefix=DARWIN %s + +// DARWIN:#define __STDC_NO_THREADS__ 1 |