Revert "Small refactor on VectorizerHint for deduplication"
[oota-llvm.git] / lib / Transforms / IPO / LoopExtractor.cpp
index 3f973c716fff16c444de8abff4454d32d944a9bf..20414aa05b4dbf554be6bae3802f6e7873ac2f43 100644 (file)
@@ -229,7 +229,9 @@ void BlockExtractorPass::SplitLandingPadPreds(Function *F) {
     // Look through the landing pad's predecessors. If one of them ends in an
     // 'invoke', then we want to split the landing pad.
     bool Split = false;
-    for (BasicBlock *BB : predecessors(LPad)) {
+    for (pred_iterator
+           PI = pred_begin(LPad), PE = pred_end(LPad); PI != PE; ++PI) {
+      BasicBlock *BB = *PI;
       if (BB->isLandingPad() && BB != Parent &&
           isa<InvokeInst>(Parent->getTerminator())) {
         Split = true;