From c4878e921c87e8d5d32316832b14ad851a7d35bc Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Tue, 4 Mar 2008 17:46:26 +0000 Subject: Process externally visible functions also. Later on code generator will do the right thing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47889 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/IPO/StructRetPromotion.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Transforms/IPO/StructRetPromotion.cpp b/lib/Transforms/IPO/StructRetPromotion.cpp index 3ea9a04..6659c5a 100644 --- a/lib/Transforms/IPO/StructRetPromotion.cpp +++ b/lib/Transforms/IPO/StructRetPromotion.cpp @@ -73,8 +73,7 @@ bool SRETPromotion::runOnSCC(const std::vector &SCC) { bool SRETPromotion::PromoteReturn(CallGraphNode *CGN) { Function *F = CGN->getFunction(); - // Make sure that it is local to this module. - if (!F || !F->hasInternalLinkage()) + if (!F) return false; // Make sure that function returns struct. -- cgit v1.1