diff options
author | Hal Finkel <hfinkel@anl.gov> | 2015-10-01 13:39:49 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2015-10-01 13:39:49 +0000 |
commit | a57b890a33b441764939fddace186581e41c46b7 (patch) | |
tree | f3b7783c24891a413acd88361ad46affc2c06938 /clang/test/Preprocessor/predefined-arch-macros.c | |
parent | 0b15e7c61829c781aced15a95bfdf927d25e4f5d (diff) | |
download | bcm5719-llvm-a57b890a33b441764939fddace186581e41c46b7.tar.gz bcm5719-llvm-a57b890a33b441764939fddace186581e41c46b7.zip |
[PowerPC] Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_* macros on all PPC cores
We support all __sync_val_compare_and_swap_* builtins (only 64-bit on 64-bit
targets) on all cores, and should define the corresponding
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_* macros, just as GCC does. As it turns out,
this is really important because they're needed to prevent a bad ODR violation
with libstdc++'s std::shared_ptr (this is well explained in PR12730).
We were doing this only for P8, but this is necessary on all PPC systems.
llvm-svn: 249009
Diffstat (limited to 'clang/test/Preprocessor/predefined-arch-macros.c')
-rw-r--r-- | clang/test/Preprocessor/predefined-arch-macros.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/predefined-arch-macros.c b/clang/test/Preprocessor/predefined-arch-macros.c index 14fc49478af..4a88ff9fca2 100644 --- a/clang/test/Preprocessor/predefined-arch-macros.c +++ b/clang/test/Preprocessor/predefined-arch-macros.c @@ -1675,6 +1675,9 @@ // // CHECK_PPC_CRYPTO_M64: #define __CRYPTO__ // +// RUN: %clang -mcpu=ppc64 -E -dM %s -o - 2>&1 \ +// RUN: -target powerpc64-unknown-unknown \ +// RUN: | FileCheck %s -check-prefix=CHECK_PPC_GCC_ATOMICS // RUN: %clang -mcpu=pwr8 -E -dM %s -o - 2>&1 \ // RUN: -target powerpc64-unknown-unknown \ // RUN: | FileCheck %s -check-prefix=CHECK_PPC_GCC_ATOMICS |