diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-12-06 10:52:09 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-12-06 10:52:09 -0800 |
commit | fa27379216ea90f1a1c80ffbdc6d83307c3474ee (patch) | |
tree | d0be0765eaa0bd032f123e9b6ac05b3fabcdb95d /src | |
parent | 34e45ae6426706ae31c4df8e0b36a4d14ea1f682 (diff) | |
download | binaryen-fa27379216ea90f1a1c80ffbdc6d83307c3474ee.tar.gz binaryen-fa27379216ea90f1a1c80ffbdc6d83307c3474ee.tar.bz2 binaryen-fa27379216ea90f1a1c80ffbdc6d83307c3474ee.zip |
ensure if branches are statements
Diffstat (limited to 'src')
-rw-r--r-- | src/wasm2asm.h | 4 |
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 |