File tree Expand file tree Collapse file tree 4 files changed +13
-18
lines changed Expand file tree Collapse file tree 4 files changed +13
-18
lines changed Original file line number Diff line number Diff line change @@ -98,9 +98,8 @@ class CallOpRewriter : public mlir::OpRewritePattern<fir::CallOp> {
98
98
assert (!builder.getNamedGlobal (globalName) &&
99
99
" We should have a unique name here" );
100
100
101
- if (std::find_if (allocas.begin (), allocas.end (), [alloca](auto x) {
102
- return x.first == alloca;
103
- }) == allocas.end ()) {
101
+ if (llvm::none_of (allocas,
102
+ [alloca](auto x) { return x.first == alloca; })) {
104
103
allocas.push_back (std::make_pair (alloca, store));
105
104
}
106
105
Original file line number Diff line number Diff line change @@ -522,11 +522,10 @@ static const DerivedTypeSpec *HasDefaultInitialization(const Symbol &symbol) {
522
522
} else if (!object->isDummy () && object->type ()) {
523
523
if (const DerivedTypeSpec * derived{object->type ()->AsDerived ()}) {
524
524
DirectComponentIterator directs{*derived};
525
- if (std::find_if (
526
- directs.begin (), directs.end (), [](const Symbol &component) {
527
- return !IsAllocatable (component) &&
528
- HasDeclarationInitializer (component);
529
- }) != directs.end ()) {
525
+ if (llvm::any_of (directs, [](const Symbol &component) {
526
+ return !IsAllocatable (component) &&
527
+ HasDeclarationInitializer (component);
528
+ })) {
530
529
return derived;
531
530
}
532
531
}
Original file line number Diff line number Diff line change @@ -88,11 +88,9 @@ bool OmpRewriteMutator::Pre(parser::OpenMPAtomicConstruct &x) {
88
88
89
89
auto findMemOrderClause =
90
90
[](const std::list<parser::OmpAtomicClause> &clauses) {
91
- return std::find_if (
92
- clauses.begin (), clauses.end (), [](const auto &clause) {
93
- return std::get_if<parser::OmpMemoryOrderClause>(
94
- &clause.u );
95
- }) != clauses.end ();
91
+ return llvm::any_of (clauses, [](const auto &clause) {
92
+ return std::get_if<parser::OmpMemoryOrderClause>(&clause.u );
93
+ });
96
94
};
97
95
98
96
// Get the clause list to which the new memory order clause must be added,
Original file line number Diff line number Diff line change @@ -230,11 +230,10 @@ void GenericDetails::CopyFrom(const GenericDetails &from) {
230
230
derivedType_ = from.derivedType_ ;
231
231
}
232
232
for (std::size_t i{0 }; i < from.specificProcs_ .size (); ++i) {
233
- if (std::find_if (specificProcs_.begin (), specificProcs_.end (),
234
- [&](const Symbol &mySymbol) {
235
- return &mySymbol.GetUltimate () ==
236
- &from.specificProcs_ [i]->GetUltimate ();
237
- }) == specificProcs_.end ()) {
233
+ if (llvm::none_of (specificProcs_, [&](const Symbol &mySymbol) {
234
+ return &mySymbol.GetUltimate () ==
235
+ &from.specificProcs_ [i]->GetUltimate ();
236
+ })) {
238
237
specificProcs_.push_back (from.specificProcs_ [i]);
239
238
bindingNames_.push_back (from.bindingNames_ [i]);
240
239
}
You can’t perform that action at this time.
0 commit comments