Use while loop.

llvm-svn: 47909
This commit is contained in:
Devang Patel 2008-03-04 21:59:49 +00:00
parent b2fae1d13f
commit 4566d885dd
1 changed files with 2 additions and 3 deletions

View File

@ -446,9 +446,8 @@ bool llvm::InlineFunction(CallSite CS, CallGraph *CG, const TargetData *TD) {
ReturnInst *R = Returns[0]; ReturnInst *R = Returns[0];
if (R->getNumOperands() > 1) { if (R->getNumOperands() > 1) {
// Multiple return values. // Multiple return values.
for (Value::use_iterator RUI = TheCall->use_begin(), while (!TheCall->use_empty()) {
RUE = TheCall->use_end(); RUI != RUE; ) { GetResultInst *GR = cast<GetResultInst>(TheCall->use_back());
GetResultInst *GR = cast<GetResultInst>(RUI++);
Value *RV = R->getOperand(GR->getIndex()); Value *RV = R->getOperand(GR->getIndex());
GR->replaceAllUsesWith(RV); GR->replaceAllUsesWith(RV);
GR->eraseFromParent(); GR->eraseFromParent();