Turns out AnalyzeBranch can modify the mbb being analyzed. This is a nasty
[oota-llvm.git] / lib / CodeGen / PrologEpilogInserter.cpp
index 4ebf742a4c316cb6040dfc426ac4e94453c9f963..39f96133bd19783ee1796f504989dfd5952a0c50 100644 (file)
@@ -56,7 +56,7 @@ namespace {
 
       // Get MachineModuleInfo so that we can track the construction of the
       // frame.
-      if (MachineModuleInfo *MMI = getAnalysisToUpdate<MachineModuleInfo>())
+      if (MachineModuleInfo *MMI = getAnalysisIfAvailable<MachineModuleInfo>())
         Fn.getFrameInfo()->setMachineModuleInfo(MMI);
 
       // Allow the target machine to make some adjustments to the function