diff options
author | Sam Clegg <sbc@chromium.org> | 2019-12-05 13:09:21 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-05 13:09:21 -0600 |
commit | a28343a33ed28b4d5c83c37e350aceaf09b5246f (patch) | |
tree | 084a487cdf79e8025246d2a85d5578c113c9ad51 /src/tools/wasm-reduce.cpp | |
parent | cbf121df96cfce5038f52ed04f9780e19ed3b762 (diff) | |
download | binaryen-a28343a33ed28b4d5c83c37e350aceaf09b5246f.tar.gz binaryen-a28343a33ed28b4d5c83c37e350aceaf09b5246f.tar.bz2 binaryen-a28343a33ed28b4d5c83c37e350aceaf09b5246f.zip |
Add string parameter to WASM_UNREACHABLE (#2499)
This works more like llvm's unreachable handler in that is preserves
information even in release builds.
Diffstat (limited to 'src/tools/wasm-reduce.cpp')
-rw-r--r-- | src/tools/wasm-reduce.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/tools/wasm-reduce.cpp b/src/tools/wasm-reduce.cpp index 0fe15b444..3e1e464f8 100644 --- a/src/tools/wasm-reduce.cpp +++ b/src/tools/wasm-reduce.cpp @@ -581,7 +581,7 @@ struct Reducer case i32: { switch (child->type) { case i32: - WASM_UNREACHABLE(); + WASM_UNREACHABLE("invalid type"); case i64: fixed = builder->makeUnary(WrapInt64, child); break; @@ -597,7 +597,7 @@ struct Reducer continue; // not implemented yet case none: case unreachable: - WASM_UNREACHABLE(); + WASM_UNREACHABLE("unexpected type"); } break; } @@ -607,7 +607,7 @@ struct Reducer fixed = builder->makeUnary(ExtendSInt32, child); break; case i64: - WASM_UNREACHABLE(); + WASM_UNREACHABLE("invalid type"); case f32: fixed = builder->makeUnary(TruncSFloat32ToInt64, child); break; @@ -620,7 +620,7 @@ struct Reducer continue; // not implemented yet case none: case unreachable: - WASM_UNREACHABLE(); + WASM_UNREACHABLE("unexpected type"); } break; } @@ -633,7 +633,7 @@ struct Reducer fixed = builder->makeUnary(ConvertSInt64ToFloat32, child); break; case f32: - WASM_UNREACHABLE(); + WASM_UNREACHABLE("unexpected type"); case f64: fixed = builder->makeUnary(DemoteFloat64, child); break; @@ -643,7 +643,7 @@ struct Reducer continue; // not implemented yet case none: case unreachable: - WASM_UNREACHABLE(); + WASM_UNREACHABLE("unexpected type"); } break; } @@ -659,14 +659,14 @@ struct Reducer fixed = builder->makeUnary(PromoteFloat32, child); break; case f64: - WASM_UNREACHABLE(); + WASM_UNREACHABLE("unexpected type"); case v128: case anyref: case exnref: continue; // not implemented yet case none: case unreachable: - WASM_UNREACHABLE(); + WASM_UNREACHABLE("unexpected type"); } break; } @@ -676,7 +676,7 @@ struct Reducer continue; // not implemented yet case none: case unreachable: - WASM_UNREACHABLE(); + WASM_UNREACHABLE("unexpected type"); } assert(fixed->type == curr->type); if (tryToReplaceCurrent(fixed)) { |