mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
use an accessor to simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81997 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
206a357684
commit
3b13d361d0
@ -208,15 +208,12 @@ bool AsmParser::ParsePrimaryExpr(const MCExpr *&Res) {
|
||||
Res = MCUnaryExpr::CreateLNot(Res, getContext());
|
||||
return false;
|
||||
case AsmToken::String:
|
||||
case AsmToken::Identifier: {
|
||||
case AsmToken::Identifier:
|
||||
// This is a label, this should be parsed as part of an expression, to
|
||||
// handle things like LFOO+4.
|
||||
MCSymbol *Sym = CreateSymbol(Lexer.getTok().getIdentifier());
|
||||
|
||||
Res = MCSymbolRefExpr::Create(Sym, getContext());
|
||||
Res = MCSymbolRefExpr::Create(Lexer.getTok().getIdentifier(), getContext());
|
||||
Lexer.Lex(); // Eat identifier.
|
||||
return false;
|
||||
}
|
||||
case AsmToken::Integer:
|
||||
Res = MCConstantExpr::Create(Lexer.getTok().getIntVal(), getContext());
|
||||
Lexer.Lex(); // Eat token.
|
||||
|
Loading…
Reference in New Issue
Block a user