Fix the prefix for arm64 triple
authorYi Kong <Yi.Kong@arm.com>
Thu, 17 Jul 2014 09:43:27 +0000 (09:43 +0000)
committerYi Kong <Yi.Kong@arm.com>
Thu, 17 Jul 2014 09:43:27 +0000 (09:43 +0000)
Triple.cpp still returns "arm64" as prefix for arm64 triple, causing Clang not
being able to select the correct GCCBuiltin IR.

This patch changes the value to correct prefix "aarch64". Regression test will
be added in the coming patch.

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

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

lib/Support/Triple.cpp

index 2c2c90a99ebf6f2ee471a5887f7ca8770928e5b7..2b8b39782ccdbdfcbb1b5587a0399cb28a2f7a2d 100644 (file)
@@ -61,6 +61,8 @@ const char *Triple::getArchTypePrefix(ArchType Kind) {
   default:
     return nullptr;
 
+  case arm64:
+  case arm64_be:
   case aarch64:
   case aarch64_be:  return "aarch64";
 
@@ -69,9 +71,6 @@ const char *Triple::getArchTypePrefix(ArchType Kind) {
   case thumb:
   case thumbeb:     return "arm";
 
-  case arm64:       
-  case arm64_be:    return "arm64";
-
   case ppc64:
   case ppc64le:
   case ppc:         return "ppc";