diff --git a/llvm/include/llvm/Analysis/CGSCCPassManager.h b/llvm/include/llvm/Analysis/CGSCCPassManager.h --- a/llvm/include/llvm/Analysis/CGSCCPassManager.h +++ b/llvm/include/llvm/Analysis/CGSCCPassManager.h @@ -391,7 +391,8 @@ PreservedAnalyses, CGSCCAnalysisManager, LazyCallGraph &, CGSCCUpdateResult &>; return ModuleToPostOrderCGSCCPassAdaptor( - std::make_unique(std::forward(Pass))); + std::unique_ptr( + new PassModelT(std::forward(Pass)))); } /// A proxy from a \c FunctionAnalysisManager to an \c SCC. @@ -516,7 +517,8 @@ detail::PassModel; return CGSCCToFunctionPassAdaptor( - std::make_unique(std::forward(Pass))); + std::unique_ptr( + new PassModelT(std::forward(Pass)))); } /// A helper that repeats an SCC pass each time an indirect call is refined to @@ -569,7 +571,8 @@ PreservedAnalyses, CGSCCAnalysisManager, LazyCallGraph &, CGSCCUpdateResult &>; return DevirtSCCRepeatedPass( - std::make_unique(std::forward(Pass)), + std::unique_ptr( + new PassModelT(std::forward(Pass))), MaxIterations); } diff --git a/llvm/include/llvm/IR/PassManager.h b/llvm/include/llvm/IR/PassManager.h --- a/llvm/include/llvm/IR/PassManager.h +++ b/llvm/include/llvm/IR/PassManager.h @@ -1227,7 +1227,8 @@ FunctionAnalysisManager>; return ModuleToFunctionPassAdaptor( - std::make_unique(std::forward(Pass))); + std::unique_ptr( + new PassModelT(std::forward(Pass)))); } /// A utility pass template to force an analysis result to be available. diff --git a/llvm/include/llvm/Transforms/Scalar/LoopPassManager.h b/llvm/include/llvm/Transforms/Scalar/LoopPassManager.h --- a/llvm/include/llvm/Transforms/Scalar/LoopPassManager.h +++ b/llvm/include/llvm/Transforms/Scalar/LoopPassManager.h @@ -468,8 +468,9 @@ detail::PassModel; return FunctionToLoopPassAdaptor( - std::make_unique(std::forward(Pass)), UseMemorySSA, - UseBlockFrequencyInfo, false); + std::unique_ptr( + new PassModelT(std::forward(Pass))), + UseMemorySSA, UseBlockFrequencyInfo, false); } /// If \p Pass is a loop-nest pass, \p Pass will first be wrapped into a @@ -485,8 +486,10 @@ detail::PassModel; - return FunctionToLoopPassAdaptor(std::make_unique(std::move(LPM)), - UseMemorySSA, UseBlockFrequencyInfo, true); + return FunctionToLoopPassAdaptor( + std::unique_ptr( + new PassModelT(std::move(LPM))), + UseMemorySSA, UseBlockFrequencyInfo, true); } /// If \p Pass is an instance of \c LoopPassManager, the returned adaptor will @@ -503,9 +506,10 @@ LoopAnalysisManager, LoopStandardAnalysisResults &, LPMUpdater &>; bool LoopNestMode = (LPM.getNumLoopPasses() == 0); - return FunctionToLoopPassAdaptor(std::make_unique(std::move(LPM)), - UseMemorySSA, UseBlockFrequencyInfo, - LoopNestMode); + return FunctionToLoopPassAdaptor( + std::unique_ptr( + new PassModelT(std::move(LPM))), + UseMemorySSA, UseBlockFrequencyInfo, LoopNestMode); } /// Pass for printing a loop's contents as textual IR.