mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
Reapply "DebugInfo: Don't put fission type units in comdat sections."
This recommits r208930, r208933, and r208975 (by reverting r209338) and reverts r209529 (the FIXME to readd this functionality once the tools were fixed) now that DWP has been fixed to cope with a single section for all fission type units. Original commit message: "Since type units in the dwo file are handled by a debug aware tool, they don't need to leverage the ELF comdat grouping to implement deduplication. Avoid creating all the .group sections for these as a space optimization." git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213956 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1640,9 +1640,12 @@ void DwarfDebug::emitSectionLabels() {
|
||||
// Dwarf sections base addresses.
|
||||
DwarfInfoSectionSym =
|
||||
emitSectionSym(Asm, TLOF.getDwarfInfoSection(), "section_info");
|
||||
if (useSplitDwarf())
|
||||
if (useSplitDwarf()) {
|
||||
DwarfInfoDWOSectionSym =
|
||||
emitSectionSym(Asm, TLOF.getDwarfInfoDWOSection(), "section_info_dwo");
|
||||
DwarfTypesDWOSectionSym =
|
||||
emitSectionSym(Asm, TLOF.getDwarfTypesDWOSection(), "section_types_dwo");
|
||||
}
|
||||
DwarfAbbrevSectionSym =
|
||||
emitSectionSym(Asm, TLOF.getDwarfAbbrevSection(), "section_abbrev");
|
||||
if (useSplitDwarf())
|
||||
@ -2406,9 +2409,9 @@ void DwarfDebug::addDwarfTypeUnitType(DwarfCompileUnit &CU,
|
||||
bool TopLevelType = TypeUnitsUnderConstruction.empty();
|
||||
AddrPool.resetUsedFlag();
|
||||
|
||||
auto OwnedUnit =
|
||||
make_unique<DwarfTypeUnit>(InfoHolder.getUnits().size(), CU, Asm, this,
|
||||
&InfoHolder, getDwoLineTable(CU));
|
||||
auto OwnedUnit = make_unique<DwarfTypeUnit>(
|
||||
InfoHolder.getUnits().size() + TypeUnitsUnderConstruction.size(), CU, Asm,
|
||||
this, &InfoHolder, getDwoLineTable(CU));
|
||||
DwarfTypeUnit &NewTU = *OwnedUnit;
|
||||
DIE &UnitDie = NewTU.getUnitDie();
|
||||
TU = &NewTU;
|
||||
@ -2421,15 +2424,14 @@ void DwarfDebug::addDwarfTypeUnitType(DwarfCompileUnit &CU,
|
||||
uint64_t Signature = makeTypeSignature(Identifier);
|
||||
NewTU.setTypeSignature(Signature);
|
||||
|
||||
if (!useSplitDwarf())
|
||||
if (useSplitDwarf())
|
||||
NewTU.initSection(Asm->getObjFileLowering().getDwarfTypesDWOSection(),
|
||||
DwarfTypesDWOSectionSym);
|
||||
else {
|
||||
CU.applyStmtList(UnitDie);
|
||||
|
||||
// FIXME: Skip using COMDAT groups for type units in the .dwo file once tools
|
||||
// such as DWP ( http://gcc.gnu.org/wiki/DebugFissionDWP ) can cope with it.
|
||||
NewTU.initSection(
|
||||
useSplitDwarf()
|
||||
? Asm->getObjFileLowering().getDwarfTypesDWOSection(Signature)
|
||||
: Asm->getObjFileLowering().getDwarfTypesSection(Signature));
|
||||
NewTU.initSection(
|
||||
Asm->getObjFileLowering().getDwarfTypesSection(Signature));
|
||||
}
|
||||
|
||||
NewTU.setType(NewTU.createTypeDIE(CTy));
|
||||
|
||||
|
Reference in New Issue
Block a user