summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2017-02-21 10:54:26 -0800
committerGitHub <noreply@github.com>2017-02-21 10:54:26 -0800
commitc27040e315f75f5b5c50078e539714973dc21d12 (patch)
tree65046177757843c962d6ea6956450b916d8841b7 /src/wasm.h
parenta32c0eff473d39b816679a5f7c65b522886726b0 (diff)
downloadbinaryen-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.h10
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: