summaryrefslogtreecommitdiff
path: root/src/wasm2asm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm2asm.h')
-rw-r--r--src/wasm2asm.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm2asm.h b/src/wasm2asm.h
index 46a9bc969..c2e1141d1 100644
--- a/src/wasm2asm.h
+++ b/src/wasm2asm.h
@@ -496,10 +496,10 @@ Ref Wasm2AsmBuilder::processFunctionBody(Expression* curr, IString result) {
Ref visitIf(If *curr) override {
IString temp;
Ref condition = visitForExpression(curr->condition, i32, temp);
- Ref ifTrue = visitAndAssign(curr->ifTrue, result);
+ Ref ifTrue = ValueBuilder::makeStatement(visitAndAssign(curr->ifTrue, result));
Ref ifFalse;
if (curr->ifFalse) {
- ifFalse = visitAndAssign(curr->ifFalse, result);
+ ifFalse = ValueBuilder::makeStatement(visitAndAssign(curr->ifFalse, result));
}
if (temp.isNull()) {
return ValueBuilder::makeIf(condition, ifTrue, ifFalse); // simple if