Skip to content

Commit 18ba856

Browse files
committed
[Triple] Add "swift" as a vendor.
We want this so we can uniquely identify our fully-static Linux target using a triple (since we wish to make decisions about it in the compiler driver that wouldn't be appropriate for an "unknown" triple). rdar://123436421
1 parent d23d90c commit 18ba856

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

llvm/include/llvm/TargetParser/Triple.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ class Triple {
180180
Mesa,
181181
SUSE,
182182
OpenEmbedded,
183-
LastVendorType = OpenEmbedded
183+
Swift,
184+
LastVendorType = Swift
184185
};
185186
enum OSType {
186187
UnknownOS,

llvm/lib/TargetParser/Triple.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ StringRef Triple::getVendorTypeName(VendorType Kind) {
226226
case PC: return "pc";
227227
case SCEI: return "scei";
228228
case SUSE: return "suse";
229+
case Swift: return "swift";
229230
}
230231

231232
llvm_unreachable("Invalid VendorType!");
@@ -599,6 +600,7 @@ static Triple::VendorType parseVendor(StringRef VendorName) {
599600
.Case("amd", Triple::AMD)
600601
.Case("mesa", Triple::Mesa)
601602
.Case("suse", Triple::SUSE)
603+
.Case("swift", Triple::Swift)
602604
.Case("oe", Triple::OpenEmbedded)
603605
.Default(Triple::UnknownVendor);
604606
}

0 commit comments

Comments
 (0)