Skip to content

[mlir-tblgen] Use llvm::any_of (NFC) #102795

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions mlir/tools/mlir-tblgen/OmpOpGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading