Skip functions that return multiple values.
authorDevang Patel <dpatel@apple.com>
Tue, 11 Mar 2008 18:04:06 +0000 (18:04 +0000)
committerDevang Patel <dpatel@apple.com>
Tue, 11 Mar 2008 18:04:06 +0000 (18:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48233 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/InstructionCombining.cpp

index 6783607e370a5e23208a900925ceb02ae9e24334..4f517e6fbf099e19193c0eb6c186276c15c900db 100644 (file)
@@ -8428,6 +8428,9 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) {
   const FunctionType *FT = Callee->getFunctionType();
   const Type *OldRetTy = Caller->getType();
 
+  if (isa<StructType>(FT->getReturnType()))
+    return false; // TODO: Handle multiple return values.
+
   // Check to see if we are changing the return type...
   if (OldRetTy != FT->getReturnType()) {
     if (Callee->isDeclaration() && !Caller->use_empty() &&