Check type instead of no. of operands.
authorDevang Patel <dpatel@apple.com>
Wed, 23 Apr 2008 20:18:29 +0000 (20:18 +0000)
committerDevang Patel <dpatel@apple.com>
Wed, 23 Apr 2008 20:18:29 +0000 (20:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50179 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/InlineFunction.cpp

index ff494ce8af403fb3ee41622a02c06f0fb814f225..435be0c05cdc39f74ed9f1d66aedff69fe2ffa3f 100644 (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());