Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit 3f1fd4f

Browse files
committed
[triple] Use 'macabi' environment name for the Mac Catalyst triples
The 'macabi' environment name is preferred instead of 'maccatalyst'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364988 91177308-0d34-0410-b5e6-96231b3b80d8 (cherry picked from commit 255ffb6)
1 parent 5bbe5e0 commit 3f1fd4f

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

include/llvm/ADT/Triple.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ class Triple {
211211
Cygnus,
212212
CoreCLR,
213213
Simulator, // Simulator variants of other systems, e.g., Apple's iOS
214-
MacCatalyst,
215-
LastEnvironmentType = MacCatalyst
214+
MacABI, // Mac Catalyst variant of Apple's iOS deployment target.
215+
LastEnvironmentType = MacABI
216216
};
217217
enum ObjectFormatType {
218218
UnknownObjectFormat,
@@ -482,7 +482,7 @@ class Triple {
482482
}
483483

484484
bool isMacCatalystEnvironment() const {
485-
return getEnvironment() == Triple::MacCatalyst;
485+
return getEnvironment() == Triple::MacABI;
486486
}
487487

488488
bool isOSNetBSD() const {

lib/Support/Triple.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ StringRef Triple::getEnvironmentTypeName(EnvironmentType Kind) {
237237
case Cygnus: return "cygnus";
238238
case CoreCLR: return "coreclr";
239239
case Simulator: return "simulator";
240-
case MacCatalyst: return "maccatalyst";
240+
case MacABI: return "macabi";
241241
}
242242

243243
llvm_unreachable("Invalid EnvironmentType!");
@@ -534,7 +534,7 @@ static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) {
534534
.StartsWith("cygnus", Triple::Cygnus)
535535
.StartsWith("coreclr", Triple::CoreCLR)
536536
.StartsWith("simulator", Triple::Simulator)
537-
.StartsWith("maccatalyst", Triple::MacCatalyst)
537+
.StartsWith("macabi", Triple::MacABI)
538538
.Default(Triple::UnknownEnvironment);
539539
}
540540

test/CodeGen/X86/macCatalyst.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
; RUN: llc %s -o - | FileCheck %s
2-
target triple="x86_64-apple-ios13.0-maccatalyst"
2+
target triple="x86_64-apple-ios13.0-macabi"
33
; CHECK: .build_version maccatalyst, 13, 0

test/MC/MachO/darwin-version-min-load-command.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: llvm-mc -triple x86_64-apple-macosx10.10.0 %s -filetype=obj -o - | llvm-objdump -macho -private-headers - | FileCheck %s
22
// 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
33
// RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | llvm-objdump -macho -private-headers - | FileCheck %s --check-prefix=CHECK-DARWIN
4-
// 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
4+
// 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
55

66
// Test version-min load command should be inferred from triple and should always be generated on Darwin
77
// CHECK: Load command

unittests/ADT/TripleTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,13 +1217,13 @@ TEST(TripleTest, getOSVersion) {
12171217
EXPECT_TRUE(T.isSimulatorEnvironment());
12181218
EXPECT_FALSE(T.isMacCatalystEnvironment());
12191219

1220-
T = Triple("x86_64-apple-ios13.0-maccatalyst");
1220+
T = Triple("x86_64-apple-ios13.0-macabi");
12211221
EXPECT_TRUE(T.isiOS());
12221222
T.getiOSVersion(Major, Minor, Micro);
12231223
EXPECT_EQ((unsigned)13, Major);
12241224
EXPECT_EQ((unsigned)0, Minor);
12251225
EXPECT_EQ((unsigned)0, Micro);
1226-
EXPECT_TRUE(T.getEnvironment() == Triple::MacCatalyst);
1226+
EXPECT_TRUE(T.getEnvironment() == Triple::MacABI);
12271227
EXPECT_TRUE(T.isMacCatalystEnvironment());
12281228
EXPECT_FALSE(T.isSimulatorEnvironment());
12291229
}

0 commit comments

Comments
 (0)