[PATCH] D59515: Prevent duplicate files in debug line header in dwarf 5.
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 22 11:05:46 PDT 2019
dblaikie added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h:104
public:
+ unsigned getDwarfVersion() { return DD->getDwarfVersion(); }
DwarfCompileUnit(unsigned UID, const DICompileUnit *Node, AsmPrinter *A,
----------------
accessor probably could/should be a const member function
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp:1034
+ else
+ return Prologue.FileNames[Index - 1];
}
----------------
Perhaps in v4 we could keep Index == array index, and leave FileNames[0] unused? (I guess then it might need a special case when being emitted to skip over FileNames[0]?)
================
Comment at: llvm/lib/MC/MCDwarf.cpp:549-550
+ return false;
+ if (RootFile.Checksum == nullptr)
+ return Checksum == nullptr;
+ return *RootFile.Checksum == *Checksum;
----------------
Probably more common to write a nullptr check as "!X" in LLVM code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59515/new/
https://reviews.llvm.org/D59515
More information about the llvm-commits
mailing list