[PATCH] COFF MC: better handling of tricky symbol and section names

David Majnemer david.majnemer at gmail.com
Tue Oct 15 16:51:12 PDT 2013



================
Comment at: lib/MC/MCParser/AsmParser.cpp:796
@@ -795,1 +795,3 @@
     std::pair<StringRef, StringRef> Split = Identifier.split('@');
+    if (FirstTokenKind == AsmToken::String) {
+      // The identifier was quoted (a string), so don't split it.
----------------
Instead of doing the split and then choosing to ignore it, why not split conditionally?

================
Comment at: lib/MC/MCSectionCOFF.cpp:45
@@ +44,3 @@
+      (C < 'A' || C > 'Z') &&
+      (C < '0' || C > '9') &&
+      C != '_' && C != '$' && C != '.')
----------------
Aren't these three lines equivalent to `std::isalnum(C, std::locale("C"))`?


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



More information about the llvm-commits mailing list