summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-09-09 14:52:27 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-09-09 14:52:27 +0000
commitc83c8d4e74f049b6ca2ddc702af272c3e1131bdb (patch)
tree1f1021ccb82a02214f14783af79996e4543a19c5 /llvm/lib
parent23376259c087f8629345230087ac9ed6df6d6134 (diff)
downloadbcm5719-llvm-c83c8d4e74f049b6ca2ddc702af272c3e1131bdb.tar.gz
bcm5719-llvm-c83c8d4e74f049b6ca2ddc702af272c3e1131bdb.zip
Fix a use of an undefined value (the linkage).
llvm-svn: 217445
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index 14c6a10c339..6e425992393 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -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.
OpenPOWER on IntegriCloud