[llvm-commits] [llvm] r48267 - /llvm/trunk/lib/Transforms/IPO/SimplifyLibCalls.cpp
Devang Patel
dpatel at apple.com
Tue Mar 11 17:32:32 PDT 2008
Author: dpatel
Date: Tue Mar 11 19:32:32 2008
New Revision: 48267
URL: http://llvm.org/viewvc/llvm-project?rev=48267&view=rev
Log:
Check multiple return values.
Modified:
llvm/trunk/lib/Transforms/IPO/SimplifyLibCalls.cpp
Modified: llvm/trunk/lib/Transforms/IPO/SimplifyLibCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/SimplifyLibCalls.cpp?rev=48267&r1=48266&r2=48267&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/SimplifyLibCalls.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/SimplifyLibCalls.cpp Tue Mar 11 19:32:32 2008
@@ -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
More information about the llvm-commits
mailing list