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.cpp8
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) {