summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/predefined-arch-macros.c
diff options
context:
space:
mode:
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>2015-05-14 20:02:24 +0000
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>2015-05-14 20:02:24 +0000
commite97e111af467d4c2ed56158a624bdc8b455d2273 (patch)
treef48f589671aef63c4bcae6362f4fb8bfde919153 /clang/test/Preprocessor/predefined-arch-macros.c
parent3e96fc08dabe5bb8f9dc888cd4e52a5e6f611102 (diff)
downloadbcm5719-llvm-e97e111af467d4c2ed56158a624bdc8b455d2273.tar.gz
bcm5719-llvm-e97e111af467d4c2ed56158a624bdc8b455d2273.zip
Testing for the fix for bug 23429.
Follow-up to commit for revision 236848. Just a test case for the macro definition under the right CPU/Arch. One combination was actually missed in the initial fix: - powerpc64-unknown-unknown -mcpu=pwr8 (rather than -mcpu=power8). llvm-svn: 237386
Diffstat (limited to 'clang/test/Preprocessor/predefined-arch-macros.c')
-rw-r--r--clang/test/Preprocessor/predefined-arch-macros.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/predefined-arch-macros.c b/clang/test/Preprocessor/predefined-arch-macros.c
index 5116a56489b..5126ef3d94c 100644
--- a/clang/test/Preprocessor/predefined-arch-macros.c
+++ b/clang/test/Preprocessor/predefined-arch-macros.c
@@ -1675,6 +1675,19 @@
//
// CHECK_PPC_CRYPTO_M64: #define __CRYPTO__
//
+// RUN: %clang -mcpu=pwr8 -E -dM %s -o - 2>&1 \
+// RUN: -target powerpc64-unknown-unknown \
+// RUN: | FileCheck %s -check-prefix=CHECK_PPC_GCC_ATOMICS
+// RUN: %clang -E -dM %s -o - 2>&1 \
+// RUN: -target powerpc64le-unknown-linux \
+// RUN: | FileCheck %s -check-prefix=CHECK_PPC_GCC_ATOMICS
+//
+// CHECK_PPC_GCC_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1
+// CHECK_PPC_GCC_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2
+// CHECK_PPC_GCC_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
+// CHECK_PPC_GCC_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8
+//
+// End PPC/GCC/Linux tests ------------------
// Begin Sparc/GCC/Linux tests ----------------
//
OpenPOWER on IntegriCloud