r209899 - AArch64: combine arm64 & aarch64 cases in switch

Tim Northover tnorthover at apple.com
Fri May 30 07:14:07 PDT 2014


Author: tnorthover
Date: Fri May 30 09:14:07 2014
New Revision: 209899

URL: http://llvm.org/viewvc/llvm-project?rev=209899&view=rev
Log:
AArch64: combine arm64 & aarch64 cases in switch

There shouldn't be any difference in behaviour here, at least not in
any configurations people care about and possibly not in any reachable
configurations.

Modified:
    cfe/trunk/lib/Basic/Targets.cpp

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=209899&r1=209898&r2=209899&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Fri May 30 09:14:07 2014
@@ -5915,29 +5915,6 @@ static TargetInfo *AllocateTarget(const
   default:
     return nullptr;
 
-  case llvm::Triple::arm64:
-    if (Triple.isOSDarwin())
-      return new DarwinAArch64TargetInfo(Triple);
-
-    switch (os) {
-    case llvm::Triple::Linux:
-      return new LinuxTargetInfo<AArch64leTargetInfo>(Triple);
-    case llvm::Triple::NetBSD:
-      return new NetBSDTargetInfo<AArch64leTargetInfo>(Triple);
-    default:
-      return new AArch64leTargetInfo(Triple);
-    }
-
-  case llvm::Triple::arm64_be:
-    switch (os) {
-    case llvm::Triple::Linux:
-      return new LinuxTargetInfo<AArch64beTargetInfo>(Triple);
-    case llvm::Triple::NetBSD:
-      return new NetBSDTargetInfo<AArch64beTargetInfo>(Triple);
-    default:
-      return new AArch64beTargetInfo(Triple);
-    }
-
   case llvm::Triple::xcore:
     return new XCoreTargetInfo(Triple);
 
@@ -5945,6 +5922,10 @@ static TargetInfo *AllocateTarget(const
     return new HexagonTargetInfo(Triple);
 
   case llvm::Triple::aarch64:
+  case llvm::Triple::arm64:
+    if (Triple.isOSDarwin())
+      return new DarwinAArch64TargetInfo(Triple);
+
     switch (os) {
     case llvm::Triple::Linux:
       return new LinuxTargetInfo<AArch64leTargetInfo>(Triple);
@@ -5955,6 +5936,7 @@ static TargetInfo *AllocateTarget(const
     }
 
   case llvm::Triple::aarch64_be:
+  case llvm::Triple::arm64_be:
     switch (os) {
     case llvm::Triple::Linux:
       return new LinuxTargetInfo<AArch64beTargetInfo>(Triple);





More information about the cfe-commits mailing list