mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-20 14:29:27 +00:00
improve the default impl of getSectionForMergableConstant by
putting readonly constants in the readonly section if we have one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77131 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
af89a96c6b
commit
7f88a20f67
@ -364,8 +364,10 @@ TargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV,
|
||||
const Section *
|
||||
TargetAsmInfo::getSectionForMergableConstant(uint64_t Size,
|
||||
unsigned ReloInfo) const {
|
||||
// FIXME: Support data.rel stuff someday
|
||||
// Lame default implementation. Calculate the section name for machine const.
|
||||
if (ReloInfo == 0)
|
||||
if (const Section *S = getReadOnlySection())
|
||||
return S;
|
||||
|
||||
return getDataSection();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user