Skip to content

Commit a907f1b

Browse files
al45tairbnbarham
authored andcommitted
[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 (cherry picked from commit 18ba856)
1 parent 141bce5 commit a907f1b

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
@@ -194,7 +194,8 @@ class Triple {
194194
Mesa,
195195
SUSE,
196196
OpenEmbedded,
197-
LastVendorType = OpenEmbedded
197+
Swift,
198+
LastVendorType = Swift
198199
};
199200
enum OSType {
200201
UnknownOS,

llvm/lib/TargetParser/Triple.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ StringRef Triple::getVendorTypeName(VendorType Kind) {
253253
case PC: return "pc";
254254
case SCEI: return "scei";
255255
case SUSE: return "suse";
256+
case Swift: return "swift";
256257
}
257258

258259
llvm_unreachable("Invalid VendorType!");
@@ -634,6 +635,7 @@ static Triple::VendorType parseVendor(StringRef VendorName) {
634635
.Case("amd", Triple::AMD)
635636
.Case("mesa", Triple::Mesa)
636637
.Case("suse", Triple::SUSE)
638+
.Case("swift", Triple::Swift)
637639
.Case("oe", Triple::OpenEmbedded)
638640
.Default(Triple::UnknownVendor);
639641
}

0 commit comments

Comments
 (0)