mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-20 02:28:23 +00:00
Check linkage.
llvm-svn: 50851
This commit is contained in:
parent
5775b74165
commit
3dce0e9d2e
@ -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