[PATCH] D49742: [DebugInfo/DWARF] [2/4] De-segregate type units and compile units. NFC

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 31 06:25:32 PDT 2018


probinson 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);
----------------
dblaikie wrote:
> 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.
Right, thanks for the reminder, will do.


Repository:
  rL LLVM

https://reviews.llvm.org/D49742





More information about the llvm-commits mailing list