mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76705 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user