aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC/MCELFStreamer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MC/MCELFStreamer.cpp')
-rw-r--r--lib/MC/MCELFStreamer.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/MC/MCELFStreamer.cpp b/lib/MC/MCELFStreamer.cpp
index 6900b24..18d8fa3 100644
--- a/lib/MC/MCELFStreamer.cpp
+++ b/lib/MC/MCELFStreamer.cpp
@@ -30,7 +30,6 @@
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetAsmBackend.h"
-#include "llvm/Target/TargetAsmInfo.h"
using namespace llvm;
@@ -479,8 +478,14 @@ void MCELFStreamer::EmitInstToData(const MCInst &Inst) {
}
void MCELFStreamer::Finish() {
- if (!FrameInfos.empty())
- MCDwarfFrameEmitter::Emit(*this);
+ // 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();