mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 22:28:18 +00:00
Remove the XCore custom implementation of MergeableConstSection, relying on
the generic ELF version instead. This will result in its mergable constant sections getting named ".rodata.cst4" instead of ".cp.const4", but the linker looks at the section flags, not the name of the section AFAICT. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76659 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -89,23 +89,6 @@ XCoreTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const {
|
|||||||
return ELFTargetAsmInfo::SelectSectionForGlobal(GV);
|
return ELFTargetAsmInfo::SelectSectionForGlobal(GV);
|
||||||
}
|
}
|
||||||
|
|
||||||
const Section*
|
|
||||||
XCoreTargetAsmInfo::MergeableConstSection(const Type *Ty) const {
|
|
||||||
const TargetData *TD = TM.getTargetData();
|
|
||||||
|
|
||||||
unsigned Size = TD->getTypeAllocSize(Ty);
|
|
||||||
if (Size == 4 || Size == 8 || Size == 16) {
|
|
||||||
std::string Name = ".cp.const" + utostr(Size);
|
|
||||||
|
|
||||||
return getNamedSection(Name.c_str(),
|
|
||||||
SectionFlags::setEntitySize(SectionFlags::Mergeable |
|
|
||||||
SectionFlags::Small,
|
|
||||||
Size));
|
|
||||||
}
|
|
||||||
|
|
||||||
return getReadOnlySection();
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned XCoreTargetAsmInfo::
|
unsigned XCoreTargetAsmInfo::
|
||||||
SectionFlagsForGlobal(const GlobalValue *GV, const char* Name) const {
|
SectionFlagsForGlobal(const GlobalValue *GV, const char* Name) const {
|
||||||
unsigned Flags = ELFTargetAsmInfo::SectionFlagsForGlobal(GV, Name);
|
unsigned Flags = ELFTargetAsmInfo::SectionFlagsForGlobal(GV, Name);
|
||||||
|
@@ -29,7 +29,6 @@ namespace llvm {
|
|||||||
explicit XCoreTargetAsmInfo(const XCoreTargetMachine &TM);
|
explicit XCoreTargetAsmInfo(const XCoreTargetMachine &TM);
|
||||||
|
|
||||||
virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
|
virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
|
||||||
const Section* MergeableConstSection(const Type *Ty) const;
|
|
||||||
virtual unsigned
|
virtual unsigned
|
||||||
SectionFlagsForGlobal(const GlobalValue *GV = NULL,
|
SectionFlagsForGlobal(const GlobalValue *GV = NULL,
|
||||||
const char* name = NULL) const;
|
const char* name = NULL) const;
|
||||||
|
Reference in New Issue
Block a user