summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/IRMover.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Linker/IRMover.cpp')
-rw-r--r--llvm/lib/Linker/IRMover.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Linker/IRMover.cpp b/llvm/lib/Linker/IRMover.cpp
index 20a82327e19..251cfb71894 100644
--- a/llvm/lib/Linker/IRMover.cpp
+++ b/llvm/lib/Linker/IRMover.cpp
@@ -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)
OpenPOWER on IntegriCloud