From 4a2f95f60ee386dc87d29d5f763fa4fb046550ff Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Tue, 18 Mar 2014 01:17:26 +0000 Subject: DebugInfo: Implement debug_line.dwo for file names used in type units during -gsplit-dwarf This removes an attribute (and more importantly, a relocation) from skeleton type units and removes some unnecessary file names from the debug_line section that remains in the .o (and linked executable) file. There's still a few places we could shave off some more space here: * use compilation dir of the underlying compilation unit (since all the type units share that compilation dir - though this would be more complicated in LTO cases where they don't (keep a map of compilation dir->line table header?)) * Remove some of the unnecessary header fields from the line table since they're not needed in this situation (about 12 bytes per table). llvm-svn: 204099 --- llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h') diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h index 71ff75d640a..4756509d094 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -27,6 +27,7 @@ #include "llvm/IR/DebugInfo.h" #include "llvm/IR/DebugLoc.h" #include "llvm/MC/MachineLocation.h" +#include "llvm/MC/MCDwarf.h" #include "llvm/Support/Allocator.h" namespace llvm { @@ -486,6 +487,10 @@ class DwarfDebug : public AsmPrinterHandler { // Holder for the skeleton information. DwarfFile SkeletonHolder; + // Store file names for type units under fission in a line table header that + // will be emitted into debug_line.dwo. + MCDwarfLineTableHeader SplitTypeUnitFileTable; + void addScopeVariable(LexicalScope *LS, DbgVariable *Var); const SmallVectorImpl &getUnits() { @@ -621,6 +626,9 @@ class DwarfDebug : public AsmPrinterHandler { /// \brief Emit the debug abbrev dwo section. void emitDebugAbbrevDWO(); + /// \brief Emit the debug line dwo section. + void emitDebugLineDWO(); + /// \brief Emit the debug str dwo section. void emitDebugStrDWO(); -- cgit v1.2.3