summaryrefslogtreecommitdiff
path: root/lib/Linker
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-04-19 16:11:05 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-04-19 16:11:05 +0000
commit5c025fc0a6585c3c057b49c70f05cb8071db5270 (patch)
tree5104fb8a9cbc173bbacbbe1d3464c9e7eaf5872b /lib/Linker
parent75cc051139ab4e1a5d3177d81820cf3d7110cd0a (diff)
ModuleLinker: Do not import linkonce/weak as "external_weak"
Summary: There is no reason to have a weak reference because the external definition will be weak. Reviewers: rafael Subscribers: llvm-commits, tejohnson Differential Revision: http://reviews.llvm.org/D19267 From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266750 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Linker')
-rw-r--r--lib/Linker/IRMover.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Linker/IRMover.cpp b/lib/Linker/IRMover.cpp
index 5b52ea8106e..81858bd421f 100644
--- a/lib/Linker/IRMover.cpp
+++ b/lib/Linker/IRMover.cpp
@@ -617,8 +617,7 @@ GlobalValue *IRLinker::copyGlobalValueProto(const GlobalValue *SGV,
if (ForDefinition)
NewGV->setLinkage(SGV->getLinkage());
- else if (SGV->hasExternalWeakLinkage() || SGV->hasWeakLinkage() ||
- SGV->hasLinkOnceLinkage())
+ else if (SGV->hasExternalWeakLinkage())
NewGV->setLinkage(GlobalValue::ExternalWeakLinkage);
NewGV->copyAttributesFrom(SGV);