diff options
author | Tim Northover <Tim.Northover@arm.com> | 2013-02-18 12:11:32 +0000 |
---|---|---|
committer | Tim Northover <Tim.Northover@arm.com> | 2013-02-18 12:11:32 +0000 |
commit | 847d2d454944bc56fccb8fbd344e91b6ec678a22 (patch) | |
tree | 13f493ff98d01c4ff3e3bc11df2513831629d99f /clang/test | |
parent | eaf706bef3fba21f522e3c51f6e5f4ae224f1924 (diff) | |
download | bcm5719-llvm-847d2d454944bc56fccb8fbd344e91b6ec678a22.tar.gz bcm5719-llvm-847d2d454944bc56fccb8fbd344e91b6ec678a22.zip |
AArch64: add atomic support parameters to TargetInfo
This allows Clang to detect and deal wih __atomic_* operations properly on
AArch64. Previously we produced an error when encountering them at high
optimisation levels.
llvm-svn: 175438
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Sema/atomic-ops.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/Sema/atomic-ops.c b/clang/test/Sema/atomic-ops.c index 2a935918ac0..a33ff2b19c0 100644 --- a/clang/test/Sema/atomic-ops.c +++ b/clang/test/Sema/atomic-ops.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 %s -verify -fsyntax-only -triple=i686-linux-gnu -std=c11 +// RUN: %clang_cc1 %s -verify -fsyntax-only -triple=aarch64-linux-gnu -std=c11 // Basic parsing/Sema tests for __c11_atomic_* @@ -17,7 +18,11 @@ _Static_assert(__GCC_ATOMIC_WCHAR_T_LOCK_FREE == 2, ""); _Static_assert(__GCC_ATOMIC_SHORT_LOCK_FREE == 2, ""); _Static_assert(__GCC_ATOMIC_INT_LOCK_FREE == 2, ""); _Static_assert(__GCC_ATOMIC_LONG_LOCK_FREE == 2, ""); +#ifdef __i386__ _Static_assert(__GCC_ATOMIC_LLONG_LOCK_FREE == 1, ""); +#else +_Static_assert(__GCC_ATOMIC_LLONG_LOCK_FREE == 2, ""); +#endif _Static_assert(__GCC_ATOMIC_POINTER_LOCK_FREE == 2, ""); _Static_assert(__c11_atomic_is_lock_free(1), ""); |