Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 22f7e4d

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 418839c commit 22f7e4d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

llvm/include/llvm/TargetParser/Triple.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ class Triple {
182182
Mesa,
183183
SUSE,
184184
OpenEmbedded,
185-
LastVendorType = OpenEmbedded
185+
Swift,
186+
LastVendorType = Swift
186187
};
187188
enum OSType {
188189
UnknownOS,

llvm/lib/TargetParser/Triple.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ StringRef Triple::getVendorTypeName(VendorType Kind) {
228228
case PC: return "pc";
229229
case SCEI: return "scei";
230230
case SUSE: return "suse";
231+
case Swift: return "swift";
231232
}
232233

233234
llvm_unreachable("Invalid VendorType!");
@@ -604,6 +605,7 @@ static Triple::VendorType parseVendor(StringRef VendorName) {
604605
.Case("amd", Triple::AMD)
605606
.Case("mesa", Triple::Mesa)
606607
.Case("suse", Triple::SUSE)
608+
.Case("swift", Triple::Swift)
607609
.Case("oe", Triple::OpenEmbedded)
608610
.Default(Triple::UnknownVendor);
609611
}

0 commit comments

Comments
 (0)