summaryrefslogtreecommitdiff
path: root/src/wasm-stack.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-stack.h')
-rw-r--r--src/wasm-stack.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wasm-stack.h b/src/wasm-stack.h
index 8662e7835..e00fde5eb 100644
--- a/src/wasm-stack.h
+++ b/src/wasm-stack.h
@@ -809,8 +809,10 @@ void BinaryenIRWriter<SubType>::visitTupleMake(TupleMake* curr) {
for (auto* operand : curr->operands) {
visit(operand);
}
- // No need to handle unreachable since we don't actually emit an instruction
emit(curr);
+ if (curr->type == Type::unreachable) {
+ emitUnreachable();
+ }
}
template<typename SubType>