mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-22 03:39:03 +00: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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104466 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fdb5a86179
commit
01777ff094
@ -432,6 +432,7 @@ bool AsmParser::ParseBinOpRHS(unsigned Precedence, const MCExpr *&Res,
|
|||||||
/// ::= Label* Identifier OperandList* EndOfStatement
|
/// ::= Label* Identifier OperandList* EndOfStatement
|
||||||
bool AsmParser::ParseStatement() {
|
bool AsmParser::ParseStatement() {
|
||||||
if (Lexer.is(AsmToken::EndOfStatement)) {
|
if (Lexer.is(AsmToken::EndOfStatement)) {
|
||||||
|
Out.AddBlankLine();
|
||||||
Lex();
|
Lex();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -506,6 +507,14 @@ bool AsmParser::ParseStatement() {
|
|||||||
// Emit the label.
|
// Emit the label.
|
||||||
Out.EmitLabel(Sym);
|
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();
|
return ParseStatement();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user