Process externally visible functions also. Later on code generator will do the right...
authorDevang Patel <dpatel@apple.com>
Tue, 4 Mar 2008 17:46:26 +0000 (17:46 +0000)
committerDevang Patel <dpatel@apple.com>
Tue, 4 Mar 2008 17:46:26 +0000 (17:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47889 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/StructRetPromotion.cpp

index 3ea9a04adb59430cbf6a69e9b9edaa010fb10012..6659c5a51e403092d8586a53ea8c879cb8826f41 100644 (file)
@@ -73,8 +73,7 @@ bool SRETPromotion::runOnSCC(const std::vector<CallGraphNode *> &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.