diff --git a/include/llvm/Analysis/CGSCCPassManager.h b/include/llvm/Analysis/CGSCCPassManager.h index ed2289ce99a..2f796b9df7c 100644 --- a/include/llvm/Analysis/CGSCCPassManager.h +++ b/include/llvm/Analysis/CGSCCPassManager.h @@ -52,7 +52,7 @@ public: private: // Pull in the concept type and model template specialized for SCCs. typedef detail::PassConcept - CGSCCPassConcept; + CGSCCPassConcept; template struct CGSCCPassModel : detail::PassModel { @@ -69,12 +69,13 @@ private: /// \brief A function analysis manager to coordinate and cache analyses run over /// a module. -class CGSCCAnalysisManager : public detail::AnalysisManagerBase< - CGSCCAnalysisManager, LazyCallGraph::SCC> { +class CGSCCAnalysisManager + : public detail::AnalysisManagerBase { friend class detail::AnalysisManagerBase; - typedef detail::AnalysisManagerBase BaseT; + typedef detail::AnalysisManagerBase + BaseT; typedef BaseT::ResultConceptT ResultConceptT; typedef BaseT::PassConceptT PassConceptT; @@ -127,13 +128,14 @@ private: /// Requires iterators to be valid across appending new entries and arbitrary /// erases. Provides both the pass ID and concept pointer such that it is /// half of a bijection and provides storage for the actual result concept. - typedef std::list< - std::pair>>> CGSCCAnalysisResultListT; + typedef std::list>>> + CGSCCAnalysisResultListT; /// \brief Map type from function pointer to our custom list type. typedef DenseMap - CGSCCAnalysisResultListMapT; + CGSCCAnalysisResultListMapT; /// \brief Map from function to a list of function analysis results. /// @@ -201,8 +203,7 @@ public: : CGAM(&CGAM) {} // We have to explicitly define all the special member functions because MSVC // refuses to generate them. - CGSCCAnalysisManagerModuleProxy( - const CGSCCAnalysisManagerModuleProxy &Arg) + CGSCCAnalysisManagerModuleProxy(const CGSCCAnalysisManagerModuleProxy &Arg) : CGAM(Arg.CGAM) {} CGSCCAnalysisManagerModuleProxy(CGSCCAnalysisManagerModuleProxy &&Arg) : CGAM(std::move(Arg.CGAM)) {} @@ -273,8 +274,7 @@ public: : MAM(&MAM) {} // We have to explicitly define all the special member functions because MSVC // refuses to generate them. - ModuleAnalysisManagerCGSCCProxy( - const ModuleAnalysisManagerCGSCCProxy &Arg) + ModuleAnalysisManagerCGSCCProxy(const ModuleAnalysisManagerCGSCCProxy &Arg) : MAM(Arg.MAM) {} ModuleAnalysisManagerCGSCCProxy(ModuleAnalysisManagerCGSCCProxy &&Arg) : MAM(std::move(Arg.MAM)) {} @@ -541,7 +541,8 @@ public: : Pass(Arg.Pass) {} CGSCCToFunctionPassAdaptor(CGSCCToFunctionPassAdaptor &&Arg) : Pass(std::move(Arg.Pass)) {} - friend void swap(CGSCCToFunctionPassAdaptor &LHS, CGSCCToFunctionPassAdaptor &RHS) { + friend void swap(CGSCCToFunctionPassAdaptor &LHS, + CGSCCToFunctionPassAdaptor &RHS) { using std::swap; swap(LHS.Pass, RHS.Pass); } @@ -597,7 +598,6 @@ CGSCCToFunctionPassAdaptor createCGSCCToFunctionPassAdaptor(FunctionPassT Pass) { return std::move(CGSCCToFunctionPassAdaptor(std::move(Pass))); } - } #endif diff --git a/include/llvm/IR/PassManager.h b/include/llvm/IR/PassManager.h index 8f82697ac2d..156b93cb98f 100644 --- a/include/llvm/IR/PassManager.h +++ b/include/llvm/IR/PassManager.h @@ -203,8 +203,7 @@ public: private: // Pull in the concept type and model template specialized for modules. - typedef detail::PassConcept - ModulePassConcept; + typedef detail::PassConcept ModulePassConcept; template struct ModulePassModel : detail::PassModel { @@ -474,8 +473,7 @@ private: class FunctionAnalysisManager : public detail::AnalysisManagerBase { friend class detail::AnalysisManagerBase; - typedef detail::AnalysisManagerBase - BaseT; + typedef detail::AnalysisManagerBase BaseT; typedef BaseT::ResultConceptT ResultConceptT; typedef BaseT::PassConceptT PassConceptT; @@ -830,8 +828,7 @@ template struct InvalidateAnalysisPass { /// analysis passes to be re-run to produce fresh results if any are needed. struct InvalidateAllAnalysesPass { /// \brief Run this pass over some unit of IR. - template - PreservedAnalyses run(T &&Arg) { + template PreservedAnalyses run(T &&Arg) { return PreservedAnalyses::none(); } diff --git a/lib/Analysis/CGSCCPassManager.cpp b/lib/Analysis/CGSCCPassManager.cpp index d8f5e6c0423..9c24c1084ea 100644 --- a/lib/Analysis/CGSCCPassManager.cpp +++ b/lib/Analysis/CGSCCPassManager.cpp @@ -14,8 +14,8 @@ using namespace llvm; static cl::opt -DebugPM("debug-cgscc-pass-manager", cl::Hidden, - cl::desc("Print CGSCC pass management debugging information")); + DebugPM("debug-cgscc-pass-manager", cl::Hidden, + cl::desc("Print CGSCC pass management debugging information")); PreservedAnalyses CGSCCPassManager::run(LazyCallGraph::SCC &C, CGSCCAnalysisManager *AM) { diff --git a/lib/IR/PassManager.cpp b/lib/IR/PassManager.cpp index 907baeabeea..74154cc2f2a 100644 --- a/lib/IR/PassManager.cpp +++ b/lib/IR/PassManager.cpp @@ -107,8 +107,8 @@ PreservedAnalyses ModuleAnalysisManager::invalidateImpl(Module &M, // of the analysis manager is required for this invalidation event. if (I->second->invalidate(M, PA)) { if (DebugPM) - dbgs() << "Invalidating module analysis: " - << lookupPass(PassID).name() << "\n"; + dbgs() << "Invalidating module analysis: " << lookupPass(PassID).name() + << "\n"; ModuleAnalysisResults.erase(I); }