summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetLoweringObjectFile.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-01 23:46:12 +0000
committerChris Lattner <sabre@nondot.org>2009-08-01 23:46:12 +0000
commit0c40266b5a7a58774a2f33128b68d45ee1801920 (patch)
treec41d72b1ac2817e6b48458630d1468a03482cd9b /llvm/lib/Target/TargetLoweringObjectFile.cpp
parentcc71620c866ad7b5bc7c451704e04374c68ef963 (diff)
downloadbcm5719-llvm-0c40266b5a7a58774a2f33128b68d45ee1801920.tar.gz
bcm5719-llvm-0c40266b5a7a58774a2f33128b68d45ee1801920.zip
Remove "JumpTableDataSection" from TAI, instead, have AsmPrinter
compute it based on what it knows. As part of this, rename getSectionForMergeableConstant to getSectionForConstant because it works for non-mergable constants also. The only functionality change from this is that Xcore will start dropping its jump tables into readonly section instead of data section in -static mode. This should be fine as the linker resolves the relocations. If this is a problem, let me know and we'll come up with another solution. llvm-svn: 77833
Diffstat (limited to 'llvm/lib/Target/TargetLoweringObjectFile.cpp')
-rw-r--r--llvm/lib/Target/TargetLoweringObjectFile.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/llvm/lib/Target/TargetLoweringObjectFile.cpp b/llvm/lib/Target/TargetLoweringObjectFile.cpp
index 84247790f45..7eb9a4a4ebf 100644
--- a/llvm/lib/Target/TargetLoweringObjectFile.cpp
+++ b/llvm/lib/Target/TargetLoweringObjectFile.cpp
@@ -228,12 +228,11 @@ TargetLoweringObjectFile::SelectSectionForGlobal(const GlobalValue *GV,
return getDataSection();
}
-/// getSectionForMergableConstant - Given a mergable constant with the
+/// getSectionForConstant - Given a mergable constant with the
/// specified size and relocation information, return a section that it
/// should be placed in.
const MCSection *
-TargetLoweringObjectFile::
-getSectionForMergeableConstant(SectionKind Kind) const {
+TargetLoweringObjectFile::getSectionForConstant(SectionKind Kind) const {
if (Kind.isReadOnly() && ReadOnlySection != 0)
return ReadOnlySection;
@@ -459,11 +458,11 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
return DataRelROSection;
}
-/// getSectionForMergeableConstant - Given a mergeable constant with the
+/// getSectionForConstant - Given a mergeable constant with the
/// specified size and relocation information, return a section that it
/// should be placed in.
const MCSection *TargetLoweringObjectFileELF::
-getSectionForMergeableConstant(SectionKind Kind) const {
+getSectionForConstant(SectionKind Kind) const {
if (Kind.isMergeableConst4())
return MergeableConst4Section;
if (Kind.isMergeableConst8())
@@ -582,8 +581,7 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
}
const MCSection *
-TargetLoweringObjectFileMachO::
-getSectionForMergeableConstant(SectionKind Kind) const {
+TargetLoweringObjectFileMachO::getSectionForConstant(SectionKind Kind) const {
// If this constant requires a relocation, we have to put it in the data
// segment, not in the text segment.
if (Kind.isDataRel())
OpenPOWER on IntegriCloud