diff options
Diffstat (limited to 'src/wasm-builder.h')
-rw-r--r-- | src/wasm-builder.h | 5 |
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; |