mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-27 07:12:06 +00:00
Add SUSE vendor
Summary: SUSE's ARM triples end with -gnueabi even though they are hard-float. This requires special handling of SUSE ARM triples. Hence we need a way to differentiate the SUSE as vendor. This CL adds that. Reviewers: chandlerc, compnerd, echristo, rengolin Reviewed By: rengolin Subscribers: aemerson, rengolin, llvm-commits Differential Revision: https://reviews.llvm.org/D32426 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301174 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2f681da9f4
commit
63dc9141ba
@ -140,7 +140,8 @@ public:
|
||||
Myriad,
|
||||
AMD,
|
||||
Mesa,
|
||||
LastVendorType = Mesa
|
||||
SUSE,
|
||||
LastVendorType = SUSE
|
||||
};
|
||||
enum OSType {
|
||||
UnknownOS,
|
||||
|
@ -161,6 +161,7 @@ StringRef Triple::getVendorTypeName(VendorType Kind) {
|
||||
case Myriad: return "myriad";
|
||||
case AMD: return "amd";
|
||||
case Mesa: return "mesa";
|
||||
case SUSE: return "suse";
|
||||
}
|
||||
|
||||
llvm_unreachable("Invalid VendorType!");
|
||||
@ -443,6 +444,7 @@ static Triple::VendorType parseVendor(StringRef VendorName) {
|
||||
.Case("myriad", Triple::Myriad)
|
||||
.Case("amd", Triple::AMD)
|
||||
.Case("mesa", Triple::Mesa)
|
||||
.Case("suse", Triple::SUSE)
|
||||
.Default(Triple::UnknownVendor);
|
||||
}
|
||||
|
||||
|
@ -284,6 +284,12 @@ TEST(TripleTest, ParsedIDs) {
|
||||
EXPECT_EQ(Triple::FreeBSD, T.getOS());
|
||||
EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
|
||||
|
||||
T = Triple("armv7hl-suse-linux-gnueabi");
|
||||
EXPECT_EQ(Triple::arm, T.getArch());
|
||||
EXPECT_EQ(Triple::SUSE, T.getVendor());
|
||||
EXPECT_EQ(Triple::Linux, T.getOS());
|
||||
EXPECT_EQ(Triple::GNUEABI, T.getEnvironment());
|
||||
|
||||
T = Triple("huh");
|
||||
EXPECT_EQ(Triple::UnknownArch, T.getArch());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user