Skip to content

Commit 3e1931d

Browse files
[Scalar] Use std::none_of (NFC) (#143282)
While I am at it, this patch replaces It with std::next(It) for clarity. Note that It is not used after this point.
1 parent 6edfc6c commit 3e1931d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Scalar/LICM.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,8 +786,8 @@ class ControlFlowHoister {
786786
return InitialPreheader;
787787
}
788788
BranchInst *BI = It->first;
789-
assert(std::find_if(++It, HoistableBranches.end(), HasBBAsSuccessor) ==
790-
HoistableBranches.end() &&
789+
assert(std::none_of(std::next(It), HoistableBranches.end(),
790+
HasBBAsSuccessor) &&
791791
"BB is expected to be the target of at most one branch");
792792

793793
LLVMContext &C = BB->getContext();

0 commit comments

Comments
 (0)