From 0a017a6db249cda63852c1561406edd5bc150bcf Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 10 Dec 2010 07:39:47 +0000 Subject: Fixed version of 121434 with no new memory leaks. llvm-svn: 121471 --- llvm/lib/MC/MCELFStreamer.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'llvm/lib/MC/MCELFStreamer.cpp') diff --git a/llvm/lib/MC/MCELFStreamer.cpp b/llvm/lib/MC/MCELFStreamer.cpp index 18d8fa39edd..6900b247ce8 100644 --- a/llvm/lib/MC/MCELFStreamer.cpp +++ b/llvm/lib/MC/MCELFStreamer.cpp @@ -30,6 +30,7 @@ #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetAsmBackend.h" +#include "llvm/Target/TargetAsmInfo.h" using namespace llvm; @@ -478,14 +479,8 @@ 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); - } + if (!FrameInfos.empty()) + MCDwarfFrameEmitter::Emit(*this); for (std::vector::const_iterator i = LocalCommons.begin(), e = LocalCommons.end(); -- cgit v1.2.3