mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
use an accessor to simplify code.
llvm-svn: 81997
This commit is contained in:
parent
e9d86c0126
commit
fab7b49bb0
@ -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