Skip to content

Commit 3dbdbbe

Browse files
committed
[triple] Use 'macabi' environment name for the Mac Catalyst triples
The 'macabi' environment name is preferred instead of 'maccatalyst'. llvm-svn: 364988
1 parent c0b5577 commit 3dbdbbe

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

llvm/include/llvm/ADT/Triple.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ class Triple {
215215
Cygnus,
216216
CoreCLR,
217217
Simulator, // Simulator variants of other systems, e.g., Apple's iOS
218-
MacCatalyst,
219-
LastEnvironmentType = MacCatalyst
218+
MacABI, // Mac Catalyst variant of Apple's iOS deployment target.
219+
LastEnvironmentType = MacABI
220220
};
221221
enum ObjectFormatType {
222222
UnknownObjectFormat,
@@ -487,7 +487,7 @@ class Triple {
487487
}
488488

489489
bool isMacCatalystEnvironment() const {
490-
return getEnvironment() == Triple::MacCatalyst;
490+
return getEnvironment() == Triple::MacABI;
491491
}
492492

493493
bool isOSNetBSD() const {

llvm/lib/Support/Triple.cpp

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

245245
llvm_unreachable("Invalid EnvironmentType!");
@@ -542,7 +542,7 @@ static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) {
542542
.StartsWith("cygnus", Triple::Cygnus)
543543
.StartsWith("coreclr", Triple::CoreCLR)
544544
.StartsWith("simulator", Triple::Simulator)
545-
.StartsWith("maccatalyst", Triple::MacCatalyst)
545+
.StartsWith("macabi", Triple::MacABI)
546546
.Default(Triple::UnknownEnvironment);
547547
}
548548

llvm/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

llvm/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

llvm/unittests/ADT/TripleTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,13 +1239,13 @@ TEST(TripleTest, getOSVersion) {
12391239
EXPECT_TRUE(T.isSimulatorEnvironment());
12401240
EXPECT_FALSE(T.isMacCatalystEnvironment());
12411241

1242-
T = Triple("x86_64-apple-ios13.0-maccatalyst");
1242+
T = Triple("x86_64-apple-ios13.0-macabi");
12431243
EXPECT_TRUE(T.isiOS());
12441244
T.getiOSVersion(Major, Minor, Micro);
12451245
EXPECT_EQ((unsigned)13, Major);
12461246
EXPECT_EQ((unsigned)0, Minor);
12471247
EXPECT_EQ((unsigned)0, Micro);
1248-
EXPECT_TRUE(T.getEnvironment() == Triple::MacCatalyst);
1248+
EXPECT_TRUE(T.getEnvironment() == Triple::MacABI);
12491249
EXPECT_TRUE(T.isMacCatalystEnvironment());
12501250
EXPECT_FALSE(T.isSimulatorEnvironment());
12511251
}

0 commit comments

Comments
 (0)