mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
Refactor how passes get a symbol at the end of a section.
There is now a canonical symbol at the end of a section that different passes can request. This also allows us to assert that we don't switch back to a section whose end symbol has already been printed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233026 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1664,15 +1664,8 @@ void DwarfDebug::emitDebugARanges() {
|
||||
const MCSection *Section = I.first;
|
||||
MCSymbol *Sym = nullptr;
|
||||
|
||||
if (Section) {
|
||||
// We can't call MCSection::getLabelEndName, as it's only safe to do so
|
||||
// if we know the section name up-front. For user-created sections, the
|
||||
// resulting label may not be valid to use as a label. (section names can
|
||||
// use a greater set of characters on some systems)
|
||||
Sym = Asm->createTempSymbol("debug_end");
|
||||
Asm->OutStreamer.SwitchSection(Section);
|
||||
Asm->OutStreamer.EmitLabel(Sym);
|
||||
}
|
||||
if (Section)
|
||||
Sym = Asm->OutStreamer.endSection(Section);
|
||||
|
||||
// Insert a final terminator.
|
||||
SectionMap[Section].push_back(SymbolCU(nullptr, Sym));
|
||||
|
Reference in New Issue
Block a user