mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-20 18:56:04 +00:00
Fix another case where the linkage was not set.
llvm-svn: 255272
This commit is contained in:
parent
1cf66e30a9
commit
43562b355d
@ -831,7 +831,7 @@ static bool useExistingDest(GlobalValue &SGV, GlobalValue *DGV,
|
||||
if (SGV.isDeclaration())
|
||||
return true;
|
||||
|
||||
if (DGV->isDeclarationForLinker())
|
||||
if (DGV->isDeclarationForLinker() && !SGV.isDeclarationForLinker())
|
||||
return false;
|
||||
|
||||
if (ShouldLink)
|
||||
|
@ -1,5 +1,10 @@
|
||||
@h = global void ()* @f
|
||||
@h2 = global void ()* @g
|
||||
|
||||
define available_externally void @f() {
|
||||
ret void
|
||||
}
|
||||
|
||||
define available_externally void @g() {
|
||||
ret void
|
||||
}
|
||||
|
@ -2,8 +2,14 @@
|
||||
|
||||
declare void @f()
|
||||
|
||||
define available_externally void @g() {
|
||||
ret void
|
||||
}
|
||||
|
||||
define void ()* @main() {
|
||||
call void @g()
|
||||
ret void ()* @f
|
||||
}
|
||||
|
||||
; CHECK: define available_externally void @f() {
|
||||
; CHECK-DAG: define available_externally void @g() {
|
||||
; CHECK-DAG: define available_externally void @f() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user