projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
38459f0
)
Check multiple return values.
author
Devang Patel
<dpatel@apple.com>
Wed, 12 Mar 2008 00:32:32 +0000
(
00:32
+0000)
committer
Devang Patel
<dpatel@apple.com>
Wed, 12 Mar 2008 00:32:32 +0000
(
00:32
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48267
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/IPO/SimplifyLibCalls.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/IPO/SimplifyLibCalls.cpp
b/lib/Transforms/IPO/SimplifyLibCalls.cpp
index f4be9704b7a8936ebe4bae111cc014c880eface6..945eb909e50810e0df7cea98dcdeb2c4957ceb8b 100644
(file)
--- 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