From: Devang Patel Date: Wed, 12 Mar 2008 00:32:32 +0000 (+0000) Subject: Check multiple return values. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=045497ae27bdf28589f5ada0d132990af464c598;p=oota-llvm.git Check multiple return values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48267 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/IPO/SimplifyLibCalls.cpp b/lib/Transforms/IPO/SimplifyLibCalls.cpp index f4be9704b7a..945eb909e50 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(from->getReturnType())) if (from->getName() == "main") { // Okay, time to actually do the optimization. First, get the basic // block of the call instruction