diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2013-10-16 08:22:49 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2013-10-16 08:22:49 +0000 |
commit | 32c24da3730e8e5ea7df3ce7aeffa257b2e7f02f (patch) | |
tree | 4c6d79cde1fda06ead191438dfbdf8ef01c5ea67 /lib/MC/MCSymbol.cpp | |
parent | 2369bf9ecf6f5ee1d06e44a4e9a7849060146f07 (diff) | |
download | llvm-32c24da3730e8e5ea7df3ce7aeffa257b2e7f02f.tar.gz llvm-32c24da3730e8e5ea7df3ce7aeffa257b2e7f02f.tar.bz2 llvm-32c24da3730e8e5ea7df3ce7aeffa257b2e7f02f.tar.xz |
Revert r192758 (and r192759), "MC: Better handling of tricky symbol and section names"
GNU AS didn't like quotes in symbol names.
Error: junk at end of line, first unrecognized character is `"'
.def "@feat.00";
"@feat.00" = 1
Reproduced on Cygwin's 2.23.52.20130309 and mingw32's 2.20.1.20100303.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192775 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCSymbol.cpp')
-rw-r--r-- | lib/MC/MCSymbol.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/MC/MCSymbol.cpp b/lib/MC/MCSymbol.cpp index f386c3bc90..b973c57f7b 100644 --- a/lib/MC/MCSymbol.cpp +++ b/lib/MC/MCSymbol.cpp @@ -18,10 +18,12 @@ const MCSection *MCSymbol::AbsolutePseudoSection = reinterpret_cast<const MCSection *>(1); static bool isAcceptableChar(char C) { - return (C >= 'a' && C <= 'z') || - (C >= 'A' && C <= 'Z') || - (C >= '0' && C <= '9') || - C == '_' || C == '$' || C == '.'; + if ((C < 'a' || C > 'z') && + (C < 'A' || C > 'Z') && + (C < '0' || C > '9') && + C != '_' && C != '$' && C != '.' && C != '@') + return false; + return true; } /// NameNeedsQuoting - Return true if the identifier \p Str needs quotes to be |