factor some code better.
authorChris Lattner <sabre@nondot.org>
Wed, 24 Jun 2009 05:47:59 +0000 (05:47 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 24 Jun 2009 05:47:59 +0000 (05:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74067 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp

index f4196fd50706cc1478f187281c4b9f145a65d042..dedef3d08bd2ec7fc7a20114cf130e37ebd0869b 100644 (file)
@@ -1195,10 +1195,6 @@ bool X86ATTAsmPrinter::doFinalization(Module &M) {
         printHiddenGVStub(i->getKeyData());
     }
 
-    // Emit final debug information.
-    if (TAI->doesSupportDebugInformation() || TAI->doesSupportExceptionHandling())
-      DW->EndModule();
-
     // Funny Darwin hack: This flag tells the linker that no global symbols
     // contain code that falls through to other global symbols (e.g. the obvious
     // implementation of multiple entry points).  If this doesn't occur, the
@@ -1214,16 +1210,13 @@ bool X86ATTAsmPrinter::doFinalization(Module &M) {
         << ";\t.type\t" << (COFF::DT_FCN << COFF::N_BTSHFT)
         << ";\t.endef\n";
     }
-
-    // Emit final debug information.
-    if (TAI->doesSupportDebugInformation() || TAI->doesSupportExceptionHandling())
-      DW->EndModule();
-  } else if (Subtarget->isTargetELF()) {
-    // Emit final debug information.
-    if (TAI->doesSupportDebugInformation() || TAI->doesSupportExceptionHandling())
-      DW->EndModule();
   }
-
+  
+  // Emit final debug information.
+  if (TAI->doesSupportDebugInformation() || TAI->doesSupportExceptionHandling())
+    DW->EndModule();
+  
+  
   if (NewAsmPrinter) {
     Streamer->Finish();