[RISCV] Add function that check extension name with version
commit4b60e1e821b4515466c95082839aecc5c36f19e2
authorPiyou Chen <piyou.chen@sifive.com>
Mon, 21 Aug 2023 03:22:29 +0000 (20 20:22 -0700)
committerPiyou Chen <piyou.chen@sifive.com>
Mon, 21 Aug 2023 04:06:57 +0000 (20 21:06 -0700)
treec844faa609deff75def877b16c5caed74f438fae
parentdc10bd43a103d0e252c4fb4d30913f99b4f418fe
[RISCV] Add function that check extension name with version

Check whether a extension string with version is valid, and get the targetfeature from it.

New functions be used in RISCVISAInfo for https://reviews.llvm.org/D151730.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D152423
llvm/include/llvm/Support/RISCVISAInfo.h
llvm/lib/Support/RISCVISAInfo.cpp
llvm/unittests/Support/RISCVISAInfoTest.cpp