summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCObjectStreamer.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-04-01 07:35:52 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-04-01 07:35:52 +0000
commit8bf66c4f3ff38bfe50a2855a7e48fc8d4bd026a5 (patch)
tree5d42e6e99090c1213e3831d3701d70d6befaace4 /llvm/lib/MC/MCObjectStreamer.cpp
parent8d265c26338559eb14bb21a1902d44a1d89bb055 (diff)
downloadbcm5719-llvm-8bf66c4f3ff38bfe50a2855a7e48fc8d4bd026a5.tar.gz
bcm5719-llvm-8bf66c4f3ff38bfe50a2855a7e48fc8d4bd026a5.zip
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) llvm-svn: 205286
Diffstat (limited to 'llvm/lib/MC/MCObjectStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCObjectStreamer.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/MC/MCObjectStreamer.cpp b/llvm/lib/MC/MCObjectStreamer.cpp
index 35786accb42..4451264cff6 100644
--- a/llvm/lib/MC/MCObjectStreamer.cpp
+++ b/llvm/lib/MC/MCObjectStreamer.cpp
@@ -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();
}
OpenPOWER on IntegriCloud