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.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp
index cfdfc09dd..7651414e0 100644
--- a/src/passes/Print.cpp
+++ b/src/passes/Print.cpp
@@ -735,6 +735,7 @@ struct PrintSExpression : public Visitor<PrintSExpression> {
o << " anyfunc)";
}
void visitTable(Table *curr) {
+ if (!curr->exists) return;
// if table wasn't imported, declare it
if (!curr->imported) {
doIndent(o, indent);
@@ -764,6 +765,7 @@ struct PrintSExpression : public Visitor<PrintSExpression> {
o << ")";
}
void visitMemory(Memory* curr) {
+ if (!curr->exists) return;
// if memory wasn't imported, declare it
if (!curr->imported) {
doIndent(o, indent);