[Mlir-commits] [mlir] [mlir] Fix misleading comment for type trait (PR #103041)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Aug 13 03:48:48 PDT 2024
https://github.com/qazwsxedcrfvtg14 created https://github.com/llvm/llvm-project/pull/103041
We are using `has_initialize` to check the class has `initialize` function instead of the `getOperationName` function.
>From 92dd2e9f9a248c4714743d0ff858a89c4bea241a Mon Sep 17 00:00:00 2001
From: qazwsxedcrfvtg14 <yich at google.com>
Date: Tue, 13 Aug 2024 18:41:40 +0800
Subject: [PATCH] [mlir] Fix misleading comment for type trait
We are using `has_initialize` to check the class has `initialize` function instead of the `getOperationName` function.
---
mlir/include/mlir/IR/PatternMatch.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mlir/include/mlir/IR/PatternMatch.h b/mlir/include/mlir/IR/PatternMatch.h
index ed7b9ece4a464b..896fdf1c899e3d 100644
--- a/mlir/include/mlir/IR/PatternMatch.h
+++ b/mlir/include/mlir/IR/PatternMatch.h
@@ -289,7 +289,7 @@ class RewritePattern : public Pattern {
using Pattern::Pattern;
private:
- /// Trait to check if T provides a `getOperationName` method.
+ /// Trait to check if T provides a `initialize` method.
template <typename T, typename... Args>
using has_initialize = decltype(std::declval<T>().initialize());
template <typename T>
More information about the Mlir-commits
mailing list