Update getSectionForConstant() to to allow mergable sections to be nulled out

if not supported by the ELF subtarget.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79249 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Richard Osborne
2009-08-17 16:37:11 +00:00
parent fac8541dd4
commit 2a5e23b44d
2 changed files with 14 additions and 3 deletions

View File

@ -609,11 +609,11 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
/// should be placed in.
const MCSection *TargetLoweringObjectFileELF::
getSectionForConstant(SectionKind Kind) const {
if (Kind.isMergeableConst4())
if (Kind.isMergeableConst4() && MergeableConst4Section)
return MergeableConst4Section;
if (Kind.isMergeableConst8())
if (Kind.isMergeableConst8() && MergeableConst8Section)
return MergeableConst8Section;
if (Kind.isMergeableConst16())
if (Kind.isMergeableConst16() && MergeableConst16Section)
return MergeableConst16Section;
if (Kind.isReadOnly())
return ReadOnlySection;