aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/compiler-rt/lib
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-06-01 18:29:15 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-06-01 18:29:15 +0000
commitcfefd16d5721f5bb89506df7d2bb9e18f60b034a (patch)
treea5df15daad99bb92161c5c2b5063887973996cbd /contrib/llvm-project/compiler-rt/lib
parent034667f9fa16be785b53c1367c08c51d56d07e0f (diff)
Diffstat (limited to 'contrib/llvm-project/compiler-rt/lib')
-rw-r--r--contrib/llvm-project/compiler-rt/lib/builtins/atomic.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c b/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
index 4c3ebb99a513..8dc2f4fc013a 100644
--- a/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
+++ b/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
@@ -363,6 +363,9 @@ OPTIMISED_CASES
#define OPTIMISED_CASE(n, lockfree, type) ATOMIC_RMW(n, lockfree, type, xor, ^)
OPTIMISED_CASES
#undef OPTIMISED_CASE
+// Allow build with clang without __c11_atomic_fetch_nand builtin (pre-14)
+#if __has_builtin(__c11_atomic_fetch_nand)
#define OPTIMISED_CASE(n, lockfree, type) ATOMIC_RMW_NAND(n, lockfree, type)
OPTIMISED_CASES
#undef OPTIMISED_CASE
+#endif