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/ir/branch-utils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ir/branch-utils.h') diff --git a/src/ir/branch-utils.h b/src/ir/branch-utils.h index 53279eee6..a22301e54 100644 --- a/src/ir/branch-utils.h +++ b/src/ir/branch-utils.h @@ -49,7 +49,7 @@ inline bool isBranchReachable(Expression* expr) { } else if (auto* br = expr->dynCast()) { return isBranchReachable(br); } - WASM_UNREACHABLE(); + WASM_UNREACHABLE("unexpected expression type"); } inline std::set getUniqueTargets(Break* br) { return {br->name}; } @@ -90,7 +90,7 @@ inline bool replacePossibleTarget(Expression* branch, Name from, Name to) { worked = true; } } else { - WASM_UNREACHABLE(); + WASM_UNREACHABLE("unexpected expression type"); } return worked; } -- cgit v1.2.3