diff options
Diffstat (limited to 'lib/Target/X86/X86TargetAsmInfo.cpp')
| -rw-r--r-- | lib/Target/X86/X86TargetAsmInfo.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Target/X86/X86TargetAsmInfo.cpp b/lib/Target/X86/X86TargetAsmInfo.cpp index 0fdc0ee..dd1bdb8 100644 --- a/lib/Target/X86/X86TargetAsmInfo.cpp +++ b/lib/Target/X86/X86TargetAsmInfo.cpp @@ -224,9 +224,7 @@ X86DarwinTargetAsmInfo::PreferredEHDataFormat(DwarfEncoding::Target Reason, std::string X86DarwinTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const { SectionKind::Kind Kind = SectionKindForGlobal(GV); - bool isWeak = GV->hasWeakLinkage() || - GV->hasCommonLinkage() || - GV->hasLinkOnceLinkage(); + bool isWeak = GV->isWeakForLinker(); switch (Kind) { case SectionKind::Text: @@ -435,9 +433,7 @@ X86ELFTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const { return UniqueSectionForGlobal(F, kind); } } else if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV)) { - if (GVar->hasCommonLinkage() || - GVar->hasLinkOnceLinkage() || - GVar->hasWeakLinkage()) + if (GVar->isWeakForLinker() return UniqueSectionForGlobal(GVar, kind); else { switch (kind) { |
