Fix parsing of a line with only a # in it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142537 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2011-10-19 18:48:52 +00:00
parent b3b6335212
commit 12ae52767f
2 changed files with 17 additions and 1 deletions

View File

@@ -1228,7 +1228,8 @@ bool AsmParser::ParseStatement() {
/// EatToEndOfLine uses the Lexer to eat the characters to the end of the line
/// since they may not be able to be tokenized to get to the end of line token.
void AsmParser::EatToEndOfLine() {
Lexer.LexUntilEndOfLine();
if (!Lexer.is(AsmToken::EndOfStatement))
Lexer.LexUntilEndOfLine();
// Eat EOL.
Lex();
}