aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-21 22:30:39 +0000
committerChris Lattner <sabre@nondot.org>2009-07-21 22:30:39 +0000
commit5626b8804736a544735cae9550f836b2ca57bc45 (patch)
treeef5e08645eee599c2d57ea2a29f53c1cee142bc8 /llvm/lib
parent0d982f9a8ac33b37b8b1e25cdf7b57785071d647 (diff)
downloadllvm-5626b8804736a544735cae9550f836b2ca57bc45.zip
llvm-5626b8804736a544735cae9550f836b2ca57bc45.tar.gz
llvm-5626b8804736a544735cae9550f836b2ca57bc45.tar.bz2
make some stuff private.
llvm-svn: 76661
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/DarwinTargetAsmInfo.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/llvm/lib/Target/DarwinTargetAsmInfo.cpp b/llvm/lib/Target/DarwinTargetAsmInfo.cpp
index 31c29a7..ec300b9 100644
--- a/llvm/lib/Target/DarwinTargetAsmInfo.cpp
+++ b/llvm/lib/Target/DarwinTargetAsmInfo.cpp
@@ -156,9 +156,9 @@ DarwinTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const {
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 @@ DarwinTargetAsmInfo::MergeableStringSection(const GlobalVariable *GV) const {
}
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();