summaryrefslogtreecommitdiff
path: root/src/tools/wasm-reduce.cpp
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2020-01-08 17:43:25 -0800
committerGitHub <noreply@github.com>2020-01-08 17:43:25 -0800
commit77329439d6307d292e59986db3a194c3085abbe2 (patch)
treeac9f4ad3787f2e0d3644d34ff324a546380a17fd /src/tools/wasm-reduce.cpp
parent8d4db9fb86c3b80df3eaa0d8e5eb379d081c8399 (diff)
downloadbinaryen-77329439d6307d292e59986db3a194c3085abbe2.tar.gz
binaryen-77329439d6307d292e59986db3a194c3085abbe2.tar.bz2
binaryen-77329439d6307d292e59986db3a194c3085abbe2.zip
Remove implicit conversion operators from Type (#2577)
* Remove implicit conversion operators from Type Now types must be explicitly converted to uint32_t with Type::getID or to ValueType with Type::getVT. This fixes #2572 for switches that use Type::getVT. * getVT => getSingle
Diffstat (limited to 'src/tools/wasm-reduce.cpp')
-rw-r--r--src/tools/wasm-reduce.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tools/wasm-reduce.cpp b/src/tools/wasm-reduce.cpp
index 5a05fc7d2..ac00ce045 100644
--- a/src/tools/wasm-reduce.cpp
+++ b/src/tools/wasm-reduce.cpp
@@ -577,9 +577,9 @@ struct Reducer
continue; // no conversion
}
Expression* fixed = nullptr;
- switch (curr->type) {
+ switch (curr->type.getSingle()) {
case Type::i32: {
- switch (child->type) {
+ switch (child->type.getSingle()) {
case Type::i32:
WASM_UNREACHABLE("invalid type");
case Type::i64:
@@ -604,7 +604,7 @@ struct Reducer
break;
}
case Type::i64: {
- switch (child->type) {
+ switch (child->type.getSingle()) {
case Type::i32:
fixed = builder->makeUnary(ExtendSInt32, child);
break;
@@ -629,7 +629,7 @@ struct Reducer
break;
}
case Type::f32: {
- switch (child->type) {
+ switch (child->type.getSingle()) {
case Type::i32:
fixed = builder->makeUnary(ConvertSInt32ToFloat32, child);
break;
@@ -654,7 +654,7 @@ struct Reducer
break;
}
case Type::f64: {
- switch (child->type) {
+ switch (child->type.getSingle()) {
case Type::i32:
fixed = builder->makeUnary(ConvertSInt32ToFloat64, child);
break;