diff options
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r-- | src/passes/Print.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index d2fbf24d8..81e3ae989 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -3283,6 +3283,10 @@ struct PrintSExpression : public UnifiedExpressionVisitor<PrintSExpression> { o << ' '; } if (!curr->isPassive) { + assert(!currModule || currModule->memories.size() > 0); + if (!currModule || curr->memory != currModule->memories[0]->name) { + o << "(memory $" << curr->memory << ") "; + } visit(curr->offset); o << ' '; } |