[llvm] [Scalar] Use std::none_of (NFC) (PR #143282)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 7 13:01:18 PDT 2025


================
@@ -786,8 +786,7 @@ class ControlFlowHoister {
       return InitialPreheader;
     }
     BranchInst *BI = It->first;
-    assert(std::find_if(++It, HoistableBranches.end(), HasBBAsSuccessor) ==
-               HoistableBranches.end() &&
+    assert(std::none_of(++It, HoistableBranches.end(), HasBBAsSuccessor) &&
----------------
kazutakahirata wrote:

I've replaced `++It` with `std::next(It)`.


https://github.com/llvm/llvm-project/pull/143282


More information about the llvm-commits mailing list