mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
llvm-mc: Use AddBlankLine in asm parser. This makes transliteration match the input much more closely, and also makes the API calls from the AsmParser and CodeGen line up better.
llvm-svn: 104466
This commit is contained in:
parent
eb23d9ac22
commit
e87e067d2c
@ -432,6 +432,7 @@ bool AsmParser::ParseBinOpRHS(unsigned Precedence, const MCExpr *&Res,
|
||||
/// ::= Label* Identifier OperandList* EndOfStatement
|
||||
bool AsmParser::ParseStatement() {
|
||||
if (Lexer.is(AsmToken::EndOfStatement)) {
|
||||
Out.AddBlankLine();
|
||||
Lex();
|
||||
return false;
|
||||
}
|
||||
@ -506,6 +507,14 @@ bool AsmParser::ParseStatement() {
|
||||
// Emit the label.
|
||||
Out.EmitLabel(Sym);
|
||||
|
||||
// Consume any end of statement token, if present, to avoid spurious
|
||||
// AddBlankLine calls().
|
||||
if (Lexer.is(AsmToken::EndOfStatement)) {
|
||||
Lex();
|
||||
if (Lexer.is(AsmToken::Eof))
|
||||
return false;
|
||||
}
|
||||
|
||||
return ParseStatement();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user