[llvm-commits] [llvm] r50851 - /llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp
Devang Patel
dpatel at apple.com
Thu May 8 08:08:40 PDT 2008
Author: dpatel
Date: Thu May 8 10:08:39 2008
New Revision: 50851
URL: http://llvm.org/viewvc/llvm-project?rev=50851&view=rev
Log:
Check linkage.
Modified:
llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp
Modified: llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp?rev=50851&r1=50850&r2=50851&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp Thu May 8 10:08:39 2008
@@ -73,7 +73,7 @@
bool SRETPromotion::PromoteReturn(CallGraphNode *CGN) {
Function *F = CGN->getFunction();
- if (!F || F->isDeclaration())
+ if (!F || F->isDeclaration() || !F->hasInternalLinkage())
return false;
// Make sure that function returns struct.
More information about the llvm-commits
mailing list