[PATCH] MC asm parser: allow @'s in symbol names in MS assembly

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Fri Oct 18 11:55:53 PDT 2013


  Do we already have a testcase showing that we reject foo at bar on ELF? If not, it would be a good idea to add one.


================
Comment at: lib/MC/MCParser/AsmLexer.cpp:143
@@ -142,3 +142,3 @@
 static bool IsIdentifierChar(char c) {
-  return isalnum(c) || c == '_' || c == '$' || c == '.' || c == '@';
+  return isalnum(c) || c == '_' || c == '$' || c == '.' || c == '@' || c == '?';
 }
----------------
adding support for ? in a name can be an independent change, no?

btw, on linux gas rejects

.globl foo?bar

Should be reject too? I am tempted to just accept it everywhere as an extension, since it doesn't look ambiguous (unlike the @) 


http://llvm-reviews.chandlerc.com/D1978



More information about the llvm-commits mailing list