summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/LoopExtractor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/IPO/LoopExtractor.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/LoopExtractor.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/LoopExtractor.cpp b/llvm/lib/Transforms/IPO/LoopExtractor.cpp
index 3f973c716ff..20414aa05b4 100644
--- a/llvm/lib/Transforms/IPO/LoopExtractor.cpp
+++ b/llvm/lib/Transforms/IPO/LoopExtractor.cpp
@@ -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;
OpenPOWER on IntegriCloud