diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-08-18 11:15:39 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-09-07 09:55:01 -0700 |
commit | 2e2e0241a10c0eccb89365c1b50217d6d0d3a386 (patch) | |
tree | 4f19b9cc857065ffd30e956f787af546c73cccec /src/passes/Print.cpp | |
parent | e0809680bb82ecfc950aef97537827442b559fcf (diff) | |
download | binaryen-2e2e0241a10c0eccb89365c1b50217d6d0d3a386.tar.gz binaryen-2e2e0241a10c0eccb89365c1b50217d6d0d3a386.tar.bz2 binaryen-2e2e0241a10c0eccb89365c1b50217d6d0d3a386.zip |
export kinds
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r-- | src/passes/Print.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 02e9b9065..0152f917c 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -543,7 +543,14 @@ struct PrintSExpression : public Visitor<PrintSExpression> { void visitExport(Export *curr) { printOpening(o, "export "); printText(o, curr->name.str) << ' '; - printName(curr->value) << ')'; + switch (curr->kind) { + case Export::Function: printName(curr->value); break; + case Export::Table: o << "table"; break; + case Export::Memory: o << "memory"; break; + case Export::Global: o << "global "; printName(curr->value); break; + default: WASM_UNREACHABLE(); + } + o << ')'; } void visitGlobal(Global *curr) { printOpening(o, "global "); @@ -636,12 +643,6 @@ struct PrintSExpression : public Visitor<PrintSExpression> { } o << "\")\n"; } - if (curr->memory.exportName.is()) { - doIndent(o, indent); - printOpening(o, "export "); - printText(o, curr->memory.exportName.str) << " memory)"; - o << maybeNewLine; - } if (curr->start.is()) { doIndent(o, indent); printOpening(o, "start") << ' ' << curr->start << ')'; |