MC: Better handling of tricky symbol and section names
[oota-llvm.git] / lib / MC / MCSymbol.cpp
index b973c57f7b811fe155b750b0c7175020007262c1..f386c3bc90aca85fc65e8cf1ae96cee334dfcfd7 100644 (file)
@@ -18,12 +18,10 @@ const MCSection *MCSymbol::AbsolutePseudoSection =
   reinterpret_cast<const MCSection *>(1);
 
 static bool isAcceptableChar(char C) {
-  if ((C < 'a' || C > 'z') &&
-      (C < 'A' || C > 'Z') &&
-      (C < '0' || C > '9') &&
-      C != '_' && C != '$' && C != '.' && C != '@')
-    return false;
-  return true;
+  return (C >= 'a' && C <= 'z') ||
+         (C >= 'A' && C <= 'Z') ||
+         (C >= '0' && C <= '9') ||
+         C == '_' || C == '$' || C == '.';
 }
 
 /// NameNeedsQuoting - Return true if the identifier \p Str needs quotes to be