[PATCH] D52298: [RISCV][MC] Add support for evaluating constant symbols as immediates
Shiva Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 26 00:53:02 PDT 2018
shiva0217 added a comment.
Hi Alex, another solution could be calling `parseExpression` for `AsmToken::Identifier` in `RISCVAsmParser::parseImmediate` instead of calling `parseIdentifier`.
case AsmToken::String:
case AsmToken::Identifier: {
if (getParser().parseExpression(Res))
return MatchOperand_ParseFail;
break;
}
`parseExpression` will call `parsePrimaryExpr` which contain the logical to call `parseIdentifier` and also try to get the symbol value when the symbol is variable.
What do you think?
Repository:
rL LLVM
https://reviews.llvm.org/D52298
More information about the llvm-commits
mailing list