aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/IPO
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-03-12 00:32:32 +0000
committerDevang Patel <dpatel@apple.com>2008-03-12 00:32:32 +0000
commitead436b69e5df9b2644e353a349f72fef7aff33b (patch)
treefb912754ba0ccdfd56dd65112b746eb42133fbb5 /lib/Transforms/IPO
parent86506121cfb9f134cbeb6df4b389735d12dd7bd3 (diff)
downloadexternal_llvm-ead436b69e5df9b2644e353a349f72fef7aff33b.zip
external_llvm-ead436b69e5df9b2644e353a349f72fef7aff33b.tar.gz
external_llvm-ead436b69e5df9b2644e353a349f72fef7aff33b.tar.bz2
Check multiple return values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48267 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO')
-rw-r--r--lib/Transforms/IPO/SimplifyLibCalls.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/IPO/SimplifyLibCalls.cpp b/lib/Transforms/IPO/SimplifyLibCalls.cpp
index f4be970..945eb90 100644
--- a/lib/Transforms/IPO/SimplifyLibCalls.cpp
+++ b/lib/Transforms/IPO/SimplifyLibCalls.cpp
@@ -420,7 +420,8 @@ struct VISIBILITY_HIDDEN ExitInMainOptimization : public LibCallOptimization {
// 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