This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Print the actual value of an unknown section identifier.
ClosedPublic

Authored by ikudrin on Mar 5 2020, 2:05 AM.

Details

Summary

This is a follow-up for D75609. As @dblaikie suggested, it prints the actual number for an unknown section identifier when dumping unit index sections.

Diff Detail

Event Timeline

ikudrin created this revision.Mar 5 2020, 2:05 AM
dblaikie accepted this revision.Mar 5 2020, 1:50 PM

Looks good - thanks!

llvm/lib/DebugInfo/DWARF/DWARFUnitIndex.cpp
121

Might be simpler to write this as return "";

This revision is now accepted and ready to land.Mar 5 2020, 1:50 PM
jhenderson accepted this revision.Mar 6 2020, 1:02 AM

LGTM too.

ikudrin marked 2 inline comments as done.Mar 6 2020, 2:45 AM
ikudrin added inline comments.
llvm/lib/DebugInfo/DWARF/DWARFUnitIndex.cpp
121

I believe I would better stick with StringRef(). This is the same way as other stringify functions are written, in particular, in Dwarf.cpp, and, as I checked, the compiler generates a bit better code with the default constructor of StringRef.

This revision was automatically updated to reflect the committed changes.
ikudrin marked an inline comment as done.