llvm.org GIT mirror llvm / f416c10
[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 Chandler Carruth 5 years ago
1 changed file(s) with 4 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
235235 }
236236
237237 template void addPass(PassT Pass) {
238 Passes.emplace_back(new PassModel(std::move(Pass)));
238 typedef detail::PassModel PassModelT;
239 Passes.emplace_back(new PassModelT(std::move(Pass)));
239240 }
240241
241242 static StringRef name() { return "PassManager"; }
242243
243244 private:
244 // Pull in the concept type and model template specialized for modules.
245 typedef detail::PassConcept PassConcept;
246 template
247 struct PassModel : detail::PassModel {
248 PassModel(PassT Pass)
249 : detail::PassModel(std::move(Pass)) {}
250 };
245 typedef detail::PassConcept PassConceptT;
251246
252247 PassManager(const PassManager &) LLVM_DELETED_FUNCTION;
253248 PassManager &operator=(const PassManager &) LLVM_DELETED_FUNCTION;
254249
255 std::vector>> Passes;
250 std::vectorT>> Passes;
256251 };
257252
258253 /// \brief Convenience typedef for a pass manager over modules.