From 94a2c1acaee29c4e74e9a2e35dbda7478d4fdb61 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. llvm-svn: 79249 --- llvm/lib/Target/TargetLoweringObjectFile.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Target/TargetLoweringObjectFile.cpp') diff --git a/llvm/lib/Target/TargetLoweringObjectFile.cpp b/llvm/lib/Target/TargetLoweringObjectFile.cpp index d64cf07b01e..8e1351bc065 100644 --- a/llvm/lib/Target/TargetLoweringObjectFile.cpp +++ b/llvm/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