[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges.
[oota-llvm.git] / lib / CodeGen / SjLjEHPrepare.cpp
index b0950ded270aa9f6921280ee3d2dc73b598bfe55..1cfd4d255edf1b88a077b02f46f38bfd33e81bf6 100644 (file)
@@ -142,8 +142,8 @@ static void MarkBlocksLiveIn(BasicBlock *BB,
   if (!LiveBBs.insert(BB))
     return; // already been here.
 
-  for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI)
-    MarkBlocksLiveIn(*PI, LiveBBs);
+  for (BasicBlock *Pred : predecessors(BB))
+    MarkBlocksLiveIn(Pred, LiveBBs);
 }
 
 /// substituteLPadValues - Substitute the values returned by the landingpad