From 2a5e23b44ddf1efde1d98bd3379489d93a90d55a Mon Sep 17 00:00:00 2001 From: Richard Osborne Date: Mon, 17 Aug 2009 16:37:11 +0000 Subject: 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 --- lib/Target/TargetLoweringObjectFile.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/Target/TargetLoweringObjectFile.cpp') 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; -- cgit v1.2.3-18-g5258