This is an archive of the discontinued LLVM Phabricator instance.

[dwarfdump] Have -c and -p work together
ClosedPublic

Authored by JDevlieghere on May 23 2018, 8:19 AM.

Details

Summary

When requesting to dump both the parent chain and children, we used to
print the DIE more than once because we propagated the dump options to
the parent without clearing the respective flags. This commit fixes this
oversight and adds a test.

rdar://39415292

Diff Detail

Event Timeline

JDevlieghere created this revision.May 23 2018, 8:19 AM
aprantl added inline comments.May 23 2018, 10:48 AM
llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
478–481

perhaps call them ParentDumpOpts?

479

This looks unintuitive: Does dumpParentChain print all parents?

515

ChildDumpOpts

JDevlieghere marked 3 inline comments as done.
  • Address Adrian's comments
llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
479

It does indeed. There's a comment expressing this above the function, which is why it's not repeated here.

aprantl accepted this revision.May 24 2018, 8:57 AM
This revision is now accepted and ready to land.May 24 2018, 8:57 AM
This revision was automatically updated to reflect the committed changes.