OSDN Git Service

Initial support for the cfi directives. This is just enough to get
[android-x86/external-llvm.git] / lib / MC / MCELFStreamer.cpp
index 18d8fa3..6900b24 100644 (file)
@@ -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<LocalCommon>::const_iterator i = LocalCommons.begin(),
                                                 e = LocalCommons.end();