llvm.org GIT mirror llvm / 06bc362
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 Dan Gohman 4 years ago
3 changed file(s) with 5 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
152152 NVCL, // NVIDIA OpenCL
153153 AMDHSA, // AMD HSA Runtime
154154 PS4,
155 WebAssembly,
156 LastOSType = WebAssembly
155 LastOSType = PS4
157156 };
158157 enum EnvironmentType {
159158 UnknownEnvironment,
176176 case NVCL: return "nvcl";
177177 case AMDHSA: return "amdhsa";
178178 case PS4: return "ps4";
179 case WebAssembly: return "wasm";
180179 }
181180
182181 llvm_unreachable("Invalid OSType");
414413 .StartsWith("nvcl", Triple::NVCL)
415414 .StartsWith("amdhsa", Triple::AMDHSA)
416415 .StartsWith("ps4", Triple::PS4)
417 .StartsWith("wasm", Triple::WebAssembly)
418416 .Default(Triple::UnknownOS);
419417 }
420418
181181 EXPECT_EQ(Triple::CloudABI, T.getOS());
182182 EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
183183
184 T = Triple("wasm32-unknown-wasm");
184 T = Triple("wasm32-unknown-unknown");
185185 EXPECT_EQ(Triple::wasm32, T.getArch());
186186 EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
187 EXPECT_EQ(Triple::WebAssembly, T.getOS());
187 EXPECT_EQ(Triple::UnknownOS, T.getOS());
188188 EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
189189
190 T = Triple("wasm64-unknown-wasm");
190 T = Triple("wasm64-unknown-unknown");
191191 EXPECT_EQ(Triple::wasm64, T.getArch());
192192 EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
193 EXPECT_EQ(Triple::WebAssembly, T.getOS());
193 EXPECT_EQ(Triple::UnknownOS, T.getOS());
194194 EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
195195
196196 T = Triple("huh");