From a28343a33ed28b4d5c83c37e350aceaf09b5246f Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Thu, 5 Dec 2019 13:09:21 -0600 Subject: Add string parameter to WASM_UNREACHABLE (#2499) This works more like llvm's unreachable handler in that is preserves information even in release builds. --- src/tools/wasm-ctor-eval.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/tools/wasm-ctor-eval.cpp') diff --git a/src/tools/wasm-ctor-eval.cpp b/src/tools/wasm-ctor-eval.cpp index 34451b871..b45c624a4 100644 --- a/src/tools/wasm-ctor-eval.cpp +++ b/src/tools/wasm-ctor-eval.cpp @@ -231,7 +231,8 @@ struct CtorEvalExternalInterface : EvallingModuleInstance::ExternalInterface { } else if (segment.offset->is()) { start = 0; } else { - WASM_UNREACHABLE(); // wasm spec only allows const and global.get there + // wasm spec only allows const and global.get there + WASM_UNREACHABLE("invalid expr type"); } auto end = start + segment.data.size(); if (start <= index && index < end) { -- cgit v1.2.3