mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-29 14:20:29 +00:00
[WebAssembly] COWS has been renamed to WASI.
llvm-svn: 351297
This commit is contained in:
parent
62cb21da04
commit
406710c394
@ -186,8 +186,8 @@ public:
|
||||
AMDPAL, // AMD PAL Runtime
|
||||
HermitCore, // HermitCore Unikernel/Multikernel
|
||||
Hurd, // GNU/Hurd
|
||||
COWS, // Capability-Oriented WebAssembly Syscalls
|
||||
LastOSType = COWS
|
||||
WASI, // Experimental WebAssembly OS
|
||||
LastOSType = WASI
|
||||
};
|
||||
enum EnvironmentType {
|
||||
UnknownEnvironment,
|
||||
@ -588,9 +588,9 @@ public:
|
||||
return getOS() == Triple::Hurd;
|
||||
}
|
||||
|
||||
/// Tests whether the OS is COWS.
|
||||
bool isOSCOWS() const {
|
||||
return getOS() == Triple::COWS;
|
||||
/// Tests whether the OS is WASI.
|
||||
bool isOSWASI() const {
|
||||
return getOS() == Triple::WASI;
|
||||
}
|
||||
|
||||
/// Tests whether the OS uses glibc.
|
||||
|
@ -208,7 +208,7 @@ StringRef Triple::getOSTypeName(OSType Kind) {
|
||||
case AMDPAL: return "amdpal";
|
||||
case HermitCore: return "hermit";
|
||||
case Hurd: return "hurd";
|
||||
case COWS: return "cows";
|
||||
case WASI: return "wasi";
|
||||
}
|
||||
|
||||
llvm_unreachable("Invalid OSType");
|
||||
@ -506,7 +506,7 @@ static Triple::OSType parseOS(StringRef OSName) {
|
||||
.StartsWith("amdpal", Triple::AMDPAL)
|
||||
.StartsWith("hermit", Triple::HermitCore)
|
||||
.StartsWith("hurd", Triple::Hurd)
|
||||
.StartsWith("cows", Triple::COWS)
|
||||
.StartsWith("wasi", Triple::WASI)
|
||||
.Default(Triple::UnknownOS);
|
||||
}
|
||||
|
||||
|
@ -253,10 +253,10 @@ TEST(TripleTest, ParsedIDs) {
|
||||
EXPECT_EQ(Triple::UnknownOS, T.getOS());
|
||||
EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
|
||||
|
||||
T = Triple("wasm32-unknown-cows-musl");
|
||||
T = Triple("wasm32-unknown-wasi-musl");
|
||||
EXPECT_EQ(Triple::wasm32, T.getArch());
|
||||
EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
|
||||
EXPECT_EQ(Triple::COWS, T.getOS());
|
||||
EXPECT_EQ(Triple::WASI, T.getOS());
|
||||
EXPECT_EQ(Triple::Musl, T.getEnvironment());
|
||||
|
||||
T = Triple("wasm64-unknown-unknown");
|
||||
@ -265,10 +265,10 @@ TEST(TripleTest, ParsedIDs) {
|
||||
EXPECT_EQ(Triple::UnknownOS, T.getOS());
|
||||
EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
|
||||
|
||||
T = Triple("wasm64-unknown-cows-musl");
|
||||
T = Triple("wasm64-unknown-wasi-musl");
|
||||
EXPECT_EQ(Triple::wasm64, T.getArch());
|
||||
EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
|
||||
EXPECT_EQ(Triple::COWS, T.getOS());
|
||||
EXPECT_EQ(Triple::WASI, T.getOS());
|
||||
EXPECT_EQ(Triple::Musl, T.getEnvironment());
|
||||
|
||||
T = Triple("avr-unknown-unknown");
|
||||
@ -1247,17 +1247,17 @@ TEST(TripleTest, FileFormat) {
|
||||
|
||||
EXPECT_EQ(Triple::Wasm, Triple("wasm32-unknown-unknown").getObjectFormat());
|
||||
EXPECT_EQ(Triple::Wasm, Triple("wasm64-unknown-unknown").getObjectFormat());
|
||||
EXPECT_EQ(Triple::Wasm, Triple("wasm32-unknown-cows-musl").getObjectFormat());
|
||||
EXPECT_EQ(Triple::Wasm, Triple("wasm64-unknown-cows-musl").getObjectFormat());
|
||||
EXPECT_EQ(Triple::Wasm, Triple("wasm32-unknown-wasi-musl").getObjectFormat());
|
||||
EXPECT_EQ(Triple::Wasm, Triple("wasm64-unknown-wasi-musl").getObjectFormat());
|
||||
|
||||
EXPECT_EQ(Triple::Wasm,
|
||||
Triple("wasm32-unknown-unknown-wasm").getObjectFormat());
|
||||
EXPECT_EQ(Triple::Wasm,
|
||||
Triple("wasm64-unknown-unknown-wasm").getObjectFormat());
|
||||
EXPECT_EQ(Triple::Wasm,
|
||||
Triple("wasm32-unknown-cows-musl-wasm").getObjectFormat());
|
||||
Triple("wasm32-unknown-wasi-musl-wasm").getObjectFormat());
|
||||
EXPECT_EQ(Triple::Wasm,
|
||||
Triple("wasm64-unknown-cows-musl-wasm").getObjectFormat());
|
||||
Triple("wasm64-unknown-wasi-musl-wasm").getObjectFormat());
|
||||
|
||||
Triple MSVCNormalized(Triple::normalize("i686-pc-windows-msvc-elf"));
|
||||
EXPECT_EQ(Triple::ELF, MSVCNormalized.getObjectFormat());
|
||||
|
Loading…
Reference in New Issue
Block a user