diff options
Diffstat (limited to 'llvm/lib/Target/X86/X86ATTAsmPrinter.cpp')
| -rw-r--r-- | llvm/lib/Target/X86/X86ATTAsmPrinter.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp b/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp index a61bb2261d6..4e1c1dfde1d 100644 --- a/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp +++ b/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp @@ -232,13 +232,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"; @@ -751,13 +744,20 @@ void X86ATTAsmPrinter::printMachineInstruction(const MachineInstr *MI) { /// doInitialization bool X86ATTAsmPrinter::doInitialization(Module &M) { + + bool Result = AsmPrinter::doInitialization(M); + if (TAI->doesSupportDebugInformation()) { // Emit initial debug information. DW.BeginModule(&M); + // Let PassManager know we need debug information and relay + // the MachineModuleInfo address on to DwarfWriter. + // AsmPrinter::doInitialization should have done this analysis. + MMI = getAnalysisToUpdate<MachineModuleInfo>(); + assert(MMI); + DW.SetModuleInfo(MMI); } - bool Result = AsmPrinter::doInitialization(M); - // Darwin wants symbols to be quoted if they have complex names. if (Subtarget->isTargetDarwin()) Mang->setUseQuotes(true); |

