mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +00:00
Get MCSymbol out of the mangling business, and move all the logic
to Mangler. Now MCSymbol just decides whether to slap quotes around a symbol when printing it. This also fixes some weirdness where two MCSymbols could be created for the same symbol, if one needed to be mangled and got mangled to the other one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93690 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -579,18 +579,11 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
|
||||
// into a 'uniqued' section name, create and return the section now.
|
||||
if (GV->isWeakForLinker()) {
|
||||
const char *Prefix = getSectionPrefixForUniqueGlobal(Kind);
|
||||
SmallString<128> Name, MangledName;
|
||||
SmallString<128> Name;
|
||||
Name.append(Prefix, Prefix+strlen(Prefix));
|
||||
Mang->getNameWithPrefix(Name, GV, false);
|
||||
|
||||
raw_svector_ostream OS(MangledName);
|
||||
MCSymbol::printMangledName(Name, OS, 0);
|
||||
OS.flush();
|
||||
|
||||
return getELFSection(MangledName.str(),
|
||||
getELFSectionType(MangledName.str(), Kind),
|
||||
getELFSectionFlags(Kind),
|
||||
Kind);
|
||||
return getELFSection(Name.str(), getELFSectionType(Name.str(), Kind),
|
||||
getELFSectionFlags(Kind), Kind);
|
||||
}
|
||||
|
||||
if (Kind.isText()) return TextSection;
|
||||
|
Reference in New Issue
Block a user