summaryrefslogtreecommitdiff
path: root/src/ir/branch-utils.h
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/ir/branch-utils.h
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/ir/branch-utils.h')
-rw-r--r--src/ir/branch-utils.h4
1 files changed, 2 insertions, 2 deletions
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<BrOnExn>()) {
return isBranchReachable(br);
}
- WASM_UNREACHABLE();
+ WASM_UNREACHABLE("unexpected expression type");
}
inline std::set<Name> 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;
}