Avoid duplicate entry for cortex-a7 in the TargetParser (NFC)
authorArtyom Skrobov <Artyom.Skrobov@arm.com>
Fri, 20 Nov 2015 16:46:14 +0000 (16:46 +0000)
committerArtyom Skrobov <Artyom.Skrobov@arm.com>
Fri, 20 Nov 2015 16:46:14 +0000 (16:46 +0000)
Reviewers: t.p.northover, rengolin

Subscribers: aemerson, rengolin, llvm-commits

Differential Revision: http://reviews.llvm.org/D14757

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253676 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/ARMTargetParser.def
lib/Support/Triple.cpp

index 3edc34c..f76ac88 100644 (file)
@@ -213,7 +213,6 @@ ARM_CPU_NAME("iwmmxt", AK_IWMMXT, FK_NONE, true, AEK_NONE)
 ARM_CPU_NAME("xscale", AK_XSCALE, FK_NONE, true, AEK_NONE)
 ARM_CPU_NAME("swift", AK_ARMV7S, FK_NEON_VFPV4, true,
              (AEK_HWDIVARM | AEK_HWDIV))
-ARM_CPU_NAME("cortex-a7", AK_ARMV7K, FK_NONE, true, AEK_HWDIVARM | AEK_HWDIV)
 // Invalid CPU
 ARM_CPU_NAME("invalid", AK_INVALID, FK_INVALID, true, AEK_INVALID)
 #undef ARM_CPU_NAME
index 8163b6f..f1f2d26 100644 (file)
@@ -1370,6 +1370,12 @@ StringRef Triple::getARMCPUForArch(StringRef MArch) const {
   case llvm::Triple::Win32:
     // FIXME: this is invalid for WindowsCE
     return "cortex-a9";
+  case llvm::Triple::MacOSX:
+  case llvm::Triple::IOS:
+  case llvm::Triple::WatchOS:
+    if (MArch == "v7k")
+      return "cortex-a7";
+    break;
   default:
     break;
   }