diff options
author | Alon Zakai <azakai@google.com> | 2021-05-11 16:16:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-11 16:16:53 -0700 |
commit | 4cfbb5d90bd253c066d92affa685dbab5d824699 (patch) | |
tree | f600492e4587099feb232021fd067cc128ae874a /src/passes/Print.cpp | |
parent | ed92a8d5e493c839687c2f2d56cdc5123e6e3a47 (diff) | |
download | binaryen-4cfbb5d90bd253c066d92affa685dbab5d824699.tar.gz binaryen-4cfbb5d90bd253c066d92affa685dbab5d824699.tar.bz2 binaryen-4cfbb5d90bd253c066d92affa685dbab5d824699.zip |
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.
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r-- | src/passes/Print.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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<PrintSExpression> { // // 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; |