From 1fe44e4beff771a09992d8502cc54fad654771e7 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Fri, 22 Nov 2013 11:55:38 +0000 Subject: [PATCH] [PM] Reverse the template arguments 'PassT' and 'AnalysisManagerT' in several templates. The previous order didn't make any sense as it separated 'IRUnitT' and 'AnalysisManagerT', the types which are essentially paired and passed along together throughout the layers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195450 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/IR/PassManager.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/include/llvm/IR/PassManager.h b/include/llvm/IR/PassManager.h index 39dbc98179d..3ec4f6c71fb 100644 --- a/include/llvm/IR/PassManager.h +++ b/include/llvm/IR/PassManager.h @@ -169,7 +169,7 @@ template struct PassConcept { /// \brief SFINAE metafunction for computing whether \c PassT has a run method /// accepting an \c AnalysisManagerT. -template +template class PassRunAcceptsAnalysisManager { typedef char SmallType; struct BigType { char a, b; }; @@ -189,15 +189,15 @@ public: /// Can be instantiated for any object which provides a \c run method accepting /// an \c IRUnitT. It requires the pass to be a copyable object. When the /// \c run method also accepts an \c AnalysisManagerT*, we pass it along. -template ::Value> + IRUnitT, AnalysisManagerT, PassT>::Value> struct PassModel; /// \brief Specialization of \c PassModel for passes that accept an analyis /// manager. -template -struct PassModel +struct PassModel : PassConcept { PassModel(PassT Pass) : Pass(llvm_move(Pass)) {} virtual PassModel *clone() { return new PassModel(Pass); } @@ -209,8 +209,8 @@ struct PassModel -struct PassModel +struct PassModel : PassConcept { PassModel(PassT Pass) : Pass(llvm_move(Pass)) {} virtual PassModel *clone() { return new PassModel(Pass); } @@ -370,9 +370,9 @@ private: typedef detail::PassConcept ModulePassConcept; template struct ModulePassModel - : detail::PassModel { + : detail::PassModel { ModulePassModel(PassT Pass) - : detail::PassModel(Pass) {} + : detail::PassModel(Pass) {} }; std::vector > Passes; @@ -396,9 +396,9 @@ private: FunctionPassConcept; template struct FunctionPassModel - : detail::PassModel { + : detail::PassModel { FunctionPassModel(PassT Pass) - : detail::PassModel(Pass) {} + : detail::PassModel(Pass) {} }; std::vector > Passes;