summaryrefslogtreecommitdiff
path: root/src/wasm-binary.h
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-01-18 18:53:48 +0000
committerAlon Zakai <alonzakai@gmail.com>2018-01-18 10:53:48 -0800
commit9bde26331ba0f8da5165a8aaf192d9bb2bb72648 (patch)
tree1d26cf8790b2a993b4dd6798624cc48732f74c04 /src/wasm-binary.h
parent14cb0c01ee22fbcd2923db0502e11b1fc51df05d (diff)
downloadbinaryen-9bde26331ba0f8da5165a8aaf192d9bb2bb72648.tar.gz
binaryen-9bde26331ba0f8da5165a8aaf192d9bb2bb72648.tar.bz2
binaryen-9bde26331ba0f8da5165a8aaf192d9bb2bb72648.zip
Make input a const reference to WasmBinaryBuilder (#1367)
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r--src/wasm-binary.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h
index 813404895..e5bfd9f2d 100644
--- a/src/wasm-binary.h
+++ b/src/wasm-binary.h
@@ -802,7 +802,7 @@ public:
class WasmBinaryBuilder {
Module& wasm;
MixedArena& allocator;
- std::vector<char>& input;
+ const std::vector<char>& input;
bool debug;
std::istream* sourceMap;
std::pair<uint32_t, Function::DebugLocation> nextDebugLocation;
@@ -814,7 +814,7 @@ class WasmBinaryBuilder {
std::set<BinaryConsts::Section> seenSections;
public:
- WasmBinaryBuilder(Module& wasm, std::vector<char>& input, bool debug) : wasm(wasm), allocator(wasm.allocator), input(input), debug(debug), sourceMap(nullptr), nextDebugLocation(0, { 0, 0, 0 }), useDebugLocation(false) {}
+ WasmBinaryBuilder(Module& wasm, const std::vector<char>& input, bool debug) : wasm(wasm), allocator(wasm.allocator), input(input), debug(debug), sourceMap(nullptr), nextDebugLocation(0, { 0, 0, 0 }), useDebugLocation(false) {}
void read();
void readUserSection(size_t payloadLen);