[C++11] DwarfDebug: Use range-based for loops.
[oota-llvm.git] / lib / CodeGen / Analysis.cpp
index 1600c67a7c62550c48363b688a504e827cd53590..6ac5de2c61747da604d9151e9a1e634e32d4223a 100644 (file)
@@ -498,8 +498,7 @@ bool llvm::isInTailCallPosition(ImmutableCallSite CS,
   // chain interposes between I and the return.
   if (I->mayHaveSideEffects() || I->mayReadFromMemory() ||
       !isSafeToSpeculativelyExecute(I))
-    for (BasicBlock::const_iterator BBI = prior(prior(ExitBB->end())); ;
-         --BBI) {
+    for (BasicBlock::const_iterator BBI = std::prev(ExitBB->end(), 2);; --BBI) {
       if (&*BBI == I)
         break;
       // Debug info intrinsics do not get in the way of tail call optimization.