summaryrefslogtreecommitdiffstats
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
parent0d982f9a8ac33b37b8b1e25cdf7b57785071d647 (diff)
downloadbcm5719-llvm-5626b8804736a544735cae9550f836b2ca57bc45.tar.gz
bcm5719-llvm-5626b8804736a544735cae9550f836b2ca57bc45.zip
make some stuff private.
llvm-svn: 76661
-rw-r--r--llvm/include/llvm/Target/DarwinTargetAsmInfo.h5
-rw-r--r--llvm/include/llvm/Target/ELFTargetAsmInfo.h6
-rw-r--r--llvm/lib/Target/DarwinTargetAsmInfo.cpp13
3 files changed, 10 insertions, 14 deletions
diff --git a/llvm/include/llvm/Target/DarwinTargetAsmInfo.h b/llvm/include/llvm/Target/DarwinTargetAsmInfo.h
index 171a6b3e117..8eef95dfa4c 100644
--- a/llvm/include/llvm/Target/DarwinTargetAsmInfo.h
+++ b/llvm/include/llvm/Target/DarwinTargetAsmInfo.h
@@ -39,10 +39,11 @@ namespace llvm {
SectionKind::Kind kind) const;
virtual bool emitUsedDirectiveFor(const GlobalValue *GV,
Mangler *Mang) const;
- const Section* MergeableConstSection(const GlobalVariable *GV) const;
+ const Section* SelectSectionForMachineConst(const Type *Ty) const;
+
+ private:
const Section* MergeableConstSection(const Type *Ty) const;
const Section* MergeableStringSection(const GlobalVariable *GV) const;
- const Section* SelectSectionForMachineConst(const Type *Ty) const;
};
}
diff --git a/llvm/include/llvm/Target/ELFTargetAsmInfo.h b/llvm/include/llvm/Target/ELFTargetAsmInfo.h
index ecde4ee8303..fd269a14306 100644
--- a/llvm/include/llvm/Target/ELFTargetAsmInfo.h
+++ b/llvm/include/llvm/Target/ELFTargetAsmInfo.h
@@ -28,8 +28,6 @@ namespace llvm {
SectionKind::Kind SectionKindForGlobal(const GlobalValue *GV) const;
virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
virtual std::string printSectionFlags(unsigned flags) const;
- const Section* MergeableConstSection(const Type *Ty) const;
- const Section* MergeableStringSection(const GlobalVariable *GV) const;
virtual const Section*
SelectSectionForMachineConst(const Type *Ty) const;
@@ -37,6 +35,10 @@ namespace llvm {
const Section* DataRelLocalSection;
const Section* DataRelROSection;
const Section* DataRelROLocalSection;
+
+ private:
+ const Section* MergeableConstSection(const Type *Ty) const;
+ const Section* MergeableStringSection(const GlobalVariable *GV) const;
};
}
diff --git a/llvm/lib/Target/DarwinTargetAsmInfo.cpp b/llvm/lib/Target/DarwinTargetAsmInfo.cpp
index 31c29a72bdf..ec300b93737 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();
OpenPOWER on IntegriCloud