diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2012-02-23 10:36:04 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2012-02-23 10:36:04 +0000 |
commit | a22828e085778dc6e27241f0c6738b09ec28a796 (patch) | |
tree | f73c2fee33963406782d30377d41656f5a0f159e /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | 585dda99f68c90c6381a5b045d751ccd911ee8d3 (diff) | |
download | bcm5719-llvm-a22828e085778dc6e27241f0c6738b09ec28a796.tar.gz bcm5719-llvm-a22828e085778dc6e27241f0c6738b09ec28a796.zip |
Fix to make sure that a comdat group gets generated correctly for a static member
of instantiated C++ templates.
Patch by Kristof Beyls!
llvm-svn: 151250
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 273f6b61624..9925185be12 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/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); |