summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetLoweringObjectFile.cpp
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
commitddb991c255e41ca3d110d528175e361689099321 (patch)
treefedf9123e0afdb59e2f5704efee91903554c79a8 /llvm/lib/Target/TargetLoweringObjectFile.cpp
parent0fbe0f51a4a3ccc8ca817d4fd6af4df7b85204cf (diff)
downloadbcm5719-llvm-ddb991c255e41ca3d110d528175e361689099321.tar.gz
bcm5719-llvm-ddb991c255e41ca3d110d528175e361689099321.zip
If ELF subtargets don't want to support 4/8/16-byte mergable sections, allow
them to null out the default section pointers. llvm-svn: 79078
Diffstat (limited to 'llvm/lib/Target/TargetLoweringObjectFile.cpp')
-rw-r--r--llvm/lib/Target/TargetLoweringObjectFile.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/TargetLoweringObjectFile.cpp b/llvm/lib/Target/TargetLoweringObjectFile.cpp
index 4be0b9e4e09..a695e2412cf 100644
--- a/llvm/lib/Target/TargetLoweringObjectFile.cpp
+++ b/llvm/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
}
OpenPOWER on IntegriCloud