diff options
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 77765e12f81..ab03753227d 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1060,6 +1060,7 @@ void DwarfDebug::endModule() { emitDebugStrDWO(); emitDebugInfoDWO(); emitDebugAbbrevDWO(); + emitDebugLineDWO(); // Emit DWO addresses. InfoHolder.emitAddresses(Asm->getObjFileLowering().getDwarfAddrSection()); } @@ -2658,7 +2659,6 @@ DwarfTypeUnit *DwarfDebug::constructSkeletonTU(DwarfTypeUnit *TU) { NewTU->setType(NULL); NewTU->initSection( Asm->getObjFileLowering().getDwarfTypesSection(TU->getTypeSignature())); - CU.applyStmtList(*Die); initSkeletonUnit(TU, Die, NewTU); return NewTU; @@ -2680,6 +2680,13 @@ void DwarfDebug::emitDebugAbbrevDWO() { InfoHolder.emitAbbrevs(Asm->getObjFileLowering().getDwarfAbbrevDWOSection()); } +void DwarfDebug::emitDebugLineDWO() { + assert(useSplitDwarf() && "No split dwarf?"); + Asm->OutStreamer.SwitchSection( + Asm->getObjFileLowering().getDwarfLineDWOSection()); + Asm->OutStreamer.EmitLabel(SplitTypeUnitFileTable.Emit(&Asm->OutStreamer).second); +} + // Emit the .debug_str.dwo section for separated dwarf. This contains the // string section and is identical in format to traditional .debug_str // sections. @@ -2708,8 +2715,9 @@ void DwarfDebug::addDwarfTypeUnitType(DwarfCompileUnit &CU, } DIE *UnitDie = new DIE(dwarf::DW_TAG_type_unit); - DwarfTypeUnit *NewTU = new DwarfTypeUnit(InfoHolder.getUnits().size(), - UnitDie, CU, Asm, this, &InfoHolder); + DwarfTypeUnit *NewTU = new DwarfTypeUnit( + InfoHolder.getUnits().size(), UnitDie, CU, Asm, this, &InfoHolder, + useSplitDwarf() ? &SplitTypeUnitFileTable : nullptr); TU = NewTU; InfoHolder.addUnit(NewTU); |