We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70b7584 commit 2c59fb5Copy full SHA for 2c59fb5
src/wasm/wasm-ir-builder.cpp
@@ -932,15 +932,15 @@ Result<> IRBuilder::visitEnd() {
932
if (!label) {
933
return curr;
934
}
935
+ auto blockType =
936
+ scope.labelUsed ? originalScopeType : scope.getResultType();
937
// We can re-use unnamed blocks instead of wrapping them.
938
if (auto* block = curr->dynCast<Block>(); block && !block->name) {
939
block->name = label;
940
+ block->type = blockType;
941
return block;
942
- return builder.makeBlock(label,
- {curr},
- scope.labelUsed ? originalScopeType
943
- : scope.getResultType());
+ return builder.makeBlock(label, {curr}, blockType);
944
};
945
946
if (auto* func = scope.getFunction()) {
0 commit comments