[Mlir-commits] [mlir] [mlir-tblgen] Use llvm::any_of (NFC) (PR #102795)
Kazu Hirata
llvmlistbot at llvm.org
Sat Aug 10 23:55:52 PDT 2024
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/102795
None
>From b9d87ae3ef256099e8d8274686195813b8a681d5 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sat, 10 Aug 2024 23:45:52 -0700
Subject: [PATCH] [mlir-tblgen] Use llvm::any_of (NFC)
---
mlir/tools/mlir-tblgen/OmpOpGen.cpp | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
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,
More information about the Mlir-commits
mailing list