diff options
author | Devang Patel <dpatel@apple.com> | 2008-03-04 21:59:49 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2008-03-04 21:59:49 +0000 |
commit | ac3746f20c3048eb3c302fec9ae86d7c1ee61c72 (patch) | |
tree | 92597d4b9cd21bcdaa490e788b78bccd00a809ac /lib/Transforms/Utils | |
parent | 552ec65ebd6b4cf40e31d6a41e78a5c4d7a13bcf (diff) | |
download | external_llvm-ac3746f20c3048eb3c302fec9ae86d7c1ee61c72.zip external_llvm-ac3746f20c3048eb3c302fec9ae86d7c1ee61c72.tar.gz external_llvm-ac3746f20c3048eb3c302fec9ae86d7c1ee61c72.tar.bz2 |
Use while loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47909 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils')
-rw-r--r-- | lib/Transforms/Utils/InlineFunction.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Transforms/Utils/InlineFunction.cpp b/lib/Transforms/Utils/InlineFunction.cpp index 79b3700..6862ec6 100644 --- a/lib/Transforms/Utils/InlineFunction.cpp +++ b/lib/Transforms/Utils/InlineFunction.cpp @@ -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(); |