[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges.
[oota-llvm.git] / lib / Transforms / Scalar / LoopInstSimplify.cpp
index ab1a9393c526c7c05377945ea4364405544a42ea..657038eeca7d58d3ff4eb3bdc9847f4f7f10cce8 100644 (file)
@@ -145,9 +145,7 @@ bool LoopInstSimplify::runOnLoop(Loop *L, LPPassManager &LPM) {
       // bodies of subloops. We visit the headers of loops so that we can process
       // their phis, but we contract the rest of the subloop body and only follow
       // edges leading back to the original loop.
-      for (succ_iterator SI = succ_begin(BB), SE = succ_end(BB); SI != SE;
-           ++SI) {
-        BasicBlock *SuccBB = *SI;
+      for (BasicBlock *SuccBB : successors(BB)) {
         if (!Visited.insert(SuccBB))
           continue;