[Mlir-commits] [mlir] [mlir] Fix misleading comment for type trait (PR #103041)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Aug 13 03:49:39 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-core
Author: qazwsxedcrfvtg14 (qazwsxedcrfvtg14)
<details>
<summary>Changes</summary>
We are using `has_initialize` to check the class has `initialize` function instead of the `getOperationName` function.
---
Full diff: https://github.com/llvm/llvm-project/pull/103041.diff
1 Files Affected:
- (modified) mlir/include/mlir/IR/PatternMatch.h (+1-1)
``````````diff
diff --git a/mlir/include/mlir/IR/PatternMatch.h b/mlir/include/mlir/IR/PatternMatch.h
index ed7b9ece4a464..896fdf1c899e3 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>
``````````
</details>
https://github.com/llvm/llvm-project/pull/103041
More information about the Mlir-commits
mailing list