[llvm-commits] [llvm] r47909 - /llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp
Devang Patel
dpatel at apple.com
Tue Mar 4 13:59:49 PST 2008
Author: dpatel
Date: Tue Mar 4 15:59:49 2008
New Revision: 47909
URL: http://llvm.org/viewvc/llvm-project?rev=47909&view=rev
Log:
Use while loop.
Modified:
llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp
Modified: llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp?rev=47909&r1=47908&r2=47909&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp Tue Mar 4 15:59:49 2008
@@ -446,9 +446,8 @@
ReturnInst *R = Returns[0];
if (R->getNumOperands() > 1) {
// Multiple return values.
- for (Value::use_iterator RUI = TheCall->use_begin(),
- RUE = TheCall->use_end(); RUI != RUE; ) {
- GetResultInst *GR = cast<GetResultInst>(RUI++);
+ while (!TheCall->use_empty()) {
+ GetResultInst *GR = cast<GetResultInst>(TheCall->use_back());
Value *RV = R->getOperand(GR->getIndex());
GR->replaceAllUsesWith(RV);
GR->eraseFromParent();
More information about the llvm-commits
mailing list