[opaque pointer type] Change GetElementPtrInst::getIndexedType to take the pointee...
[oota-llvm.git] / lib / Transforms / IPO / LoopExtractor.cpp
index 3f973c716fff16c444de8abff4454d32d944a9bf..41334ca5b429864e3fa7a6d4695bac1460729a3e 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;
@@ -240,7 +242,7 @@ void BlockExtractorPass::SplitLandingPadPreds(Function *F) {
     if (!Split) continue;
 
     SmallVector<BasicBlock*, 2> NewBBs;
-    SplitLandingPadPredecessors(LPad, Parent, ".1", ".2", nullptr, NewBBs);
+    SplitLandingPadPredecessors(LPad, Parent, ".1", ".2", NewBBs);
   }
 }