aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/DarwinTargetAsmInfo.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-24 05:10:25 +0000
committerChris Lattner <sabre@nondot.org>2009-07-24 05:10:25 +0000
commiteed05b804275e5ef835187d66240d7d6e294f8bb (patch)
treef3685ca8b284508a3d6e033e841a06c4ae88c7c9 /lib/Target/DarwinTargetAsmInfo.cpp
parent78717cb63dbc65f76ef2debb72ab48bbf227ef1e (diff)
downloadexternal_llvm-eed05b804275e5ef835187d66240d7d6e294f8bb.zip
external_llvm-eed05b804275e5ef835187d66240d7d6e294f8bb.tar.gz
external_llvm-eed05b804275e5ef835187d66240d7d6e294f8bb.tar.bz2
hoist section name uniquing logic up to the top-level SectionForGlobal
implementation, eliminating a dupe. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76953 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/DarwinTargetAsmInfo.cpp')
-rw-r--r--lib/Target/DarwinTargetAsmInfo.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Target/DarwinTargetAsmInfo.cpp b/lib/Target/DarwinTargetAsmInfo.cpp
index 0ea9bd1..c25040c 100644
--- a/lib/Target/DarwinTargetAsmInfo.cpp
+++ b/lib/Target/DarwinTargetAsmInfo.cpp
@@ -134,16 +134,15 @@ DarwinTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const {
case SectionKind::Text:
if (isWeak)
return TextCoalSection;
- else
- return TextSection;
+ return TextSection;
case SectionKind::Data:
case SectionKind::ThreadData:
case SectionKind::BSS:
case SectionKind::ThreadBSS:
if (cast<GlobalVariable>(GV)->isConstant())
- return (isWeak ? ConstDataCoalSection : ConstDataSection);
- else
- return (isWeak ? DataCoalSection : DataSection);
+ return isWeak ? ConstDataCoalSection : ConstDataSection;
+ return isWeak ? DataCoalSection : DataSection;
+
case SectionKind::ROData:
return (isWeak ? ConstDataCoalSection :
(isNonStatic ? ConstDataSection : getReadOnlySection()));