mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-18 01:17:46 +00:00
Fix a use of an undefined value (the linkage).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217445 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ec8b573e54
commit
c787184012
@ -705,6 +705,9 @@ bool ModuleLinker::getLinkageResult(GlobalValue *Dest, const GlobalValue *Src,
|
||||
if (DestIsDeclaration) {
|
||||
LinkFromSrc = true;
|
||||
LT = Src->getLinkage();
|
||||
} else {
|
||||
LinkFromSrc = false;
|
||||
LT = Dest->getLinkage();
|
||||
}
|
||||
} else if (Dest->hasExternalWeakLinkage()) {
|
||||
// If the Dest is weak, use the source linkage.
|
||||
|
@ -1 +1,3 @@
|
||||
@test1_a = weak global i8 1
|
||||
|
||||
@test2_a = external dllimport global i8
|
||||
|
@ -2,5 +2,7 @@
|
||||
; RUN: llvm-link %p/Inputs/linkage2.ll %s -S | FileCheck %s
|
||||
|
||||
@test1_a = common global i8 0
|
||||
|
||||
; CHECK: @test1_a = common global i8 0
|
||||
|
||||
@test2_a = global i8 0
|
||||
; CHECK: @test2_a = global i8 0
|
||||
|
Loading…
Reference in New Issue
Block a user