make some stuff private.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76661 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/DarwinTargetAsmInfo.cpp b/lib/Target/DarwinTargetAsmInfo.cpp
index 31c29a7..ec300b9 100644
--- a/lib/Target/DarwinTargetAsmInfo.cpp
+++ b/lib/Target/DarwinTargetAsmInfo.cpp
@@ -156,9 +156,9 @@
ConstTextCoalSection :
MergeableStringSection(cast<GlobalVariable>(GV)));
case SectionKind::RODataMergeConst:
- return (isWeak ?
- ConstDataCoalSection:
- MergeableConstSection(cast<GlobalVariable>(GV)));
+ if (isWeak) return ConstDataCoalSection;
+ return MergeableConstSection(cast<GlobalVariable>(GV)
+ ->getInitializer()->getType());
default:
llvm_unreachable("Unsuported section kind for global");
}
@@ -184,13 +184,6 @@
}
const Section*
-DarwinTargetAsmInfo::MergeableConstSection(const GlobalVariable *GV) const {
- Constant *C = GV->getInitializer();
-
- return MergeableConstSection(C->getType());
-}
-
-inline const Section*
DarwinTargetAsmInfo::MergeableConstSection(const Type *Ty) const {
const TargetData *TD = TM.getTargetData();