[PATCH] MC: AsmLexer: handle multi-character CommentStrings correctly

Saleem Abdulrasool compnerd at compnerd.org
Mon Jul 28 18:53:39 PDT 2014


The MCParser portion of the change looks much better now.  I am still a bit concerned about the testing.  Can you at least add a test case for the special case of Darwin?

================
Comment at: lib/MC/MCParser/AsmLexer.cpp:465
@@ +464,3 @@
+  if (CommentString[1] == '\0')
+    return  CommentString[0] == Ptr[0];
+
----------------
You have an extra space here.

================
Comment at: lib/MC/MCParser/AsmLexer.cpp:468
@@ +467,3 @@
+  if (CommentString[1] == '#')
+      // FIXME: special case for the bogus comment string in X86MCAsmInfoDarwin
+    return CommentString[0] == Ptr[0];
----------------
This comment feels like it may get out of sync.  There is nothing preventing a backend from claiming that @# is a comment identifier (other than sanity and the fear of a serious beating from a mob of angry developers).

http://reviews.llvm.org/D4597






More information about the llvm-commits mailing list