From 4cfbb5d90bd253c066d92affa685dbab5d824699 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 11 May 2021 16:16:53 -0700 Subject: Printing: Add a comment when we cannot emit something (#3878) If we can't emit something, and instead emit a replacement for it (as is the case for a StructSet with an unreachable RTT, so we have no known heap type for it), add a comment that mentions it is a replacement. This might avoid confusion while debugging. --- src/passes/Print.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/passes/Print.cpp') diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index ef78bf582..41e800352 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -2351,6 +2351,9 @@ struct PrintSExpression : public UnifiedExpressionVisitor { // // Emit a block with drops of the children. o << "(block"; + if (!minify) { + o << " ;; (replaces something unreachable we can't emit)"; + } incIndent(); for (auto* child : ChildIterator(curr)) { Drop drop; -- cgit v1.2.3