summaryrefslogtreecommitdiff
path: root/src/passes/Print.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r--src/passes/Print.cpp15
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 << ')';