diff options
Diffstat (limited to 'llvm/lib/Transforms/IPO/LoopExtractor.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/LoopExtractor.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/LoopExtractor.cpp b/llvm/lib/Transforms/IPO/LoopExtractor.cpp index 20414aa05b4..3f973c716ff 100644 --- a/llvm/lib/Transforms/IPO/LoopExtractor.cpp +++ b/llvm/lib/Transforms/IPO/LoopExtractor.cpp @@ -229,9 +229,7 @@ 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 (pred_iterator - PI = pred_begin(LPad), PE = pred_end(LPad); PI != PE; ++PI) { - BasicBlock *BB = *PI; + for (BasicBlock *BB : predecessors(LPad)) { if (BB->isLandingPad() && BB != Parent && isa<InvokeInst>(Parent->getTerminator())) { Split = true; |