summaryrefslogtreecommitdiff
path: root/src/passes
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes')
-rw-r--r--src/passes/MergeBlocks.cpp2
-rw-r--r--src/passes/Print.cpp3
-rw-r--r--src/passes/RemoveUnusedBrs.cpp2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/passes/MergeBlocks.cpp b/src/passes/MergeBlocks.cpp
index f3b85ab3d..d26817e18 100644
--- a/src/passes/MergeBlocks.cpp
+++ b/src/passes/MergeBlocks.cpp
@@ -34,7 +34,7 @@ struct MergeBlocks : public WalkerPass<PostWalker<MergeBlocks, Visitor<MergeBloc
Block* child = curr->list[i]->dynCast<Block>();
if (!child) continue;
if (child->name.is()) continue; // named blocks can have breaks to them (and certainly do, if we ran RemoveUnusedNames and RemoveUnusedBrs)
- ExpressionList merged;
+ ExpressionList merged(getModule()->allocator);
for (size_t j = 0; j < i; j++) {
merged.push_back(curr->list[j]);
}
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp
index bb89b2720..eb0a6d33b 100644
--- a/src/passes/Print.cpp
+++ b/src/passes/Print.cpp
@@ -186,7 +186,8 @@ struct PrintSExpression : public Visitor<PrintSExpression> {
decIndent();
}
- void printCallBody(Call* curr) {
+ template<typename CallBase>
+ void printCallBody(CallBase* curr) {
o << curr->target;
if (curr->operands.size() > 0) {
incIndent();
diff --git a/src/passes/RemoveUnusedBrs.cpp b/src/passes/RemoveUnusedBrs.cpp
index 5c21908a8..570e14b38 100644
--- a/src/passes/RemoveUnusedBrs.cpp
+++ b/src/passes/RemoveUnusedBrs.cpp
@@ -82,7 +82,7 @@ struct RemoveUnusedBrs : public WalkerPass<PostWalker<RemoveUnusedBrs, Visitor<R
if (!flow->value || self->valueCanFlow) {
if (!flow->value) {
// br => nop
- ExpressionManipulator::nop(flow);
+ ExpressionManipulator::nop<Break>(flow);
} else {
// br with value => value
*flows[i] = flow->value;