diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-09-09 14:52:27 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-09-09 14:52:27 +0000 |
commit | c83c8d4e74f049b6ca2ddc702af272c3e1131bdb (patch) | |
tree | 1f1021ccb82a02214f14783af79996e4543a19c5 /llvm/lib | |
parent | 23376259c087f8629345230087ac9ed6df6d6134 (diff) | |
download | bcm5719-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.cpp | 3 |
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. |