Remove type unit skeletons. GDB no longer needs them & this saves a heap of space.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216521 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2014-08-27 05:04:14 +00:00
parent fc03e72b4f
commit ad2a271781
2 changed files with 7 additions and 40 deletions

View File

@ -2481,24 +2481,6 @@ DwarfCompileUnit &DwarfDebug::constructSkeletonCU(const DwarfCompileUnit &CU) {
return NewCU;
}
// This DIE has the following attributes: DW_AT_comp_dir, DW_AT_dwo_name,
// DW_AT_addr_base.
DwarfTypeUnit &DwarfDebug::constructSkeletonTU(DwarfTypeUnit &TU) {
DwarfCompileUnit &CU = static_cast<DwarfCompileUnit &>(
*SkeletonHolder.getUnits()[TU.getCU().getUniqueID()]);
auto OwnedUnit = make_unique<DwarfTypeUnit>(TU.getUniqueID(), CU, Asm, this,
&SkeletonHolder);
DwarfTypeUnit &NewTU = *OwnedUnit;
NewTU.setTypeSignature(TU.getTypeSignature());
NewTU.setType(nullptr);
NewTU.initSection(
Asm->getObjFileLowering().getDwarfTypesSection(TU.getTypeSignature()));
initSkeletonUnit(TU, NewTU.getUnitDie(), std::move(OwnedUnit));
return NewTU;
}
// Emit the .debug_info.dwo section for separated dwarf. This contains the
// compile units that would normally be in debug_info.
void DwarfDebug::emitDebugInfoDWO() {
@ -2621,11 +2603,8 @@ void DwarfDebug::addDwarfTypeUnitType(DwarfCompileUnit &CU,
// If the type wasn't dependent on fission addresses, finish adding the type
// and all its dependent types.
for (auto &TU : TypeUnitsToAdd) {
if (useSplitDwarf())
TU.first->setSkeleton(constructSkeletonTU(*TU.first));
for (auto &TU : TypeUnitsToAdd)
InfoHolder.addUnit(std::move(TU.first));
}
}
CU.addDIETypeSignature(RefDie, NewTU);
}