diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp --- a/llvm/lib/Transforms/IPO/Inliner.cpp +++ b/llvm/lib/Transforms/IPO/Inliner.cpp @@ -1036,8 +1036,10 @@ else MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor( createDevirtSCCRepeatedPass(std::move(PM), MaxDevirtIterations))); - auto Ret = MPM.run(M, MAM); + MPM.run(M, MAM); IAA.clear(); - return Ret; + + // The ModulePassManager has already taken care of invalidating analyses. + return PreservedAnalyses::all(); }