summaryrefslogtreecommitdiff
path: root/src/wasm-stack.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-stack.h')
-rw-r--r--src/wasm-stack.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/wasm-stack.h b/src/wasm-stack.h
index d6c0e46ec..0b72774b6 100644
--- a/src/wasm-stack.h
+++ b/src/wasm-stack.h
@@ -508,17 +508,21 @@ class StackIRToBinaryWriter {
public:
StackIRToBinaryWriter(WasmBinaryWriter& parent,
BufferWithRandomAccess& o,
- Function* func)
- : writer(parent, o, func, false /* sourceMap */, false /* DWARF */),
- func(func) {}
+ Function* func,
+ bool sourceMap = false,
+ bool DWARF = false)
+ : parent(parent), writer(parent, o, func, sourceMap, DWARF), func(func),
+ sourceMap(sourceMap) {}
void write();
MappedLocals& getMappedLocals() { return writer.mappedLocals; }
private:
+ WasmBinaryWriter& parent;
BinaryInstWriter writer;
Function* func;
+ bool sourceMap;
};
std::ostream& printStackIR(std::ostream& o, Module* module, bool optimize);