[Mlir-commits] [mlir] [mlir] Use llvm::any_of and llvm::all_of (NFC) (PR #146947)
Jakub Kuderski
llvmlistbot at llvm.org
Thu Jul 3 13:05:23 PDT 2025
================
@@ -43,32 +43,22 @@ class TargetEnv {
bool allows(Profile prof) const { return enabledProfiles.count(prof) != 0; }
bool allowsAnyOf(ArrayRef<Profile> profs) const {
- const auto *chosen = llvm::find_if(
- profs, [this](tosa::Profile prof) { return allows(prof); });
- return chosen != profs.end() ? true : false;
+ return llvm::any_of(profs, [&](Profile prof) { return allows(prof); });
----------------
kuhar wrote:
Do we need the `&` capture here or could we explicitly use `this`?
Also in the other ones below.
https://github.com/llvm/llvm-project/pull/146947
More information about the Mlir-commits
mailing list