summaryrefslogtreecommitdiff
path: root/src/asmjs
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2019-12-05 13:09:21 -0600
committerGitHub <noreply@github.com>2019-12-05 13:09:21 -0600
commita28343a33ed28b4d5c83c37e350aceaf09b5246f (patch)
tree084a487cdf79e8025246d2a85d5578c113c9ad51 /src/asmjs
parentcbf121df96cfce5038f52ed04f9780e19ed3b762 (diff)
downloadbinaryen-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/asmjs')
-rw-r--r--src/asmjs/asm_v_wasm.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/asmjs/asm_v_wasm.cpp b/src/asmjs/asm_v_wasm.cpp
index 143d6667e..2fba0520a 100644
--- a/src/asmjs/asm_v_wasm.cpp
+++ b/src/asmjs/asm_v_wasm.cpp
@@ -38,7 +38,7 @@ Type asmToWasmType(AsmType asmType) {
case ASM_INT32X4:
return Type::v128;
}
- WASM_UNREACHABLE();
+ WASM_UNREACHABLE("invalid type");
}
AsmType wasmToAsmType(Type type) {
@@ -60,9 +60,9 @@ AsmType wasmToAsmType(Type type) {
case none:
return ASM_NONE;
case unreachable:
- WASM_UNREACHABLE();
+ WASM_UNREACHABLE("invalid type");
}
- WASM_UNREACHABLE();
+ WASM_UNREACHABLE("invalid type");
}
char getSig(Type type) {
@@ -84,9 +84,9 @@ char getSig(Type type) {
case none:
return 'v';
case unreachable:
- WASM_UNREACHABLE();
+ WASM_UNREACHABLE("invalid type");
}
- WASM_UNREACHABLE();
+ WASM_UNREACHABLE("invalid type");
}
std::string getSig(const FunctionType* type) {