diff options
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r-- | src/wasm-binary.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h index 747f9a2ce..954521365 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -456,9 +456,7 @@ class WasmBinaryWriter : public Visitor<WasmBinaryWriter, void> { } public: - WasmBinaryWriter(Module* input, BufferWithRandomAccess& o, bool debug) : o(o), debug(debug) { - wasm = allocator.alloc<Module>(); - *wasm = *input; // simple shallow copy; we won't be modifying any internals, just adding some function types, so this is fine + WasmBinaryWriter(Module* input, BufferWithRandomAccess& o, bool debug) : wasm(input), o(o), debug(debug) { prepare(); } |