[PATCH] D49742: [DebugInfo/DWARF] [2/4] De-segregate type units and compile units. NFC
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 30 19:33:46 PDT 2018
dblaikie added inline comments.
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp:59
const DWARFSection *AOS, const DWARFSection &LS, bool LE,
bool IsDWO, bool Lazy, DWARFSectionKind SectionKind) {
DWARFDataExtractor Data(Obj, Section, LE, 0);
----------------
probinson wrote:
> aprantl wrote:
> > why is this no longer necessary?
> More than unnecessary, it gets in the way. The parse method is called once per object-file section, and a single DWARFUnitSection now contains info from multiple sections. So, we have to be able to call it multiple times.
> It's the caller's responsibility to avoid re-parsing now. Hmm which ought to be documented in a comment.
More than a comment - I reckon these functions need a different name to call them out as being different from the other DWARF parsing objects semantics (construct -> parse -> use, this one is: construct -> {parse, use}*). As discussed on the llvm-dev thread, maybe something like "addSectionContents" or the like.
Repository:
rL LLVM
https://reviews.llvm.org/D49742
More information about the llvm-commits
mailing list