diff options
Diffstat (limited to 'src/passes')
-rw-r--r-- | src/passes/Print.cpp | 8 | ||||
-rw-r--r-- | src/passes/RemoveImports.cpp | 2 |
2 files changed, 8 insertions, 2 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) { diff --git a/src/passes/RemoveImports.cpp b/src/passes/RemoveImports.cpp index 0b3f50049..19d6c3eb1 100644 --- a/src/passes/RemoveImports.cpp +++ b/src/passes/RemoveImports.cpp @@ -37,7 +37,7 @@ struct RemoveImports : public WalkerPass<PostWalker<RemoveImports, Visitor<Remov } void visitCallImport(CallImport *curr) { - WasmType type = module->getImport(curr->target)->type->result; + WasmType type = module->getImport(curr->target)->functionType->result; if (type == none) { replaceCurrent(allocator->alloc<Nop>()); } else { |