summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
authorJF Bastien <jfb@chromium.org>2016-01-13 10:48:44 -0800
committerJF Bastien <jfb@chromium.org>2016-01-13 10:48:44 -0800
commit80d0b8eb31b1bb15ecd2245ef6ad57ca4d3a2575 (patch)
treed6dc07b081ed5c7e3a44bf1827c9b7d285d1a456 /src/wasm.h
parent2a0404579a2c061a965e2ac032801e250ab7f2bc (diff)
parent3da40ef949ddfac78df2db33e6b35e14f54cb78c (diff)
downloadbinaryen-80d0b8eb31b1bb15ecd2245ef6ad57ca4d3a2575.tar.gz
binaryen-80d0b8eb31b1bb15ecd2245ef6ad57ca4d3a2575.tar.bz2
binaryen-80d0b8eb31b1bb15ecd2245ef6ad57ca4d3a2575.zip
Merge branch 'master' of github.com:WebAssembly/binaryen
Diffstat (limited to 'src/wasm.h')
-rw-r--r--src/wasm.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/wasm.h b/src/wasm.h
index c4654580a..306804c66 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -540,6 +540,8 @@ public:
WasmType result;
std::vector<WasmType> params;
+ FunctionType() : result(none) {}
+
std::ostream& print(std::ostream &o, unsigned indent, bool full=false) {
if (full) {
printOpening(o, "type") << ' ' << name << " (func";
@@ -938,13 +940,15 @@ public:
class Import {
public:
Name name, module, base; // name = module.base
- FunctionType type;
+ FunctionType* type;
+
+ Import() : type(nullptr) {}
std::ostream& print(std::ostream &o, unsigned indent) {
printOpening(o, "import ") << name << ' ';
printText(o, module.str) << ' ';
printText(o, base.str);
- type.print(o, indent);
+ if (type) type->print(o, indent);
return o << ')';
}
};