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

[RISCV] When parsing vsetvli in the assembler, use StringRef::getAsInteger...

[RISCV] When parsing vsetvli in the assembler, use StringRef::getAsInteger instead of APInt's string constructor

APInt's string constructor asserts on error. Since this is the parser and we don't yet know if the string is a valid integer we shouldn't use that.

Instead use StringRef::getAsInteger which returns a bool to indicate success or failure.

Since we no longer need APInt, use 'unsigned' instead.

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