[llvm] [PatternMatching] Add generic API for matching constants using custom conditions (PR #85676)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 18 22:09:12 PDT 2024


================
@@ -384,16 +387,17 @@ struct cstval_pred_ty : public Predicate {
 };
 
 /// specialization of cstval_pred_ty for ConstantInt
-template <typename Predicate>
-using cst_pred_ty = cstval_pred_ty<Predicate, ConstantInt>;
+template <typename Predicate, bool AllowUndefs = true>
----------------
dtcxzyw wrote:

I would make `AllowUndefs` explicit or default to false.


https://github.com/llvm/llvm-project/pull/85676


More information about the llvm-commits mailing list