mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204099 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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<DwarfUnit *> &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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user