diff options
Diffstat (limited to 'llvm/lib/IR/BasicBlock.cpp')
-rw-r--r-- | llvm/lib/IR/BasicBlock.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/IR/BasicBlock.cpp b/llvm/lib/IR/BasicBlock.cpp index 8ddcf25fced..ba07433103b 100644 --- a/llvm/lib/IR/BasicBlock.cpp +++ b/llvm/lib/IR/BasicBlock.cpp @@ -321,9 +321,10 @@ BasicBlock *BasicBlock::splitBasicBlock(iterator I, const Twine &BBName) { // successors. If there were PHI nodes in the successors, then they need to // know that incoming branches will be from New, not from Old. // - for (BasicBlock *Successor : successors(New)) { + for (succ_iterator I = succ_begin(New), E = succ_end(New); I != E; ++I) { // Loop over any phi nodes in the basic block, updating the BB field of // incoming values... + BasicBlock *Successor = *I; PHINode *PN; for (BasicBlock::iterator II = Successor->begin(); (PN = dyn_cast<PHINode>(II)); ++II) { |