summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/s2wasm.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/s2wasm.h b/src/s2wasm.h
index 07262d012..5460bf467 100644
--- a/src/s2wasm.h
+++ b/src/s2wasm.h
@@ -1305,6 +1305,12 @@ class S2WasmBuilder {
block->finalize();
}
}
+
+ // ensure an explicit function type for indirect call targets
+ for (auto& name : wasm.table.names) {
+ auto* func = wasm.functionsMap[name];
+ func->type = ensureFunctionType(getSig(func), &wasm, allocator)->name;
+ }
}
template<class C>