aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-26 07:07:01 +0000
committerChris Lattner <sabre@nondot.org>2009-07-26 07:07:01 +0000
commit542fc3ac125c9a766e462daa65172b830e5777f9 (patch)
treee23251b175b6dbfe6e3595c821e4457dca7e608a
parented0c676d4ee8f25d06297caa81502efa3f65782e (diff)
downloadexternal_llvm-542fc3ac125c9a766e462daa65172b830e5777f9.zip
external_llvm-542fc3ac125c9a766e462daa65172b830e5777f9.tar.gz
external_llvm-542fc3ac125c9a766e462daa65172b830e5777f9.tar.bz2
simplify this code now that SectionKind knows if a global is weak or not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77141 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/DarwinTargetAsmInfo.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Target/DarwinTargetAsmInfo.cpp b/lib/Target/DarwinTargetAsmInfo.cpp
index 503df19..845da66 100644
--- a/lib/Target/DarwinTargetAsmInfo.cpp
+++ b/lib/Target/DarwinTargetAsmInfo.cpp
@@ -129,15 +129,12 @@ DarwinTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV,
SectionKind Kind) const {
assert(!Kind.isThreadLocal() && "Darwin doesn't support TLS");
- // FIXME: Use sectionflags:linkonce instead of isWeakForLinker() here.
- bool isWeak = GV->isWeakForLinker();
-
if (Kind.isText())
- return isWeak ? TextCoalSection : TextSection;
+ return Kind.isWeak() ? TextCoalSection : TextSection;
// If this is weak/linkonce, put this in a coalescable section, either in text
// or data depending on if it is writable.
- if (isWeak) {
+ if (Kind.isWeak()) {
if (Kind.isReadOnly())
return ConstTextCoalSection;
return DataCoalSection;