diff options
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | 9 | 
1 files changed, 6 insertions, 3 deletions
| diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp index 9c9dd391be7..ae967a8d00f 100644 --- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -790,9 +790,6 @@ std::string DarwinAsmPrinter::getSectionForFunction(const Function &F) const {  /// method to print assembly for each instruction.  ///  bool DarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) { -  // We need this for Personality functions. -  MMI = &getAnalysis<MachineModuleInfo>(); -  DW.SetModuleInfo(MMI);    SetupMachineFunction(MF);    O << "\n\n"; @@ -887,6 +884,12 @@ bool DarwinAsmPrinter::doInitialization(Module &M) {    bool Result = AsmPrinter::doInitialization(M); +  // We need this for Personality functions. +  // AsmPrinter::doInitialization should have done this analysis. +  MMI = getAnalysisToUpdate<MachineModuleInfo>(); +  assert(MMI); +  DW.SetModuleInfo(MMI); +    // Darwin wants symbols to be quoted if they have complex names.    Mang->setUseQuotes(true); | 

