mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-02 16:56:39 +00:00
Fix another case where the linkage was not set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255272 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ef0af93883
commit
161d4c68fc
@ -831,7 +831,7 @@ static bool useExistingDest(GlobalValue &SGV, GlobalValue *DGV,
|
|||||||
if (SGV.isDeclaration())
|
if (SGV.isDeclaration())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (DGV->isDeclarationForLinker())
|
if (DGV->isDeclarationForLinker() && !SGV.isDeclarationForLinker())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (ShouldLink)
|
if (ShouldLink)
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
@h = global void ()* @f
|
@h = global void ()* @f
|
||||||
|
@h2 = global void ()* @g
|
||||||
|
|
||||||
define available_externally void @f() {
|
define available_externally void @f() {
|
||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
define available_externally void @g() {
|
||||||
|
ret void
|
||||||
|
}
|
||||||
|
@ -2,8 +2,14 @@
|
|||||||
|
|
||||||
declare void @f()
|
declare void @f()
|
||||||
|
|
||||||
|
define available_externally void @g() {
|
||||||
|
ret void
|
||||||
|
}
|
||||||
|
|
||||||
define void ()* @main() {
|
define void ()* @main() {
|
||||||
|
call void @g()
|
||||||
ret void ()* @f
|
ret void ()* @f
|
||||||
}
|
}
|
||||||
|
|
||||||
; CHECK: define available_externally void @f() {
|
; CHECK-DAG: define available_externally void @g() {
|
||||||
|
; CHECK-DAG: define available_externally void @f() {
|
||||||
|
Loading…
Reference in New Issue
Block a user