Revert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges."

This reverts commit r213474 (and r213475), which causes a miscompile on
a stage2 LTO build.  I'll reply on the list in a moment.

llvm-svn: 213562
diff --git a/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp b/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp
index d2206e3..b9673ed 100644
--- a/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp
+++ b/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp
@@ -365,39 +365,41 @@
   BBPredicates &Pred = Predicates[BB];
   BBPredicates &LPred = LoopPreds[BB];
 
-  for (BasicBlock *Predecessor : predecessors(BB)) {
+  for (pred_iterator PI = pred_begin(BB), PE = pred_end(BB);
+       PI != PE; ++PI) {
+
     // Ignore it if it's a branch from outside into our region entry
-    if (!ParentRegion->contains(Predecessor))
+    if (!ParentRegion->contains(*PI))
       continue;
 
-    Region *R = RI->getRegionFor(Predecessor);
+    Region *R = RI->getRegionFor(*PI);
     if (R == ParentRegion) {
 
       // It's a top level block in our region
-      BranchInst *Term = cast<BranchInst>(Predecessor->getTerminator());
+      BranchInst *Term = cast<BranchInst>((*PI)->getTerminator());
       for (unsigned i = 0, e = Term->getNumSuccessors(); i != e; ++i) {
         BasicBlock *Succ = Term->getSuccessor(i);
         if (Succ != BB)
           continue;
 
-        if (Visited.count(Predecessor)) {
+        if (Visited.count(*PI)) {
           // Normal forward edge
           if (Term->isConditional()) {
             // Try to treat it like an ELSE block
             BasicBlock *Other = Term->getSuccessor(!i);
             if (Visited.count(Other) && !Loops.count(Other) &&
-                !Pred.count(Other) && !Pred.count(Predecessor)) {
+                !Pred.count(Other) && !Pred.count(*PI)) {
 
               Pred[Other] = BoolFalse;
-              Pred[Predecessor] = BoolTrue;
+              Pred[*PI] = BoolTrue;
               continue;
             }
           }
-          Pred[Predecessor] = buildCondition(Term, i, false);
+          Pred[*PI] = buildCondition(Term, i, false);
 
         } else {
           // Back edge
-          LPred[Predecessor] = buildCondition(Term, i, true);
+          LPred[*PI] = buildCondition(Term, i, true);
         }
       }
 
@@ -572,8 +574,11 @@
   if (!Term)
     return;
 
-  for (BasicBlock *Succ : successors(BB))
-    delPhiValues(BB, Succ);
+  for (succ_iterator SI = succ_begin(BB), SE = succ_end(BB);
+       SI != SE; ++SI) {
+
+    delPhiValues(BB, *SI);
+  }
 
   Term->eraseFromParent();
 }
@@ -587,7 +592,10 @@
     BasicBlock *Dominator = nullptr;
 
     // Find all the edges from the sub region to the exit
-    for (BasicBlock *BB : predecessors(OldExit)) {
+    for (pred_iterator I = pred_begin(OldExit), E = pred_end(OldExit);
+         I != E;) {
+
+      BasicBlock *BB = *I++;
       if (!SubRegion->contains(BB))
         continue;