summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-validator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm-validator.cpp')
-rw-r--r--src/wasm/wasm-validator.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp
index 769f17d59..0b0d165ed 100644
--- a/src/wasm/wasm-validator.cpp
+++ b/src/wasm/wasm-validator.cpp
@@ -671,7 +671,7 @@ void FunctionValidator::visitBinary(Binary* curr) {
shouldBeEqualOrFirstIsUnreachable(curr->left->type, f64, curr, "f64 op");
break;
}
- default: WASM_UNREACHABLE();
+ case InvalidBinary: WASM_UNREACHABLE();
}
}
@@ -753,7 +753,7 @@ void FunctionValidator::visitUnary(Unary* curr) {
case DemoteFloat64: shouldBeEqual(curr->value->type, f64, curr, "demote type must be correct"); break;
case ReinterpretInt32: shouldBeEqual(curr->value->type, i32, curr, "reinterpret/i32 type must be correct"); break;
case ReinterpretInt64: shouldBeEqual(curr->value->type, i64, curr, "reinterpret/i64 type must be correct"); break;
- default: abort();
+ case InvalidUnary: WASM_UNREACHABLE();
}
}
@@ -790,7 +790,6 @@ void FunctionValidator::visitHost(Host* curr) {
break;
}
case CurrentMemory: break;
- default: WASM_UNREACHABLE();
}
}
@@ -863,7 +862,8 @@ void FunctionValidator::validateAlignment(size_t align, Type type, Index bytes,
shouldBeTrue(align <= 8, curr, "alignment must not exceed natural");
break;
}
- default: {}
+ case none:
+ case unreachable: {}
}
}