summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitdd2096898b9f99d4821d109a56f1cc9ab02673b2 (patch)
tree7073b8b024c10f42f78cd4b4869cec62746397cd /llvm/lib/Target/DarwinTargetAsmInfo.cpp
parentfebe552dbd7de290021c32a58c8eb1cf57cb56f7 (diff)
downloadbcm5719-llvm-dd2096898b9f99d4821d109a56f1cc9ab02673b2.tar.gz
bcm5719-llvm-dd2096898b9f99d4821d109a56f1cc9ab02673b2.zip
hoist section name uniquing logic up to the top-level SectionForGlobal
implementation, eliminating a dupe. llvm-svn: 76953
Diffstat (limited to 'llvm/lib/Target/DarwinTargetAsmInfo.cpp')
-rw-r--r--llvm/lib/Target/DarwinTargetAsmInfo.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Target/DarwinTargetAsmInfo.cpp b/llvm/lib/Target/DarwinTargetAsmInfo.cpp
index 0ea9bd16661..c25040ca600 100644
--- a/llvm/lib/Target/DarwinTargetAsmInfo.cpp
+++ b/llvm/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()));
OpenPOWER on IntegriCloud