[Mlir-commits] [mlir] [mlir-tblgen] Use llvm::any_of (NFC) (PR #102795)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sat Aug 10 23:56:23 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-core
@llvm/pr-subscribers-mlir
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/102795.diff
1 Files Affected:
- (modified) mlir/tools/mlir-tblgen/OmpOpGen.cpp (+5-6)
``````````diff
diff --git a/mlir/tools/mlir-tblgen/OmpOpGen.cpp b/mlir/tools/mlir-tblgen/OmpOpGen.cpp
index 51eb43f322e6ad..ffa2e17cc8f916 100644
--- a/mlir/tools/mlir-tblgen/OmpOpGen.cpp
+++ b/mlir/tools/mlir-tblgen/OmpOpGen.cpp
@@ -73,12 +73,11 @@ static StringRef extractOmpClauseName(Record *clause) {
static bool verifyArgument(DagInit *arguments, StringRef argName,
Init *argInit) {
auto range = zip_equal(arguments->getArgNames(), arguments->getArgs());
- return std::find_if(
- range.begin(), range.end(),
- [&](std::tuple<llvm::StringInit *const &, llvm::Init *const &> v) {
- return std::get<0>(v)->getAsUnquotedString() == argName &&
- std::get<1>(v) == argInit;
- }) != range.end();
+ return llvm::any_of(
+ range, [&](std::tuple<llvm::StringInit *const &, llvm::Init *const &> v) {
+ return std::get<0>(v)->getAsUnquotedString() == argName &&
+ std::get<1>(v) == argInit;
+ });
}
/// Check that the given string record value, identified by its name \c value,
``````````
</details>
https://github.com/llvm/llvm-project/pull/102795
More information about the Mlir-commits
mailing list