summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCELFStreamer.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-11-01 17:07:14 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-11-01 17:07:14 +0000
commit13ddd6d41083ed8caa9a9e50de1707685f572306 (patch)
tree29477eab5e1a89dd7e39a345ddb7289e53446c02 /llvm/lib/MC/MCELFStreamer.cpp
parent0190a649e85e7f35ec3a61bd0d3dca917a9470da (diff)
downloadbcm5719-llvm-13ddd6d41083ed8caa9a9e50de1707685f572306.tar.gz
bcm5719-llvm-13ddd6d41083ed8caa9a9e50de1707685f572306.zip
Write the line info to .debug_line.
llvm-svn: 117930
Diffstat (limited to 'llvm/lib/MC/MCELFStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCELFStreamer.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCELFStreamer.cpp b/llvm/lib/MC/MCELFStreamer.cpp
index 7252c90c176..44c897b5559 100644
--- a/llvm/lib/MC/MCELFStreamer.cpp
+++ b/llvm/lib/MC/MCELFStreamer.cpp
@@ -511,6 +511,15 @@ void MCELFStreamer::EmitInstToData(const MCInst &Inst) {
}
void MCELFStreamer::Finish() {
+ // FIXME: duplicated code with the MachO streamer.
+ // Dump out the dwarf file & directory tables and line tables.
+ if (getContext().hasDwarfFiles()) {
+ const MCSection *DwarfLineSection =
+ getContext().getELFSection(".debug_line", 0, 0,
+ SectionKind::getDataRelLocal());
+ MCDwarfFileTable::Emit(this, DwarfLineSection);
+ }
+
for (std::vector<LocalCommon>::const_iterator i = LocalCommons.begin(),
e = LocalCommons.end();
i != e; ++i) {
OpenPOWER on IntegriCloud