[Mlir-commits] [mlir] 0801a37 - [mlir-tblgen] Use llvm::any_of (NFC) (#102795)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Aug 12 10:24:40 PDT 2024
Author: Kazu Hirata
Date: 2024-08-12T10:24:37-07:00
New Revision: 0801a37115ec54b7621ee63998c27ab919460a43
URL: https://github.com/llvm/llvm-project/commit/0801a37115ec54b7621ee63998c27ab919460a43
DIFF: https://github.com/llvm/llvm-project/commit/0801a37115ec54b7621ee63998c27ab919460a43.diff
LOG: [mlir-tblgen] Use llvm::any_of (NFC) (#102795)
Added:
Modified:
mlir/tools/mlir-tblgen/OmpOpGen.cpp
Removed:
################################################################################
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