llvm.org GIT mirror llvm / 5c025fc
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 Mehdi Amini 4 years ago
2 changed file(s) with 3 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
616616
617617 if (ForDefinition)
618618 NewGV->setLinkage(SGV->getLinkage());
619 else if (SGV->hasExternalWeakLinkage() || SGV->hasWeakLinkage() ||
620 SGV->hasLinkOnceLinkage())
619 else if (SGV->hasExternalWeakLinkage())
621620 NewGV->setLinkage(GlobalValue::ExternalWeakLinkage);
622621
623622 NewGV->copyAttributesFrom(SGV);
44 @v = global i32 0, comdat ($c)
55
66 ; CHECK: @v = global i32 0, comdat($c)
7 ; CHECK: @v2 = extern_weak dllexport global i32
8 ; CHECK: @v3 = extern_weak global i32
7 ; CHECK: @v2 = external dllexport global i32
8 ; CHECK: @v3 = external global i32