diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-11-01 17:07:14 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-11-01 17:07:14 +0000 |
commit | 13ddd6d41083ed8caa9a9e50de1707685f572306 (patch) | |
tree | 29477eab5e1a89dd7e39a345ddb7289e53446c02 /llvm/lib/MC/MCELFStreamer.cpp | |
parent | 0190a649e85e7f35ec3a61bd0d3dca917a9470da (diff) | |
download | bcm5719-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.cpp | 9 |
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) { |