mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-28 13:51:09 +00:00
[triple] Use 'macabi' environment name for the Mac Catalyst triples
The 'macabi' environment name is preferred instead of 'maccatalyst'. llvm-svn: 364988
This commit is contained in:
parent
4b3d4276c6
commit
b9cd7ccd58
@ -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 {
|
||||
|
@ -239,7 +239,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!");
|
||||
@ -542,7 +542,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);
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user