If ELF subtargets don't want to support 4/8/16-byte mergable sections, allow
authorChris Lattner <sabre@nondot.org>
Sat, 15 Aug 2009 06:08:34 +0000 (06:08 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 15 Aug 2009 06:08:34 +0000 (06:08 +0000)
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

index 4be0b9e4e0904320939546315213565d1e5b0017..a695e2412cf84ba95d1ef29f6ddbf5c875762488 100644 (file)
@@ -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
   }