mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
DebugInfo: Emit relocation to debug_line section when emitting asm for asm
I don't think this is reachable by any frontend (why would you transform asm to asm+debug info?) but it helps tidy up some of this code, avoid the weird special case of "emit the first CU, store the label, then emit the rest" in MCDwarfLineTable::Emit by instead having the DWARF-for-assembly case use the same codepath as DwarfDebug.cpp, by registering the label of the debug_line section, thus causing it to be emitted. (with a special case in asm output to just emit the label since asm output uses the .loc directives, etc, rather than the debug_loc directly) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205286 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -383,14 +383,12 @@ void MCObjectStreamer::EmitZeros(uint64_t NumBytes) {
|
||||
}
|
||||
|
||||
void MCObjectStreamer::FinishImpl() {
|
||||
// Dump out the dwarf file & directory tables and line tables.
|
||||
const MCSymbol *LineSectionSymbol = NULL;
|
||||
if (getContext().hasMCLineSections())
|
||||
LineSectionSymbol = MCDwarfLineTable::Emit(this);
|
||||
|
||||
// If we are generating dwarf for assembly source files dump out the sections.
|
||||
if (getContext().getGenDwarfForAssembly())
|
||||
MCGenDwarfInfo::Emit(this, LineSectionSymbol);
|
||||
MCGenDwarfInfo::Emit(this);
|
||||
|
||||
// Dump out the dwarf file & directory tables and line tables.
|
||||
MCDwarfLineTable::Emit(this);
|
||||
|
||||
getAssembler().Finish();
|
||||
}
|
||||
|
Reference in New Issue
Block a user