diff options
author | Chris Bieneman <beanz@apple.com> | 2015-09-22 21:50:43 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2015-09-22 21:50:43 +0000 |
commit | 7908b129677f3c328cf9f52836c2742cedd77a65 (patch) | |
tree | 923c137f9d3b8637984bdfeb8212d14a8fd2483d /compiler-rt/lib/builtins/atomic_flag_test_and_set_explicit.c | |
parent | 8bb31dd08a1e9f747592b9216240224063f59b8d (diff) | |
download | bcm5719-llvm-7908b129677f3c328cf9f52836c2742cedd77a65.tar.gz bcm5719-llvm-7908b129677f3c328cf9f52836c2742cedd77a65.zip |
[builtins] Fixing atomic builtins to be compiled out if stdatomic.h isn't available.
This should fix the bots broken by r248322.
Reviewed by bogner over my shoulder.
llvm-svn: 248328
Diffstat (limited to 'compiler-rt/lib/builtins/atomic_flag_test_and_set_explicit.c')
-rw-r--r-- | compiler-rt/lib/builtins/atomic_flag_test_and_set_explicit.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/lib/builtins/atomic_flag_test_and_set_explicit.c b/compiler-rt/lib/builtins/atomic_flag_test_and_set_explicit.c index eaa5be08df4..cfc28cbdef3 100644 --- a/compiler-rt/lib/builtins/atomic_flag_test_and_set_explicit.c +++ b/compiler-rt/lib/builtins/atomic_flag_test_and_set_explicit.c @@ -12,9 +12,13 @@ *===------------------------------------------------------------------------=== */ +#if __has_include(<stdatomic.h>) + #include <stdatomic.h> #undef atomic_flag_test_and_set_explicit _Bool atomic_flag_test_and_set_explicit(volatile atomic_flag *object, memory_order order) { return __c11_atomic_exchange(&(object)->_Value, 1, order); } + +#endif |