summaryrefslogtreecommitdiff
path: root/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2012-02-23 10:36:04 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2012-02-23 10:36:04 +0000
commit1d2d5a0227d6f1381f3ffa9c331045bdfa409ee8 (patch)
treea6b096b57b3587d595d21b0209af9fac8f086eeb /lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parentb2ad57a7020e3f2352519b6d75853825d79ca44f (diff)
downloadllvm-1d2d5a0227d6f1381f3ffa9c331045bdfa409ee8.tar.gz
llvm-1d2d5a0227d6f1381f3ffa9c331045bdfa409ee8.tar.bz2
llvm-1d2d5a0227d6f1381f3ffa9c331045bdfa409ee8.tar.xz
Fix to make sure that a comdat group gets generated correctly for a static member
of instantiated C++ templates. Patch by Kristof Beyls! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151250 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--lib/CodeGen/TargetLoweringObjectFileImpl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index 273f6b6162..9925185be1 100644
--- a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -188,6 +188,7 @@ getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind,
static const char *getSectionPrefixForGlobal(SectionKind Kind) {
if (Kind.isText()) return ".text.";
if (Kind.isReadOnly()) return ".rodata.";
+ if (Kind.isBSS()) return ".bss.";
if (Kind.isThreadData()) return ".tdata.";
if (Kind.isThreadBSS()) return ".tbss.";
@@ -216,7 +217,7 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
// If this global is linkonce/weak and the target handles this by emitting it
// into a 'uniqued' section name, create and return the section now.
if ((GV->isWeakForLinker() || EmitUniquedSection) &&
- !Kind.isCommon() && !Kind.isBSS()) {
+ !Kind.isCommon()) {
const char *Prefix;
Prefix = getSectionPrefixForGlobal(Kind);