[PATCH] D45948: [MIRParser] Allow register class names in the form of integer/scalar
Francis Visoiu Mistrih via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 3 01:09:46 PDT 2018
thegameg added inline comments.
================
Comment at: lib/CodeGen/MIRParser/MIParser.cpp:1283
bool MIParser::parseLowLevelType(StringRef::iterator Loc, LLT &Ty) {
- if (Token.is(MIToken::ScalarType)) {
+ if (Token.range().front() == 's') {
Ty = LLT::scalar(APSInt(Token.range().drop_front()).getZExtValue());
----------------
To keep the same behaviour as before, we need to check that the following characters are digits and error out if not. If not, I think this will assert in APInt instead of emitting a parsing error.
Repository:
rL LLVM
https://reviews.llvm.org/D45948
More information about the llvm-commits
mailing list