Check multiple return values.
llvm-svn: 48267
diff --git a/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp b/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
index f4be970..945eb90 100644
--- a/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
+++ b/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
@@ -420,7 +420,8 @@
// to exit have the same type.
Function *from = ci->getParent()->getParent();
if (from->hasExternalLinkage())
- if (from->getReturnType() == ci->getOperand(1)->getType())
+ if (from->getReturnType() == ci->getOperand(1)->getType()
+ && !isa<StructType>(from->getReturnType()))
if (from->getName() == "main") {
// Okay, time to actually do the optimization. First, get the basic
// block of the call instruction