ARM: whitespace
[oota-llvm.git] / lib / Transforms / Scalar / LoopUnswitch.cpp
index 68bd4b82959c12fa2822142af2746b87a95d5dcc..977c53a3bc6327046fb53d31c9eaf8bddfef26b9 100644 (file)
@@ -515,9 +515,9 @@ static bool isTrivialLoopExitBlockHelper(Loop *L, BasicBlock *BB,
   }
 
   // Otherwise, this is an unvisited intra-loop node.  Check all successors.
-  for (BasicBlock *Succ : successors(BB)) {
+  for (succ_iterator SI = succ_begin(BB), E = succ_end(BB); SI != E; ++SI) {
     // Check to see if the successor is a trivial loop exit.
-    if (!isTrivialLoopExitBlockHelper(L, Succ, ExitBB, Visited))
+    if (!isTrivialLoopExitBlockHelper(L, *SI, ExitBB, Visited))
       return false;
   }
 
@@ -861,7 +861,9 @@ void LoopUnswitch::UnswitchNontrivialCondition(Value *LIC, Constant *Val,
       PHINode *PN = PHINode::Create(LPad->getType(), 0, "",
                                     ExitSucc->getFirstInsertionPt());
 
-      for (BasicBlock *BB : predecessors(ExitSucc)) {
+      for (pred_iterator I = pred_begin(ExitSucc), E = pred_end(ExitSucc);
+           I != E; ++I) {
+        BasicBlock *BB = *I;
         LandingPadInst *LPI = BB->getLandingPadInst();
         LPI->replaceAllUsesWith(PN);
         PN->addIncoming(LPI, BB);