From: Chandler Carruth Date: Tue, 13 Jan 2015 11:36:43 +0000 (+0000) Subject: [PM] In the PassManager template, remove a pointless indirection through X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f416c108a1457ea566086278add7b8534bb1f7b5;p=llvm [PM] In the PassManager template, remove a pointless indirection through a nested class template for the PassModel, and use the T-suffix for the two typedefs to match the code in the AnalysisManager. This is the last of the fairly fundamental code cleanups here. Will be focusing on the printing of analyses next to finish that aspect off. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225785 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/IR/PassManager.h b/include/llvm/IR/PassManager.h index dfd0f1ab313..736c05deca0 100644 --- a/include/llvm/IR/PassManager.h +++ b/include/llvm/IR/PassManager.h @@ -236,24 +236,19 @@ public: } template void addPass(PassT Pass) { - Passes.emplace_back(new PassModel(std::move(Pass))); + typedef detail::PassModel PassModelT; + Passes.emplace_back(new PassModelT(std::move(Pass))); } static StringRef name() { return "PassManager"; } private: - // Pull in the concept type and model template specialized for modules. - typedef detail::PassConcept PassConcept; - template - struct PassModel : detail::PassModel { - PassModel(PassT Pass) - : detail::PassModel(std::move(Pass)) {} - }; + typedef detail::PassConcept PassConceptT; PassManager(const PassManager &) LLVM_DELETED_FUNCTION; PassManager &operator=(const PassManager &) LLVM_DELETED_FUNCTION; - std::vector> Passes; + std::vector> Passes; }; /// \brief Convenience typedef for a pass manager over modules.