summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-03-04 21:59:49 +0000
committerDevang Patel <dpatel@apple.com>2008-03-04 21:59:49 +0000
commit4566d885dd3e283915aea94517ce0f6c8f1fc1d2 (patch)
tree1fdf708e397b26b4ec7f0b38d67ea1b9b70cbece /llvm/lib/Transforms/Utils/InlineFunction.cpp
parentb2fae1d13f702107f8a254027cab2a1acc3fade0 (diff)
downloadbcm5719-llvm-4566d885dd3e283915aea94517ce0f6c8f1fc1d2.tar.gz
bcm5719-llvm-4566d885dd3e283915aea94517ce0f6c8f1fc1d2.zip
Use while loop.
llvm-svn: 47909
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/InlineFunction.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp
index 79b37003102..6862ec6dfd2 100644
--- a/llvm/lib/Transforms/Utils/InlineFunction.cpp
+++ b/llvm/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();
OpenPOWER on IntegriCloud