aboutsummaryrefslogtreecommitdiffstats
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
commit045497ae27bdf28589f5ada0d132990af464c598 (patch)
treefb912754ba0ccdfd56dd65112b746eb42133fbb5
parent38459f01c0b9f125c0ff7ded08ec8af6e95e5e18 (diff)
downloadexternal_llvm-045497ae27bdf28589f5ada0d132990af464c598.tar.gz
external_llvm-045497ae27bdf28589f5ada0d132990af464c598.tar.bz2
external_llvm-045497ae27bdf28589f5ada0d132990af464c598.zip
Check multiple return values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48267 91177308-0d34-0410-b5e6-96231b3b80d8
-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 f4be9704b7..945eb909e5 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