summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-08-23 11:39:58 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-09-07 09:55:06 -0700
commit14fe75e4d6e670d2e7f3e171d3d96c340b574eab (patch)
tree26e4122a719e557c48a5d7d7f4de52bdc86054af /src
parent1d3f3dda67c24c148dce13734c21cdab487ddc87 (diff)
downloadbinaryen-14fe75e4d6e670d2e7f3e171d3d96c340b574eab.tar.gz
binaryen-14fe75e4d6e670d2e7f3e171d3d96c340b574eab.tar.bz2
binaryen-14fe75e4d6e670d2e7f3e171d3d96c340b574eab.zip
when replacing an if with its condition (when it has no body), we must drop it
Diffstat (limited to 'src')
-rw-r--r--src/passes/Vacuum.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/passes/Vacuum.cpp b/src/passes/Vacuum.cpp
index 150593713..89ef7359e 100644
--- a/src/passes/Vacuum.cpp
+++ b/src/passes/Vacuum.cpp
@@ -190,7 +190,7 @@ struct Vacuum : public WalkerPass<ExpressionStackWalker<Vacuum, Visitor<Vacuum>>
// no else
if (curr->ifTrue->is<Nop>()) {
// no nothing
- replaceCurrent(curr->condition);
+ replaceCurrent(Builder(*getModule()).makeDrop(curr->condition));
}
}
}