commit | 355881e62de7e330060761c6c6a9ef89d44d5bd2 | [log] [tgz] |
---|---|---|
author | Devang Patel <dpatel@apple.com> | Thu May 08 15:08:39 2008 +0000 |
committer | Devang Patel <dpatel@apple.com> | Thu May 08 15:08:39 2008 +0000 |
tree | 609177e88c0bea22e4ee6ca36ee69b23606b71dc | |
parent | 4cc3953292e50d24961f84e5f3af90feb24e0dd7 [diff] [blame] |
Check linkage. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50851 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/IPO/StructRetPromotion.cpp b/lib/Transforms/IPO/StructRetPromotion.cpp index 80952b7..77a35b4 100644 --- a/lib/Transforms/IPO/StructRetPromotion.cpp +++ b/lib/Transforms/IPO/StructRetPromotion.cpp
@@ -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.