[PATCH] D22312: [MC] Cleanup Assembly directive parsing handling of newlines

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 13 12:34:59 PDT 2016


rnk added inline comments.

================
Comment at: lib/MC/MCParser/AsmParser.cpp:2991-2993
@@ -2990,4 +2990,5 @@
 
   if (getLexer().isNot(AsmToken::EndOfStatement))
     return TokError("unexpected token in '.file' directive");
+  Lex();
 
----------------
I'm surprised the MCParser doesn't have something like LLParser::ParseToken, which consumes the expected token if present and returns an error if not present.

Can you add that and use it?


http://reviews.llvm.org/D22312





More information about the llvm-commits mailing list