r238614 - ARM: fix ACLE predefine for iOS's "-arch armv7s".

Tim Northover tnorthover at apple.com
Fri May 29 14:28:26 PDT 2015


Author: tnorthover
Date: Fri May 29 16:28:25 2015
New Revision: 238614

URL: http://llvm.org/viewvc/llvm-project?rev=238614&view=rev
Log:
ARM: fix ACLE predefine for iOS's "-arch armv7s".

We were getting "#define __ARM_ARCH_7 -S__ 1" which is really not a good idea.

Modified:
    cfe/trunk/lib/Basic/Targets.cpp
    cfe/trunk/test/Preprocessor/arm-target-features.c

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=238614&r1=238613&r2=238614&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Fri May 29 16:28:25 2015
@@ -4322,6 +4322,7 @@ public:
       return "6M";
     case llvm::ARM::AK_ARMV7:
     case llvm::ARM::AK_ARMV7A:
+    case llvm::ARM::AK_ARMV7S:
       return "7A";
     case llvm::ARM::AK_ARMV7R:
       return "7R";

Modified: cfe/trunk/test/Preprocessor/arm-target-features.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/arm-target-features.c?rev=238614&r1=238613&r2=238614&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/arm-target-features.c (original)
+++ cfe/trunk/test/Preprocessor/arm-target-features.c Fri May 29 16:28:25 2015
@@ -7,6 +7,7 @@
 // CHECK: __ARM_FEATURE_NUMERIC_MAXMIN 1
 
 // RUN: %clang -target armv7a-none-linux-gnu -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-V7 %s
+// RUN: %clang -target x86_64-apple-macosx10.10 -arch armv7s -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-V7 %s
 // CHECK-V7: __ARMEL__ 1
 // CHECK-V7: __ARM_ARCH 7
 // CHECK-V7: __ARM_ARCH_7A__ 1





More information about the cfe-commits mailing list