// lead to the loop header.
bool MustExecuteLoopHeader = true;
BasicBlock *Exit = nullptr;
- for (BasicBlock *Succ : successors(ExitingBlock))
- if (!L->contains(Succ)) {
+ for (succ_iterator SI = succ_begin(ExitingBlock), SE = succ_end(ExitingBlock);
+ SI != SE; ++SI)
+ if (!L->contains(*SI)) {
if (Exit) // Multiple exit successors.
return getCouldNotCompute();
- Exit = Succ;
- } else if (Succ != L->getHeader()) {
+ Exit = *SI;
+ } else if (*SI != L->getHeader()) {
MustExecuteLoopHeader = false;
}