[PATCH] D79997: [DebugInfo] Dump fields according to their formats.
Igor Kudrin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 17 23:57:19 PDT 2020
ikudrin marked an inline comment as done.
ikudrin added a comment.
In D79997#2039229 <https://reviews.llvm.org/D79997#2039229>, @dblaikie wrote:
> Looks good - might be good/better to commit per-section, to isolate the changes/testing/etc.
Thanks! I'll split it on commit.
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp:486
+ OS << format(" .debug_str[0x%0*" PRIx64 "] = ",
+ Format == DWARF64 ? 16 : 8, UValue);
dumpString(OS);
----------------
dblaikie wrote:
> maybe pull this 16/8 computation out to the top, as you have in other parts of this patch? and/or refactor it into a utility function that gives the offset length, given the DWARF format.
> maybe pull this 16/8 computation out to the top, as you have in other parts of this patch?
OK.
> and/or refactor it into a utility function that gives the offset length, given the DWARF format.
I would not add that separate function; that would just bloat the common code. I think, that if not an explicit expression, I would prefer to use `2 * dwarf::getDwarfOffsetByteSize(Format)`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79997/new/
https://reviews.llvm.org/D79997
More information about the llvm-commits
mailing list