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
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 @@
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()));