mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +00:00
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
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user