mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-18 11:24:01 +00:00
Remove the unused string section symbol parameter from DwarfFile::emitStrings
And since it /looked/ like the DwarfStrSectionSym was unused, I tried removing it - but then it turned out that DwarfStringPool was reconstructing the same label (and expecting it to have already been emitted) and uses that. So I kept it around, but wanted to pass it in to users - since it seemed a bit silly for DwarfStringPool to have it passed in and returned but itself have no use for it. The only two users don't handle strings in both .dwo and .o files so they only ever need the one symbol - no need to keep it (and have an unused symbol) in the DwarfStringPool used for fission/.dwo. Refactor a bunch of accelerator table usage to remove duplication so I didn't have to touch 4-5 callers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217628 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1880,54 +1880,41 @@ void DwarfDebug::emitEndOfLineMatrix(unsigned SectionEnd) {
|
||||
Asm->EmitInt8(1);
|
||||
}
|
||||
|
||||
// Emit visible names into a hashed accelerator table section.
|
||||
void DwarfDebug::emitAccelNames() {
|
||||
AccelNames.FinalizeTable(Asm, "Names");
|
||||
Asm->OutStreamer.SwitchSection(
|
||||
Asm->getObjFileLowering().getDwarfAccelNamesSection());
|
||||
MCSymbol *SectionBegin = Asm->GetTempSymbol("names_begin");
|
||||
void DwarfDebug::emitAccel(DwarfAccelTable &Accel, const MCSection *Section,
|
||||
StringRef TableName, StringRef SymName) {
|
||||
Accel.FinalizeTable(Asm, TableName);
|
||||
Asm->OutStreamer.SwitchSection(Section);
|
||||
auto *SectionBegin = Asm->GetTempSymbol(SymName);
|
||||
Asm->OutStreamer.EmitLabel(SectionBegin);
|
||||
|
||||
// Emit the full data.
|
||||
AccelNames.Emit(Asm, SectionBegin, &InfoHolder);
|
||||
Accel.Emit(Asm, SectionBegin, &InfoHolder, DwarfStrSectionSym);
|
||||
}
|
||||
|
||||
// Emit visible names into a hashed accelerator table section.
|
||||
void DwarfDebug::emitAccelNames() {
|
||||
emitAccel(AccelNames, Asm->getObjFileLowering().getDwarfAccelNamesSection(),
|
||||
"Names", "names_begin");
|
||||
}
|
||||
|
||||
// Emit objective C classes and categories into a hashed accelerator table
|
||||
// section.
|
||||
void DwarfDebug::emitAccelObjC() {
|
||||
AccelObjC.FinalizeTable(Asm, "ObjC");
|
||||
Asm->OutStreamer.SwitchSection(
|
||||
Asm->getObjFileLowering().getDwarfAccelObjCSection());
|
||||
MCSymbol *SectionBegin = Asm->GetTempSymbol("objc_begin");
|
||||
Asm->OutStreamer.EmitLabel(SectionBegin);
|
||||
|
||||
// Emit the full data.
|
||||
AccelObjC.Emit(Asm, SectionBegin, &InfoHolder);
|
||||
emitAccel(AccelObjC, Asm->getObjFileLowering().getDwarfAccelObjCSection(),
|
||||
"ObjC", "objc_begin");
|
||||
}
|
||||
|
||||
// Emit namespace dies into a hashed accelerator table.
|
||||
void DwarfDebug::emitAccelNamespaces() {
|
||||
AccelNamespace.FinalizeTable(Asm, "namespac");
|
||||
Asm->OutStreamer.SwitchSection(
|
||||
Asm->getObjFileLowering().getDwarfAccelNamespaceSection());
|
||||
MCSymbol *SectionBegin = Asm->GetTempSymbol("namespac_begin");
|
||||
Asm->OutStreamer.EmitLabel(SectionBegin);
|
||||
|
||||
// Emit the full data.
|
||||
AccelNamespace.Emit(Asm, SectionBegin, &InfoHolder);
|
||||
emitAccel(AccelNamespace,
|
||||
Asm->getObjFileLowering().getDwarfAccelNamespaceSection(),
|
||||
"namespac", "namespac_begin");
|
||||
}
|
||||
|
||||
// Emit type dies into a hashed accelerator table.
|
||||
void DwarfDebug::emitAccelTypes() {
|
||||
|
||||
AccelTypes.FinalizeTable(Asm, "types");
|
||||
Asm->OutStreamer.SwitchSection(
|
||||
Asm->getObjFileLowering().getDwarfAccelTypesSection());
|
||||
MCSymbol *SectionBegin = Asm->GetTempSymbol("types_begin");
|
||||
Asm->OutStreamer.EmitLabel(SectionBegin);
|
||||
|
||||
// Emit the full data.
|
||||
AccelTypes.Emit(Asm, SectionBegin, &InfoHolder);
|
||||
emitAccel(AccelTypes, Asm->getObjFileLowering().getDwarfAccelTypesSection(),
|
||||
"types", "types_begin");
|
||||
}
|
||||
|
||||
// Public name handling.
|
||||
@ -2524,9 +2511,8 @@ void DwarfDebug::emitDebugStrDWO() {
|
||||
assert(useSplitDwarf() && "No split dwarf?");
|
||||
const MCSection *OffSec =
|
||||
Asm->getObjFileLowering().getDwarfStrOffDWOSection();
|
||||
const MCSymbol *StrSym = DwarfStrSectionSym;
|
||||
InfoHolder.emitStrings(Asm->getObjFileLowering().getDwarfStrDWOSection(),
|
||||
OffSec, StrSym);
|
||||
OffSec);
|
||||
}
|
||||
|
||||
MCDwarfDwoLineTable *DwarfDebug::getDwoLineTable(const DwarfCompileUnit &CU) {
|
||||
|
Reference in New Issue
Block a user