mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-30 16:34:03 +00:00
Use while loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47909 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
552ec65ebd
commit
ac3746f20c
@ -446,9 +446,8 @@ bool llvm::InlineFunction(CallSite CS, CallGraph *CG, const TargetData *TD) {
|
||||
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();
|
||||
|
Loading…
Reference in New Issue
Block a user