From 605d38657ace30c01e3c76d1bad5cb2f19970701 Mon Sep 17 00:00:00 2001 From: Dale Johannesen Date: Wed, 9 Jul 2008 20:55:35 +0000 Subject: Emit debug info for data-only files. This version is X86 ATT only. llvm-svn: 53355 --- llvm/lib/Target/X86/X86ATTAsmPrinter.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'llvm/lib') diff --git a/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp b/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp index 51fc3bb3df1..8c688f354fa 100644 --- a/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp +++ b/llvm/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(); - 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(); + DW.SetModuleInfo(MMI); + } + // Darwin wants symbols to be quoted if they have complex names. if (Subtarget->isTargetDarwin()) Mang->setUseQuotes(true); -- cgit v1.2.3