Drop the OS from the WebAssembly target triple for now.

This unbreaks TripleTest.Normalization. We'll have to come up with a new
plan for the OS component of the target triple for WebAssembly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241041 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2015-06-30 03:52:25 +00:00
parent 09912eb9ec
commit 06bc362502
3 changed files with 5 additions and 8 deletions

View File

@ -153,8 +153,7 @@ public:
NVCL, // NVIDIA OpenCL NVCL, // NVIDIA OpenCL
AMDHSA, // AMD HSA Runtime AMDHSA, // AMD HSA Runtime
PS4, PS4,
WebAssembly, LastOSType = PS4
LastOSType = WebAssembly
}; };
enum EnvironmentType { enum EnvironmentType {
UnknownEnvironment, UnknownEnvironment,

View File

@ -177,7 +177,6 @@ const char *Triple::getOSTypeName(OSType Kind) {
case NVCL: return "nvcl"; case NVCL: return "nvcl";
case AMDHSA: return "amdhsa"; case AMDHSA: return "amdhsa";
case PS4: return "ps4"; case PS4: return "ps4";
case WebAssembly: return "wasm";
} }
llvm_unreachable("Invalid OSType"); llvm_unreachable("Invalid OSType");
@ -415,7 +414,6 @@ static Triple::OSType parseOS(StringRef OSName) {
.StartsWith("nvcl", Triple::NVCL) .StartsWith("nvcl", Triple::NVCL)
.StartsWith("amdhsa", Triple::AMDHSA) .StartsWith("amdhsa", Triple::AMDHSA)
.StartsWith("ps4", Triple::PS4) .StartsWith("ps4", Triple::PS4)
.StartsWith("wasm", Triple::WebAssembly)
.Default(Triple::UnknownOS); .Default(Triple::UnknownOS);
} }

View File

@ -182,16 +182,16 @@ TEST(TripleTest, ParsedIDs) {
EXPECT_EQ(Triple::CloudABI, T.getOS()); EXPECT_EQ(Triple::CloudABI, T.getOS());
EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment()); EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
T = Triple("wasm32-unknown-wasm"); T = Triple("wasm32-unknown-unknown");
EXPECT_EQ(Triple::wasm32, T.getArch()); EXPECT_EQ(Triple::wasm32, T.getArch());
EXPECT_EQ(Triple::UnknownVendor, T.getVendor()); EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
EXPECT_EQ(Triple::WebAssembly, T.getOS()); EXPECT_EQ(Triple::UnknownOS, T.getOS());
EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment()); EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
T = Triple("wasm64-unknown-wasm"); T = Triple("wasm64-unknown-unknown");
EXPECT_EQ(Triple::wasm64, T.getArch()); EXPECT_EQ(Triple::wasm64, T.getArch());
EXPECT_EQ(Triple::UnknownVendor, T.getVendor()); EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
EXPECT_EQ(Triple::WebAssembly, T.getOS()); EXPECT_EQ(Triple::UnknownOS, T.getOS());
EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment()); EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
T = Triple("huh"); T = Triple("huh");