llvm.org GIT mirror llvm / 06bf8ff
Merging r142537: ------------------------------------------------------------------------ r142537 | rafael | 2011-10-19 11:48:52 -0700 (Wed, 19 Oct 2011) | 1 line Fix parsing of a line with only a # in it. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_30@142539 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 9 years ago
2 changed file(s) with 17 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
12241224 /// EatToEndOfLine uses the Lexer to eat the characters to the end of the line
12251225 /// since they may not be able to be tokenized to get to the end of line token.
12261226 void AsmParser::EatToEndOfLine() {
1227 Lexer.LexUntilEndOfLine();
1227 if (!Lexer.is(AsmToken::EndOfStatement))
1228 Lexer.LexUntilEndOfLine();
12281229 // Eat EOL.
12291230 Lex();
12301231 }
0 # RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s
1
2 // We used to incorrectly parse a line with only a # in it
3
4 .zero 42
5 #
6 .ifndef FOO
7 .zero 2
8 .else
9 .endif
10 .zero 24
11
12 // CHECK: .zero 42
13 // CHECK-NEXT: .zero 2
14 // CHECK-NEXT: .zero 24