forked from OSchip/llvm-project
DebugInfo: Remove unused start/end labels for the debug_abbrevs section
Since we always emit only one abbrevation section (shared by all the compilation units in this module) there's no need for a separate label at the start of each one (and we weren't using the CU ID anyway, so there really was only one label). Use the section label instead and drop the wholely unused debug_abbrev_end label. llvm-svn: 196394
This commit is contained in:
parent
cbb51dacfb
commit
91db9ab1b4
|
@ -2186,9 +2186,6 @@ void DwarfDebug::emitAbbrevs(const MCSection *Section,
|
|||
// Start the debug abbrev section.
|
||||
Asm->OutStreamer.SwitchSection(Section);
|
||||
|
||||
MCSymbol *Begin = Asm->GetTempSymbol(Section->getLabelBeginName());
|
||||
Asm->OutStreamer.EmitLabel(Begin);
|
||||
|
||||
// For each abbrevation.
|
||||
for (unsigned i = 0, N = Abbrevs->size(); i < N; ++i) {
|
||||
// Get abbreviation data
|
||||
|
@ -2203,9 +2200,6 @@ void DwarfDebug::emitAbbrevs(const MCSection *Section,
|
|||
|
||||
// Mark end of abbreviations.
|
||||
Asm->EmitULEB128(0, "EOM(3)");
|
||||
|
||||
MCSymbol *End = Asm->GetTempSymbol(Section->getLabelEndName());
|
||||
Asm->OutStreamer.EmitLabel(End);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1980,8 +1980,10 @@ void Unit::emitHeader(const MCSection *ASection, const MCSymbol *ASectionSym) {
|
|||
Asm->OutStreamer.AddComment("DWARF version number");
|
||||
Asm->EmitInt16(DD->getDwarfVersion());
|
||||
Asm->OutStreamer.AddComment("Offset Into Abbrev. Section");
|
||||
Asm->EmitSectionOffset(Asm->GetTempSymbol(ASection->getLabelBeginName()),
|
||||
ASectionSym);
|
||||
// We share one abbreviations table across all compilation units so it's
|
||||
// always at the start of the section. Use a relocatable offset where needed
|
||||
// to ensure linking doesn't invalidate that offset.
|
||||
Asm->EmitSectionOffset(ASectionSym, ASectionSym);
|
||||
Asm->OutStreamer.AddComment("Address Size (in bytes)");
|
||||
Asm->EmitInt8(Asm->getDataLayout().getPointerSize());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue