diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-08-18 17:56:01 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-09-07 09:55:02 -0700 |
commit | a10ca64dc04bdba4fbf4a468604c0c88f62a4a8d (patch) | |
tree | 2c9477cc46b0d335e36287303019bbf20e6b014b /src/passes/Print.cpp | |
parent | 793863a5d0e2f864f46dac86baa8e12c63b5b004 (diff) | |
download | binaryen-a10ca64dc04bdba4fbf4a468604c0c88f62a4a8d.tar.gz binaryen-a10ca64dc04bdba4fbf4a468604c0c88f62a4a8d.tar.bz2 binaryen-a10ca64dc04bdba4fbf4a468604c0c88f62a4a8d.zip |
import type for globals
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r-- | src/passes/Print.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index e9e70c1b0..3e5339932 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -544,7 +544,13 @@ struct PrintSExpression : public Visitor<PrintSExpression> { printName(curr->name) << ' '; printText(o, curr->module.str) << ' '; printText(o, curr->base.str); - if (curr->type) visitFunctionType(curr->type); + switch (curr->kind) { + case Export::Function: if (curr->functionType) visitFunctionType(curr->functionType); break; + case Export::Table: break; + case Export::Memory: break; + case Export::Global: o << printWasmType(curr->globalType); break; + default: WASM_UNREACHABLE(); + } o << ')'; } void visitExport(Export *curr) { |