Use cast instead of dyn_cast.

Update test to use multiple return value directly, instead of relying on -sretpromotion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47907 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel
2008-03-04 21:45:28 +00:00
parent a9fe8bb3b6
commit 37963556e3
2 changed files with 12 additions and 11 deletions
+1 -2
View File
@@ -448,8 +448,7 @@ bool llvm::InlineFunction(CallSite CS, CallGraph *CG, const TargetData *TD) {
// Multiple return values.
for (Value::use_iterator RUI = TheCall->use_begin(),
RUE = TheCall->use_end(); RUI != RUE; ) {
GetResultInst *GR = dyn_cast<GetResultInst>(RUI++);
assert (GR && "Invalid Call instruction use!");
GetResultInst *GR = cast<GetResultInst>(RUI++);
Value *RV = R->getOperand(GR->getIndex());
GR->replaceAllUsesWith(RV);
GR->eraseFromParent();