Use cast instead of dyn_cast.

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

llvm-svn: 47907
This commit is contained in:
Devang Patel
2008-03-04 21:45:28 +00:00
parent ea4cb89d34
commit 941ab37ea8
2 changed files with 12 additions and 11 deletions

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();