aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp4
-rw-r--r--lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp6
-rw-r--r--lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp3
-rw-r--r--lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp9
-rw-r--r--lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp5
-rw-r--r--lib/Target/XCore/XCoreAsmPrinter.cpp3
6 files changed, 4 insertions, 26 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 2b1b48f60e..bf4af42628 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -192,6 +192,10 @@ bool AsmPrinter::doInitialization(Module &M) {
}
bool AsmPrinter::doFinalization(Module &M) {
+ // Emit final debug information.
+ if (TAI->doesSupportDebugInformation() || TAI->doesSupportExceptionHandling())
+ DW->EndModule();
+
// If the target wants to know about weak references, print them all.
if (TAI->getWeakRefDirective()) {
// FIXME: This is not lazy, it would be nice to only print weak references
diff --git a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
index fcc30c1c65..b4616cd6e7 100644
--- a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
+++ b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
@@ -1118,18 +1118,12 @@ bool ARMAsmPrinter::doFinalization(Module &M) {
}
- // Emit initial debug information.
- 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
// linker can safely perform dead code stripping. Since LLVM never
// generates code that does this, it is always safe to set.
O << "\t.subsections_via_symbols\n";
- } else {
- // Emit final debug information for ELF.
- DW->EndModule();
}
return AsmPrinter::doFinalization(M);
diff --git a/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp b/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp
index e31163ed60..6f0bd98b31 100644
--- a/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp
+++ b/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp
@@ -591,9 +591,6 @@ bool LinuxAsmPrinter::doFinalization(Module &M) {
I != E; ++I)
printModuleLevelGV(I);
- // Emit initial debug information.
- DW->EndModule();
-
return AsmPrinter::doFinalization(M);
}
diff --git a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp b/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
index a77c8134bf..08b0de593d 100644
--- a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
+++ b/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
@@ -746,11 +746,6 @@ bool PPCLinuxAsmPrinter::doFinalization(Module &M) {
I != E; ++I)
printModuleLevelGV(I);
- // TODO
-
- // Emit initial debug information.
- DW->EndModule();
-
return AsmPrinter::doFinalization(M);
}
@@ -1120,10 +1115,6 @@ bool PPCDarwinAsmPrinter::doFinalization(Module &M) {
}
}
-
- // Emit initial debug information.
- 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
diff --git a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
index cb75531818..b8a9727fcd 100644
--- a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
+++ b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
@@ -1172,11 +1172,6 @@ bool X86ATTAsmPrinter::doFinalization(Module &M) {
O << "\t.ascii \" -export:" << i->getKeyData() << "\"\n";
}
- // Emit final debug information.
- // FIXME: Sink into DoFinalization.
- if (TAI->doesSupportDebugInformation() || TAI->doesSupportExceptionHandling())
- DW->EndModule();
-
// Do common shutdown.
bool Changed = AsmPrinter::doFinalization(M);
diff --git a/lib/Target/XCore/XCoreAsmPrinter.cpp b/lib/Target/XCore/XCoreAsmPrinter.cpp
index b87d88fb99..4ab5d75e5b 100644
--- a/lib/Target/XCore/XCoreAsmPrinter.cpp
+++ b/lib/Target/XCore/XCoreAsmPrinter.cpp
@@ -436,8 +436,5 @@ bool XCoreAsmPrinter::doFinalization(Module &M) {
emitGlobal(I);
}
- // Emit final debug information.
- DW->EndModule();
-
return AsmPrinter::doFinalization(M);
}