Check type instead of no. of operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50179 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2008-04-23 20:18:29 +00:00
parent 9ac0ac5675
commit 6829157f49

View File

@ -456,7 +456,7 @@ bool llvm::InlineFunction(CallSite CS, CallGraph *CG, const TargetData *TD) {
// uses of the returned value.
if (!TheCall->use_empty()) {
ReturnInst *R = Returns[0];
if (R->getNumOperands() > 1) {
if (isa<StructType>(TheCall->getType())) {
// Multiple return values.
while (!TheCall->use_empty()) {
GetResultInst *GR = cast<GetResultInst>(TheCall->use_back());