Newer
Older
if (GV->isWeakForLinker()) {
const char *Prefix = getCOFFSectionPrefixForUniqueGlobal(Kind);
SmallString<128> Name(Prefix, Prefix+strlen(Prefix));
Name.append(Sym->getName().begin() + 1, Sym->getName().end());
unsigned Characteristics = getCOFFSectionFlags(Kind);
Daniel Dunbar
committed
Characteristics |= COFF::IMAGE_SCN_LNK_COMDAT;
return getContext().getCOFFSection(Name.str(), Characteristics,
Anton Korobeynikov
committed
COFF::IMAGE_COMDAT_SELECT_ANY, Kind);
}
if (Kind.isText())
return getTextSection();
return getDataSection();
}