summaryrefslogtreecommitdiff
path: root/src/wasm-builder.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-builder.h')
-rw-r--r--src/wasm-builder.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wasm-builder.h b/src/wasm-builder.h
index 61db3c9e8..04e0aa4de 100644
--- a/src/wasm-builder.h
+++ b/src/wasm-builder.h
@@ -76,6 +76,11 @@ public:
}
return ret;
}
+ Block* makeBlock(Name name, Expression* first = nullptr) {
+ auto* ret = makeBlock(first);
+ ret->name = name;
+ return ret;
+ }
If* makeIf(Expression* condition, Expression* ifTrue, Expression* ifFalse = nullptr) {
auto* ret = allocator.alloc<If>();
ret->condition = condition; ret->ifTrue = ifTrue; ret->ifFalse = ifFalse;