aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/TargetAsmInfo.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2008-07-09 13:27:59 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2008-07-09 13:27:59 +0000
commitc33a744f0e8fc43deab7f4ce6aa3664cf911f589 (patch)
treedc3b35af62a4b72bcb41a7ef7eb3facba842e701 /lib/Target/TargetAsmInfo.cpp
parent93911d239ba4b9f2929617255f95a8e3c8994c83 (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.cpp8
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)