[PATCH] D49741: [DebugInfo/DWARF] [1/4] De-segregate type units and compile units. NFC
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 30 07:47:58 PDT 2018
aprantl added a comment.
The de-templatization will reduce the code size and I doubt that the virtual method overhead will be measurable. Looks like a good direction to me.
================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFCompileUnit.h:29
// VTable anchor.
~DWARFCompileUnit() override;
----------------
`///`
================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFCompileUnit.h:32
+ void dump(raw_ostream &OS, DIDumpOptions DumpOpts) override;
+ // Enable LLVM-style RTTI.
+ static bool classof(const DWARFUnit *U) { return !U->isTypeUnit(); }
----------------
`///`
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp:63
+ DWARFDataExtractor Data(Obj, Section, LE, 0);
+ if (!Parser) {
+ const DWARFUnitIndex *Index = nullptr;
----------------
I understand you only moved this function, but if you happen to know it would be nice to add a comment here explaining why the parser may be null? Is this a lazy initialization?
Repository:
rL LLVM
https://reviews.llvm.org/D49741
More information about the llvm-commits
mailing list