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.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/wasm-builder.h b/src/wasm-builder.h
index 58a3a3188..a83a0c0c2 100644
--- a/src/wasm-builder.h
+++ b/src/wasm-builder.h
@@ -195,6 +195,14 @@ public:
ret->finalize(type);
return ret;
}
+ Block*
+ makeBlock(Name name, const std::vector<Expression*>& items, Type type) {
+ auto* ret = wasm.allocator.alloc<Block>();
+ ret->name = name;
+ ret->list.set(items);
+ ret->finalize(type);
+ return ret;
+ }
Block* makeBlock(const ExpressionList& items) {
auto* ret = wasm.allocator.alloc<Block>();
ret->list.set(items);