From: Dan Gohman Date: Tue, 30 Jun 2015 03:52:25 +0000 (+0000) Subject: Drop the OS from the WebAssembly target triple for now. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=06bc362502660384e9fdf23a53da874236a741be 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 --- diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h index f26cadb0154..06f5870119c 100644 --- a/include/llvm/ADT/Triple.h +++ b/include/llvm/ADT/Triple.h @@ -153,8 +153,7 @@ public: NVCL, // NVIDIA OpenCL AMDHSA, // AMD HSA Runtime PS4, - WebAssembly, - LastOSType = WebAssembly + LastOSType = PS4 }; enum EnvironmentType { UnknownEnvironment, diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp index 1bd0d0187d5..92be0e047f6 100644 --- a/lib/Support/Triple.cpp +++ b/lib/Support/Triple.cpp @@ -177,7 +177,6 @@ const char *Triple::getOSTypeName(OSType Kind) { case NVCL: return "nvcl"; case AMDHSA: return "amdhsa"; case PS4: return "ps4"; - case WebAssembly: return "wasm"; } llvm_unreachable("Invalid OSType"); @@ -415,7 +414,6 @@ static Triple::OSType parseOS(StringRef OSName) { .StartsWith("nvcl", Triple::NVCL) .StartsWith("amdhsa", Triple::AMDHSA) .StartsWith("ps4", Triple::PS4) - .StartsWith("wasm", Triple::WebAssembly) .Default(Triple::UnknownOS); } diff --git a/unittests/ADT/TripleTest.cpp b/unittests/ADT/TripleTest.cpp index dfeebacfdaa..d50768412d7 100644 --- a/unittests/ADT/TripleTest.cpp +++ b/unittests/ADT/TripleTest.cpp @@ -182,16 +182,16 @@ TEST(TripleTest, ParsedIDs) { EXPECT_EQ(Triple::CloudABI, T.getOS()); 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::UnknownVendor, T.getVendor()); - EXPECT_EQ(Triple::WebAssembly, T.getOS()); + EXPECT_EQ(Triple::UnknownOS, T.getOS()); 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::UnknownVendor, T.getVendor()); - EXPECT_EQ(Triple::WebAssembly, T.getOS()); + EXPECT_EQ(Triple::UnknownOS, T.getOS()); EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment()); T = Triple("huh");