[PATCH] D22816: Move assert as early as possible.

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 26 11:11:31 PDT 2016


sanjoy accepted this revision.
sanjoy added a comment.
This revision is now accepted and ready to land.

lgtm with a comment inline


================
Comment at: llvm/include/llvm/Analysis/LoopInfoImpl.h:249
@@ -248,3 +248,3 @@
     for (typename BlockTraits::ChildIteratorType SI =
            BlockTraits::child_begin(BB), SE = BlockTraits::child_end(BB);
          SI != SE; ++SI)
----------------
Since you're touching this code, can you (in a separate change) change this loop to use `std::any_of`?   Even better would be if you add a `children` function (that directly returns a range) and use `llvm::any_of`.


https://reviews.llvm.org/D22816





More information about the llvm-commits mailing list