diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-02-21 10:54:26 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-21 10:54:26 -0800 |
commit | c27040e315f75f5b5c50078e539714973dc21d12 (patch) | |
tree | 65046177757843c962d6ea6956450b916d8841b7 /src/wasm.h | |
parent | a32c0eff473d39b816679a5f7c65b522886726b0 (diff) | |
download | binaryen-c27040e315f75f5b5c50078e539714973dc21d12.tar.gz binaryen-c27040e315f75f5b5c50078e539714973dc21d12.tar.bz2 binaryen-c27040e315f75f5b5c50078e539714973dc21d12.zip |
read unknown users sections as binary data stored on the Module (#918)
Diffstat (limited to 'src/wasm.h')
-rw-r--r-- | src/wasm.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wasm.h b/src/wasm.h index 9807ee63c..4ad0870cc 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -1528,6 +1528,14 @@ public: bool mutable_; }; +// "Opaque" data, not part of the core wasm spec, that is held in binaries. +// May be parsed/handled by utility code elsewhere, but not in wasm.h +class UserSection { +public: + std::string name; + std::vector<char> data; +}; + class Module { public: // wasm contents (generally you shouldn't access these from outside, except maybe for iterating; use add*() and the get() functions) @@ -1541,6 +1549,8 @@ public: Memory memory; Name start; + std::vector<UserSection> userSections; + MixedArena allocator; private: |