Skip to content
Commit fd6cd1a2 authored by Craig Topper's avatar Craig Topper
Browse files

[RISCV] Refactor parseVTypeI and use ParseFail if we parsed more than one identifier.

Previously we lexed into a SmallVector and unlexed the tokens if
the parsing failed.

This patch gets rid of the SmallVector and the unlexing.

If the first token fails to parse, return MatchFail. This allows us
to fallback to parsing as an immediate. If we successfully parsed the
first token, use ParseFail if any later tokens fail to parse. This
avoids needing to UnLex the tokens.

I've used a state machine to keep track of what component we've
parsed so far.

Reviewed By: asb

Differential Revision: https://reviews.llvm.org/D150753
parent 30c57e27
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment