From ef2b1b630496dc695de5f9b722576682580a5a3f Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 29 Jan 2016 16:53:47 -0800 Subject: if functions are already type-named, do not change their types --- src/wasm-binary.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/wasm-binary.h') diff --git a/src/wasm-binary.h b/src/wasm-binary.h index e8ba3f698..9db23d25d 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -366,7 +366,9 @@ class WasmBinaryWriter : public WasmVisitor { void prepare() { // we need function types for all our functions for (auto* func : wasm->functions) { - func->type = ensureFunctionType(getSig(func), wasm, allocator)->name; + if (func->type.isNull()) { + func->type = ensureFunctionType(getSig(func), wasm, allocator)->name; + } } } -- cgit v1.2.3