diff options
author | Richard Osborne <richard@xmos.com> | 2009-08-17 16:37:11 +0000 |
---|---|---|
committer | Richard Osborne <richard@xmos.com> | 2009-08-17 16:37:11 +0000 |
commit | 2a5e23b44ddf1efde1d98bd3379489d93a90d55a (patch) | |
tree | 26262ae54619c2cc9025c30cf4006541abfec116 /lib/Target/TargetLoweringObjectFile.cpp | |
parent | fac8541dd40e01aa2b52962516f9ae67c99720cc (diff) |
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
Diffstat (limited to 'lib/Target/TargetLoweringObjectFile.cpp')
-rw-r--r-- | lib/Target/TargetLoweringObjectFile.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/TargetLoweringObjectFile.cpp b/lib/Target/TargetLoweringObjectFile.cpp index d64cf07b01..8e1351bc06 100644 --- a/lib/Target/TargetLoweringObjectFile.cpp +++ b/lib/Target/TargetLoweringObjectFile.cpp @@ -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; |