diff options
author | Jim Grosbach <grosbach@apple.com> | 2014-06-26 17:24:16 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2014-06-26 17:24:16 +0000 |
commit | c8d94b6e324b3d381db666f94a0f3b14d0cc519a (patch) | |
tree | 37669c43be33c9feca5afe0277904bb86e23fa82 /test | |
parent | a9bcfc16cf2056dcc3d29de387bf6ace4587621b (diff) | |
download | clang-c8d94b6e324b3d381db666f94a0f3b14d0cc519a.tar.gz clang-c8d94b6e324b3d381db666f94a0f3b14d0cc519a.tar.bz2 clang-c8d94b6e324b3d381db666f94a0f3b14d0cc519a.tar.xz |
ARM: Correctly identify cortex-m4 as v7em.
Get the predefined macro for the architecture correct.
cortex-m4: __ARM_ARCH_7EM__
cortex-m3: __ARM_ARCH_7M__
cortex-m0: __ARM_ARCH_6M__
rdar://17420090
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211792 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Preprocessor/macho-embedded-predefines.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/test/Preprocessor/macho-embedded-predefines.c b/test/Preprocessor/macho-embedded-predefines.c index 8356bc9924..74f2919921 100644 --- a/test/Preprocessor/macho-embedded-predefines.c +++ b/test/Preprocessor/macho-embedded-predefines.c @@ -1,5 +1,20 @@ -// RUN: %clang_cc1 -E -dM -triple thumbv7m-apple-unknown-macho %s | FileCheck %s +// RUN: %clang_cc1 -E -dM -triple thumbv7m-apple-unknown-macho -target-cpu cortex-m3 %s | FileCheck %s -check-prefix CHECK-7M -// CHECK: #define __APPLE_CC__ -// CHECK: #define __APPLE__ -// CHECK-NOT: #define __MACH__ +// CHECK-7M: #define __APPLE_CC__ +// CHECK-7M: #define __APPLE__ +// CHECK-7M: #define __ARM_ARCH_7M__ +// CHECK-7M-NOT: #define __MACH__ + +// RUN: %clang_cc1 -E -dM -triple thumbv7em-apple-unknown-macho -target-cpu cortex-m4 %s | FileCheck %s -check-prefix CHECK-7EM + +// CHECK-7EM: #define __APPLE_CC__ +// CHECK-7EM: #define __APPLE__ +// CHECK-7EM: #define __ARM_ARCH_7EM__ +// CHECK-7EM-NOT: #define __MACH__ + +// RUN: %clang_cc1 -E -dM -triple thumbv6m-apple-unknown-macho -target-cpu cortex-m0 %s | FileCheck %s -check-prefix CHECK-6M + +// CHECK-6M: #define __APPLE_CC__ +// CHECK-6M: #define __APPLE__ +// CHECK-6M: #define __ARM_ARCH_6M__ +// CHECK-6M-NOT: #define __MACH__ |