summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-12-02 20:57:33 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-12-02 20:57:33 +0000
commit0a80da0bec258dd6920b6ea924f9d4fa0f9660b3 (patch)
tree70fcc3fb76b1a22917cdea09c0e37dde6f54a225 /llvm/lib/Linker
parentc895e34e0d4affba915103780aea1b4f85fd443e (diff)
downloadbcm5719-llvm-0a80da0bec258dd6920b6ea924f9d4fa0f9660b3.tar.gz
bcm5719-llvm-0a80da0bec258dd6920b6ea924f9d4fa0f9660b3.zip
Also copy private linkage globals when needed.
This was an omission when handling COFF style comdats with local keys. Should fix the sanitizer-windows bot. llvm-svn: 254543
Diffstat (limited to 'llvm/lib/Linker')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index 3e54e279573..e90ce166962 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -1426,7 +1426,7 @@ bool ModuleLinker::linkGlobalValueProto(GlobalValue *SGV) {
std::tie(SK, LinkFromSrc) = ComdatsChosen[SC];
C = DstM.getOrInsertComdat(SC->getName());
C->setSelectionKind(SK);
- if (SGV->hasInternalLinkage())
+ if (SGV->hasLocalLinkage())
LinkFromSrc = true;
} else if (DGV) {
if (shouldLinkFromSource(LinkFromSrc, *DGV, *SGV))
OpenPOWER on IntegriCloud