[IRCE] Use range-for; NFC
authorSanjoy Das <sanjoy@playingwithpointers.com>
Sat, 13 Aug 2016 22:00:09 +0000 (22:00 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Sat, 13 Aug 2016 22:00:09 +0000 (22:00 +0000)
llvm-svn: 278606

llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp

index f324281..2f64440 100644 (file)
@@ -925,13 +925,11 @@ void LoopConstrainer::cloneLoop(LoopConstrainer::ClonedLoop &Result,
     // to be edited to reflect that.  No phi nodes need to be introduced because
     // the loop is in LCSSA.
 
-    for (auto SBBI = succ_begin(OriginalBB), SBBE = succ_end(OriginalBB);
-         SBBI != SBBE; ++SBBI) {
-
-      if (OriginalLoop.contains(*SBBI))
+    for (auto *SBB : successors(OriginalBB)) {
+      if (OriginalLoop.contains(SBB))
         continue; // not an exit block
 
-      for (Instruction &I : **SBBI) {
+      for (Instruction &I : *SBB) {
         if (!isa<PHINode>(&I))
           break;