Skip to content

Commit d282eaa

Browse files
committed
Demangler: print substitutions in Demangler::dump()
For better debugging of the demangler.
1 parent 0dd3c7c commit d282eaa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/Demangling/NodeDumper.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ void swift::Demangle::Node::dump() {
6161
}
6262

6363
void Demangler::dump() {
64+
for (unsigned Idx = 0; Idx < Substitutions.size(); ++Idx) {
65+
fprintf(stderr, "Substitution[%c]:\n", Idx + 'A');
66+
Substitutions[Idx]->dump();
67+
fprintf(stderr, "\n");
68+
}
69+
6470
for (unsigned Idx = 0; Idx < NodeStack.size(); ++Idx) {
6571
fprintf(stderr, "NodeStack[%u]:\n", Idx);
6672
NodeStack[Idx]->dump();

0 commit comments

Comments
 (0)