mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
MC: Allow targets to stop symbol name quoting
Currently symbol names are printed in quotes if it contains something outside of the arbitrary set of characters that isAcceptableChar tests for. On somem targets, it is never OK to print a symbol name in quotes so allow targets to opt out of this behavior. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235670 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -125,7 +125,8 @@ MCSymbol *MCContext::getOrCreateSectionSymbol(const MCSectionELF &Section) {
|
||||
}
|
||||
|
||||
auto NameIter = UsedNames.insert(std::make_pair(Name, true)).first;
|
||||
Sym = new (*this) MCSymbol(NameIter->getKey(), /*isTemporary*/ false);
|
||||
Sym = new (*this) MCSymbol(NameIter->getKey(), /*isTemporary*/ false,
|
||||
MAI->noSymbolNameQuoting());
|
||||
|
||||
if (!OldSym)
|
||||
OldSym = Sym;
|
||||
@@ -163,7 +164,8 @@ MCSymbol *MCContext::CreateSymbol(StringRef Name, bool AlwaysAddSuffix) {
|
||||
// Ok, we found a name. Have the MCSymbol object itself refer to the copy
|
||||
// of the string that is embedded in the UsedNames entry.
|
||||
MCSymbol *Result =
|
||||
new (*this) MCSymbol(NameEntry.first->getKey(), IsTemporary);
|
||||
new (*this) MCSymbol(NameEntry.first->getKey(), IsTemporary,
|
||||
MAI->noSymbolNameQuoting());
|
||||
return Result;
|
||||
}
|
||||
assert(IsTemporary && "Cannot rename non-temporary symbols");
|
||||
|
Reference in New Issue
Block a user