summaryrefslogtreecommitdiff
path: root/src/passes/I64ToI32Lowering.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/I64ToI32Lowering.cpp')
-rw-r--r--src/passes/I64ToI32Lowering.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/passes/I64ToI32Lowering.cpp b/src/passes/I64ToI32Lowering.cpp
index a0381ccd4..c06176e53 100644
--- a/src/passes/I64ToI32Lowering.cpp
+++ b/src/passes/I64ToI32Lowering.cpp
@@ -219,6 +219,9 @@ struct I64ToI32Lowering : public WalkerPass<PostWalker<I64ToI32Lowering>> {
// returns nullptr;
template<typename T>
T* visitGenericCall(T* curr, BuilderFunc<T> callBuilder) {
+ if (handleUnreachable(curr)) {
+ return nullptr;
+ }
bool fixed = false;
std::vector<Expression*> args;
for (auto* e : curr->operands) {