diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h index 8e697f87fcd..dbdc89fa3f2 100644 --- a/include/llvm/ADT/Triple.h +++ b/include/llvm/ADT/Triple.h @@ -211,8 +211,8 @@ class Triple { 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, @@ -482,7 +482,7 @@ class Triple { } bool isMacCatalystEnvironment() const { - return getEnvironment() == Triple::MacCatalyst; + return getEnvironment() == Triple::MacABI; } bool isOSNetBSD() const { diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp index 0879ef5c4c4..11eb0906539 100644 --- a/lib/Support/Triple.cpp +++ b/lib/Support/Triple.cpp @@ -237,7 +237,7 @@ StringRef Triple::getEnvironmentTypeName(EnvironmentType Kind) { case Cygnus: return "cygnus"; case CoreCLR: return "coreclr"; case Simulator: return "simulator"; - case MacCatalyst: return "maccatalyst"; + case MacABI: return "macabi"; } llvm_unreachable("Invalid EnvironmentType!"); @@ -534,7 +534,7 @@ static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) { .StartsWith("cygnus", Triple::Cygnus) .StartsWith("coreclr", Triple::CoreCLR) .StartsWith("simulator", Triple::Simulator) - .StartsWith("maccatalyst", Triple::MacCatalyst) + .StartsWith("macabi", Triple::MacABI) .Default(Triple::UnknownEnvironment); } diff --git a/test/CodeGen/X86/macCatalyst.ll b/test/CodeGen/X86/macCatalyst.ll index 190c467e93d..7a126f1665d 100644 --- a/test/CodeGen/X86/macCatalyst.ll +++ b/test/CodeGen/X86/macCatalyst.ll @@ -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 diff --git a/test/MC/MachO/darwin-version-min-load-command.s b/test/MC/MachO/darwin-version-min-load-command.s index 05f61f0bc49..2567686e873 100644 --- a/test/MC/MachO/darwin-version-min-load-command.s +++ b/test/MC/MachO/darwin-version-min-load-command.s @@ -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 diff --git a/unittests/ADT/TripleTest.cpp b/unittests/ADT/TripleTest.cpp index 91a8f5d1f4a..63ab4ba0814 100644 --- a/unittests/ADT/TripleTest.cpp +++ b/unittests/ADT/TripleTest.cpp @@ -1217,13 +1217,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()); }