mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-12 06:06:19 +00:00
[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
This commit is contained in:
parent
0ef3c5a377
commit
f416c108a1
@ -236,24 +236,19 @@ public:
|
||||
}
|
||||
|
||||
template <typename PassT> void addPass(PassT Pass) {
|
||||
Passes.emplace_back(new PassModel<PassT>(std::move(Pass)));
|
||||
typedef detail::PassModel<IRUnitT, PassT> 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<IRUnitT> PassConcept;
|
||||
template <typename PassT>
|
||||
struct PassModel : detail::PassModel<IRUnitT, PassT> {
|
||||
PassModel(PassT Pass)
|
||||
: detail::PassModel<IRUnitT, PassT>(std::move(Pass)) {}
|
||||
};
|
||||
typedef detail::PassConcept<IRUnitT> PassConceptT;
|
||||
|
||||
PassManager(const PassManager &) LLVM_DELETED_FUNCTION;
|
||||
PassManager &operator=(const PassManager &) LLVM_DELETED_FUNCTION;
|
||||
|
||||
std::vector<std::unique_ptr<PassConcept>> Passes;
|
||||
std::vector<std::unique_ptr<PassConceptT>> Passes;
|
||||
};
|
||||
|
||||
/// \brief Convenience typedef for a pass manager over modules.
|
||||
|
Loading…
Reference in New Issue
Block a user