From cc189b5606b1eccd9f3c5472df7840a10f6f5423 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Wed, 12 Mar 2008 00:32:32 +0000 Subject: Check multiple return values. llvm-svn: 48267 --- llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Transforms') diff --git a/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp b/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp index f4be9704b7a..945eb909e50 100644 --- a/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp +++ b/llvm/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 -- cgit v1.2.3