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 | 272416fda946b1aa87c069bd4eba237498fe0ae8 (patch) | |
tree | 3b8d5b21864468ff9bfb26fedda9ffe86d61fc55 /llvm/lib/MC/MCSymbol.cpp | |
parent | edecc3839553adedd004b87081b9fa248df7a428 (diff) | |
download | llvm-272416fda946b1aa87c069bd4eba237498fe0ae8.zip llvm-272416fda946b1aa87c069bd4eba237498fe0ae8.tar.gz llvm-272416fda946b1aa87c069bd4eba237498fe0ae8.tar.bz2 |
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.
llvm-svn: 192775
Diffstat (limited to 'llvm/lib/MC/MCSymbol.cpp')
-rw-r--r-- | llvm/lib/MC/MCSymbol.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCSymbol.cpp b/llvm/lib/MC/MCSymbol.cpp index f386c3b..b973c57 100644 --- a/llvm/lib/MC/MCSymbol.cpp +++ b/llvm/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 |