summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/ELFWriter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-22 00:28:43 +0000
committerChris Lattner <sabre@nondot.org>2009-07-22 00:28:43 +0000
commitb300a4f9884c996fd980f582b0a250e0e5bb96b4 (patch)
tree74daaa0f3c48ff7fa403a94720b95d09a483b18b /llvm/lib/CodeGen/ELFWriter.cpp
parent168190d8225418b755a81daa6ba8082672a3b335 (diff)
downloadbcm5719-llvm-b300a4f9884c996fd980f582b0a250e0e5bb96b4.tar.gz
bcm5719-llvm-b300a4f9884c996fd980f582b0a250e0e5bb96b4.zip
remove the SelectSectionForMachineConst hook, replacing it with
a new getSectionForMergableConstant hook. This removes one dependence of TAI on Type, and provides the hook with enough info to make the right decision based on whether the global has relocations etc. llvm-svn: 76705
Diffstat (limited to 'llvm/lib/CodeGen/ELFWriter.cpp')
-rw-r--r--llvm/lib/CodeGen/ELFWriter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/ELFWriter.cpp b/llvm/lib/CodeGen/ELFWriter.cpp
index f4cd94a988a..8cbaf6f13bd 100644
--- a/llvm/lib/CodeGen/ELFWriter.cpp
+++ b/llvm/lib/CodeGen/ELFWriter.cpp
@@ -155,8 +155,10 @@ ELFSection &ELFWriter::getJumpTableSection() {
// Get a constant pool section based on the section name returned by TAI
ELFSection &ELFWriter::getConstantPoolSection(MachineConstantPoolEntry &CPE) {
+ uint64_t Size = TM.getTargetData()->getTypeAllocSize(CPE.getType());
+
std::string CstPoolName =
- TAI->SelectSectionForMachineConst(CPE.getType())->getName();
+ TAI->getSectionForMergableConstant(Size,CPE.getRelocationInfo())->getName();
return getSection(CstPoolName,
ELFSection::SHT_PROGBITS,
ELFSection::SHF_MERGE | ELFSection::SHF_ALLOC,
OpenPOWER on IntegriCloud