[llvm] r364988 - [triple] Use 'macabi' environment name for the Mac Catalyst triples

Alex Lorenz via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 2 18:02:43 PDT 2019


Author: arphaman
Date: Tue Jul  2 18:02:43 2019
New Revision: 364988

URL: http://llvm.org/viewvc/llvm-project?rev=364988&view=rev
Log:
[triple] Use 'macabi' environment name for the Mac Catalyst triples

The 'macabi' environment name is preferred instead of 'maccatalyst'.

Modified:
    llvm/trunk/include/llvm/ADT/Triple.h
    llvm/trunk/lib/Support/Triple.cpp
    llvm/trunk/test/CodeGen/X86/macCatalyst.ll
    llvm/trunk/test/MC/MachO/darwin-version-min-load-command.s
    llvm/trunk/unittests/ADT/TripleTest.cpp

Modified: llvm/trunk/include/llvm/ADT/Triple.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/Triple.h?rev=364988&r1=364987&r2=364988&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/Triple.h (original)
+++ llvm/trunk/include/llvm/ADT/Triple.h Tue Jul  2 18:02:43 2019
@@ -215,8 +215,8 @@ public:
     Cygnus,
     CoreCLR,
     Simulator, // Simulator variants of other systems, e.g., Apple's iOS
-    MacCatalyst,
-    LastEnvironmentType = MacCatalyst
+    MacABI, // Mac Catalyst variant of Apple's iOS deployment target.
+    LastEnvironmentType = MacABI
   };
   enum ObjectFormatType {
     UnknownObjectFormat,
@@ -487,7 +487,7 @@ public:
   }
 
   bool isMacCatalystEnvironment() const {
-    return getEnvironment() == Triple::MacCatalyst;
+    return getEnvironment() == Triple::MacABI;
   }
 
   bool isOSNetBSD() const {

Modified: llvm/trunk/lib/Support/Triple.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Triple.cpp?rev=364988&r1=364987&r2=364988&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Triple.cpp (original)
+++ llvm/trunk/lib/Support/Triple.cpp Tue Jul  2 18:02:43 2019
@@ -239,7 +239,7 @@ StringRef Triple::getEnvironmentTypeName
   case Cygnus: return "cygnus";
   case CoreCLR: return "coreclr";
   case Simulator: return "simulator";
-  case MacCatalyst: return "maccatalyst";
+  case MacABI: return "macabi";
   }
 
   llvm_unreachable("Invalid EnvironmentType!");
@@ -542,7 +542,7 @@ static Triple::EnvironmentType parseEnvi
     .StartsWith("cygnus", Triple::Cygnus)
     .StartsWith("coreclr", Triple::CoreCLR)
     .StartsWith("simulator", Triple::Simulator)
-    .StartsWith("maccatalyst", Triple::MacCatalyst)
+    .StartsWith("macabi", Triple::MacABI)
     .Default(Triple::UnknownEnvironment);
 }
 

Modified: llvm/trunk/test/CodeGen/X86/macCatalyst.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/macCatalyst.ll?rev=364988&r1=364987&r2=364988&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/macCatalyst.ll (original)
+++ llvm/trunk/test/CodeGen/X86/macCatalyst.ll Tue Jul  2 18:02:43 2019
@@ -1,3 +1,3 @@
 ; RUN: llc %s -o - | FileCheck %s
-target triple="x86_64-apple-ios13.0-maccatalyst"
+target triple="x86_64-apple-ios13.0-macabi"
 ; CHECK: .build_version maccatalyst, 13, 0

Modified: llvm/trunk/test/MC/MachO/darwin-version-min-load-command.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/darwin-version-min-load-command.s?rev=364988&r1=364987&r2=364988&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/darwin-version-min-load-command.s (original)
+++ llvm/trunk/test/MC/MachO/darwin-version-min-load-command.s Tue Jul  2 18:02:43 2019
@@ -1,7 +1,7 @@
 // RUN: llvm-mc -triple x86_64-apple-macosx10.10.0 %s -filetype=obj -o - | llvm-objdump -macho -private-headers - | FileCheck %s
 // RUN: llvm-mc -triple x86_64-apple-ios8.0.0 %s -filetype=obj -o - | llvm-objdump -macho -private-headers - | FileCheck %s --check-prefix=CHECK-IOS
 // RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | llvm-objdump -macho -private-headers - | FileCheck %s --check-prefix=CHECK-DARWIN
-// RUN: llvm-mc -triple x86_64-apple-ios13.0-maccatalyst %s -filetype=obj -o - | llvm-objdump -macho -private-headers - | FileCheck %s --check-prefix=CHECK-MACCATALYST
+// RUN: llvm-mc -triple x86_64-apple-ios13.0-macabi %s -filetype=obj -o - | llvm-objdump -macho -private-headers - | FileCheck %s --check-prefix=CHECK-MACCATALYST
 
 // Test version-min load command should be inferred from triple and should always be generated on Darwin
 // CHECK: Load command

Modified: llvm/trunk/unittests/ADT/TripleTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/TripleTest.cpp?rev=364988&r1=364987&r2=364988&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/TripleTest.cpp (original)
+++ llvm/trunk/unittests/ADT/TripleTest.cpp Tue Jul  2 18:02:43 2019
@@ -1239,13 +1239,13 @@ TEST(TripleTest, getOSVersion) {
   EXPECT_TRUE(T.isSimulatorEnvironment());
   EXPECT_FALSE(T.isMacCatalystEnvironment());
 
-  T = Triple("x86_64-apple-ios13.0-maccatalyst");
+  T = Triple("x86_64-apple-ios13.0-macabi");
   EXPECT_TRUE(T.isiOS());
   T.getiOSVersion(Major, Minor, Micro);
   EXPECT_EQ((unsigned)13, Major);
   EXPECT_EQ((unsigned)0, Minor);
   EXPECT_EQ((unsigned)0, Micro);
-  EXPECT_TRUE(T.getEnvironment() == Triple::MacCatalyst);
+  EXPECT_TRUE(T.getEnvironment() == Triple::MacABI);
   EXPECT_TRUE(T.isMacCatalystEnvironment());
   EXPECT_FALSE(T.isSimulatorEnvironment());
 }




More information about the llvm-commits mailing list