aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-15 06:08:34 +0000
committerChris Lattner <sabre@nondot.org>2009-08-15 06:08:34 +0000
commit0a9ec09601eac8953e257e6c1d1d70f58d2d1998 (patch)
tree42988c24623e461c42774b07dc55ec73f6db9530
parent8d063b7235807651df1b1b4d0661dbcc286c1949 (diff)
downloadexternal_llvm-0a9ec09601eac8953e257e6c1d1d70f58d2d1998.zip
external_llvm-0a9ec09601eac8953e257e6c1d1d70f58d2d1998.tar.gz
external_llvm-0a9ec09601eac8953e257e6c1d1d70f58d2d1998.tar.bz2
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
-rw-r--r--lib/Target/TargetLoweringObjectFile.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/TargetLoweringObjectFile.cpp b/lib/Target/TargetLoweringObjectFile.cpp
index 4be0b9e..a695e24 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
}