[llvm] [PatternMatch][VPlan] Add std::function match overload. NFCI (PR #146374)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 30 09:18:14 PDT 2025
================
@@ -50,6 +50,11 @@ template <typename Val, typename Pattern> bool match(Val *V, const Pattern &P) {
return P.match(V);
}
+template <typename Val = const Value, typename Pattern>
+std::function<bool(Val *)> match(const Pattern &P) {
----------------
nikic wrote:
Needs to be implemented in a way that does not use std::function. You probably need to create a dedicated functor class for this.
I'm also not sure this should be just an overload of match(). Maybe something more explicit like match_fn()?
https://github.com/llvm/llvm-project/pull/146374
More information about the llvm-commits
mailing list