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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288594
91177308-0d34-0410-b5e6-
96231b3b80d8
/// 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...>