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";
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);