diff options
author | Sam Clegg <sbc@chromium.org> | 2020-12-18 10:20:59 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-18 10:20:59 -0800 |
commit | dc4288cea1e403f011ec4ad7539df0f1b4dfdf47 (patch) | |
tree | 8ffca84e9fc4ebda0daa7c2f0bae513a0a5aea63 /src/wasm.h | |
parent | 97fcd64de4b2b438a638feac2ad99b1d910ed431 (diff) | |
download | binaryen-dc4288cea1e403f011ec4ad7539df0f1b4dfdf47.tar.gz binaryen-dc4288cea1e403f011ec4ad7539df0f1b4dfdf47.tar.bz2 binaryen-dc4288cea1e403f011ec4ad7539df0f1b4dfdf47.zip |
MemoryPacking: Preserve segment names (#3458)
Also, avoid packing builtin llvm segments names so that
segments such as `__llvm_covfun` (use by llvm-cov) are
preserved in the final output.
Diffstat (limited to 'src/wasm.h')
-rw-r--r-- | src/wasm.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/wasm.h b/src/wasm.h index 255f18a16..1d5642625 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -1704,8 +1704,12 @@ public: Segment(Expression* offset, std::vector<char>& init) : offset(offset) { data.swap(init); } - Segment(bool isPassive, Expression* offset, const char* init, Address size) - : isPassive(isPassive), offset(offset) { + Segment(Name name, + bool isPassive, + Expression* offset, + const char* init, + Address size) + : name(name), isPassive(isPassive), offset(offset) { data.resize(size); std::copy_n(init, size, data.begin()); } |