diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-10-19 18:48:52 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-10-19 18:48:52 +0000 |
commit | 12ae52767f2d0e4312ba059c0e97ed8beb9777d5 (patch) | |
tree | c0c03f755d3975a0e1abd64dddc66dfc28224274 /lib/MC | |
parent | b3b6335212451b348dd86dd27a0086de7fb232bc (diff) | |
download | external_llvm-12ae52767f2d0e4312ba059c0e97ed8beb9777d5.zip external_llvm-12ae52767f2d0e4312ba059c0e97ed8beb9777d5.tar.gz external_llvm-12ae52767f2d0e4312ba059c0e97ed8beb9777d5.tar.bz2 |
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
Diffstat (limited to 'lib/MC')
-rw-r--r-- | lib/MC/MCParser/AsmParser.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp index 4e8e15c..d7ee1c4 100644 --- a/lib/MC/MCParser/AsmParser.cpp +++ b/lib/MC/MCParser/AsmParser.cpp @@ -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(); } |