aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2008-07-09 20:55:35 +0000
committerDale Johannesen <dalej@apple.com>2008-07-09 20:55:35 +0000
commit7bc39e227f13de9b1b1b0f633494be4182f7ba4b (patch)
treea45b9180ea10de1f0852bdc232f04b81bfe2d7a7 /lib
parentb126f3b534ca53da875f90d98b37a8b3fa53cba5 (diff)
downloadexternal_llvm-7bc39e227f13de9b1b1b0f633494be4182f7ba4b.zip
external_llvm-7bc39e227f13de9b1b1b0f633494be4182f7ba4b.tar.gz
external_llvm-7bc39e227f13de9b1b1b0f633494be4182f7ba4b.tar.bz2
Emit debug info for data-only files. This version
is X86 ATT only. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53355 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/X86/X86ATTAsmPrinter.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/Target/X86/X86ATTAsmPrinter.cpp b/lib/Target/X86/X86ATTAsmPrinter.cpp
index 51fc3bb..8c688f3 100644
--- a/lib/Target/X86/X86ATTAsmPrinter.cpp
+++ b/lib/Target/X86/X86ATTAsmPrinter.cpp
@@ -216,13 +216,6 @@ bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
const Function *F = MF.getFunction();
unsigned CC = F->getCallingConv();
- if (TAI->doesSupportDebugInformation()) {
- // Let PassManager know we need debug information and relay
- // the MachineModuleInfo address on to DwarfWriter.
- MMI = &getAnalysis<MachineModuleInfo>();
- DW.SetModuleInfo(MMI);
- }
-
SetupMachineFunction(MF);
O << "\n\n";
@@ -739,6 +732,14 @@ bool X86ATTAsmPrinter::doInitialization(Module &M) {
bool Result = AsmPrinter::doInitialization(M);
+ if (TAI->doesSupportDebugInformation()) {
+ // Let PassManager know we need debug information and relay
+ // the MachineModuleInfo address on to DwarfWriter.
+ // AsmPrinter::doInitialization did this analysis.
+ MMI = getAnalysisToUpdate<MachineModuleInfo>();
+ DW.SetModuleInfo(MMI);
+ }
+
// Darwin wants symbols to be quoted if they have complex names.
if (Subtarget->isTargetDarwin())
Mang->setUseQuotes(true);