[PM] Make AnalysisManager::registerPass take its parameter by universal reference.
Summary: Previously, we were forcing a copy if you passed an lvalue argument; now we'll take it by reference. Reviewers: chandlerc Subscribers: mehdi_amini, silvas, llvm-commits Differential Revision: https://reviews.llvm.org/D27370 llvm-svn: 288594
This commit is contained in:
parent
125b13abea
commit
9b085dd723
|
@ -548,7 +548,8 @@ public:
|
|||
/// interface also lends itself to minimizing the number of times we have to
|
||||
/// do lookups for analyses or construct complex passes only to throw them
|
||||
/// away.
|
||||
template <typename PassBuilderT> bool registerPass(PassBuilderT PassBuilder) {
|
||||
template <typename PassBuilderT>
|
||||
bool registerPass(PassBuilderT &&PassBuilder) {
|
||||
typedef decltype(PassBuilder()) PassT;
|
||||
typedef detail::AnalysisPassModel<IRUnitT, PassT, PreservedAnalyses,
|
||||
Invalidator, ExtraArgTs...>
|
||||
|
|
Loading…
Reference in New Issue