mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-07 11:33:44 +00:00
Check linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50851 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
43b30a8287
commit
d7266d484a
@ -73,7 +73,7 @@ bool SRETPromotion::runOnSCC(const std::vector<CallGraphNode *> &SCC) {
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user