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:
Matt Arsenault
2015-04-23 23:34:05 +00:00
parent 589d8fd65d
commit 6ec2992aca
5 changed files with 17 additions and 5 deletions

View File

@@ -51,7 +51,7 @@ void MCSymbol::print(raw_ostream &OS) const {
// some targets support quoting names with funny characters. If the name
// contains a funny character, then print it quoted.
StringRef Name = getName();
if (!NameNeedsQuoting(Name)) {
if (NoQuoting || !NameNeedsQuoting(Name)) {
OS << Name;
return;
}