// bodies of subloops. We visit the headers of loops so that we can process
// their phis, but we contract the rest of the subloop body and only follow
// edges leading back to the original loop.
- for (succ_iterator SI = succ_begin(BB), SE = succ_end(BB); SI != SE;
- ++SI) {
- BasicBlock *SuccBB = *SI;
+ for (BasicBlock *SuccBB : successors(BB)) {
if (!Visited.insert(SuccBB))
continue;