diff options
| author | Anton Korobeynikov <asl@math.spbu.ru> | 2008-07-09 13:27:59 +0000 |
|---|---|---|
| committer | Anton Korobeynikov <asl@math.spbu.ru> | 2008-07-09 13:27:59 +0000 |
| commit | c33a744f0e8fc43deab7f4ce6aa3664cf911f589 (patch) | |
| tree | dc3b35af62a4b72bcb41a7ef7eb3facba842e701 /lib/Target/TargetAsmInfo.cpp | |
| parent | 93911d239ba4b9f2929617255f95a8e3c8994c83 (diff) | |
Use isWeakForLinker() hook
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53318 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetAsmInfo.cpp')
| -rw-r--r-- | lib/Target/TargetAsmInfo.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Target/TargetAsmInfo.cpp b/lib/Target/TargetAsmInfo.cpp index 483af12901..0c74d5ad60 100644 --- a/lib/Target/TargetAsmInfo.cpp +++ b/lib/Target/TargetAsmInfo.cpp @@ -228,9 +228,7 @@ TargetAsmInfo::SectionFlagsForGlobal(const GlobalValue *GV, assert(0 && "Unexpected section kind!"); } - if (GV->hasLinkOnceLinkage() || - GV->hasWeakLinkage() || - GV->hasCommonLinkage()) + if (GV->isWeakForLinker()) Flags |= SectionFlags::Linkonce; } @@ -289,9 +287,7 @@ std::string TargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const { SectionKind::Kind Kind = SectionKindForGlobal(GV); - if (GV->hasLinkOnceLinkage() || - GV->hasWeakLinkage() || - GV->hasCommonLinkage()) + if (GV->isWeakForLinker()) return UniqueSectionForGlobal(GV, Kind); else { if (Kind == SectionKind::Text) |
