[llvm-commits] [llvm] r137985 - /llvm/trunk/lib/Transforms/Scalar/ObjCARC.cpp
Dan Gohman
gohman at apple.com
Thu Aug 18 14:27:42 PDT 2011
Author: djg
Date: Thu Aug 18 16:27:42 2011
New Revision: 137985
URL: http://llvm.org/viewvc/llvm-project?rev=137985&view=rev
Log:
Make it clear that this code is iterating in reverse order through the array.
Modified:
llvm/trunk/lib/Transforms/Scalar/ObjCARC.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/ObjCARC.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/ObjCARC.cpp?rev=137985&r1=137984&r2=137985&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/ObjCARC.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/ObjCARC.cpp Thu Aug 18 16:27:42 2011
@@ -2596,8 +2596,9 @@
Order.push_back(Stack.pop_back_val().first);
}
bool BottomUpNestingDetected = false;
- while (!Order.empty()) {
- BasicBlock *BB = Order.pop_back_val();
+ for (SmallVectorImpl<BasicBlock *>::const_reverse_iterator I =
+ Order.rbegin(), E = Order.rend(); I != E; ++I) {
+ BasicBlock *BB = *I;
BottomUpNestingDetected |= VisitBottomUp(BB, BBStates, Retains);
}
More information about the llvm-commits
mailing list