llvm.org GIT mirror llvm / 161d4c6
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 Rafael Espindola 4 years ago
3 changed file(s) with 13 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
830830 if (SGV.isDeclaration())
831831 return true;
832832
833 if (DGV->isDeclarationForLinker())
833 if (DGV->isDeclarationForLinker() && !SGV.isDeclarationForLinker())
834834 return false;
835835
836836 if (ShouldLink)
0 @h = global void ()* @f
1 @h2 = global void ()* @g
12
23 define available_externally void @f() {
34 ret void
45 }
6
7 define available_externally void @g() {
8 ret void
9 }
11
22 declare void @f()
33
4 define available_externally void @g() {
5 ret void
6 }
7
48 define void ()* @main() {
9 call void @g()
510 ret void ()* @f
611 }
712
8 ; CHECK: define available_externally void @f() {
13 ; CHECK-DAG: define available_externally void @g() {
14 ; CHECK-DAG: define available_externally void @f() {