From 203b3e9e2a61be88e8d36a58c5615712e34c6a47 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 15 Aug 2009 06:08:34 +0000 Subject: [PATCH] If ELF subtargets don't want to support 4/8/16-byte mergable sections, allow them to null out the default section pointers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79078 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/TargetLoweringObjectFile.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Target/TargetLoweringObjectFile.cpp b/lib/Target/TargetLoweringObjectFile.cpp index 4be0b9e4e09..a695e2412cf 100644 --- a/lib/Target/TargetLoweringObjectFile.cpp +++ b/lib/Target/TargetLoweringObjectFile.cpp @@ -578,11 +578,11 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, } if (Kind.isMergeableConst()) { - 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; return ReadOnlySection; // .const }