[llvm] 417324a - [RISCV] Remove unnecessary ArrayRef. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 13 11:43:10 PDT 2024
Author: Craig Topper
Date: 2024-03-13T11:38:09-07:00
New Revision: 417324a6c1e7ecb6c145b20905f918378cc824e3
URL: https://github.com/llvm/llvm-project/commit/417324a6c1e7ecb6c145b20905f918378cc824e3
DIFF: https://github.com/llvm/llvm-project/commit/417324a6c1e7ecb6c145b20905f918378cc824e3.diff
LOG: [RISCV] Remove unnecessary ArrayRef. NFC
Added:
Modified:
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp b/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
index caff0e8fcefe23..0607240efff8fd 100644
--- a/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+++ b/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
@@ -2823,9 +2823,8 @@ bool RISCVAsmParser::parseDirectiveOption() {
break;
}
- ArrayRef<SubtargetFeatureKV> KVArray(RISCVFeatureKV);
- auto Ext = llvm::lower_bound(KVArray, Arch);
- if (Ext == KVArray.end() || StringRef(Ext->Key) != Arch ||
+ auto Ext = llvm::lower_bound(RISCVFeatureKV, Arch);
+ if (Ext == std::end(RISCVFeatureKV) || StringRef(Ext->Key) != Arch ||
!RISCVISAInfo::isSupportedExtension(Arch)) {
if (isDigit(Arch.back()))
return Error(
@@ -2858,7 +2857,7 @@ bool RISCVAsmParser::parseDirectiveOption() {
// It is invalid to disable an extension that there are other enabled
// extensions depend on it.
// TODO: Make use of RISCVISAInfo to handle this
- for (auto Feature : KVArray) {
+ for (auto Feature : RISCVFeatureKV) {
if (getSTI().hasFeature(Feature.Value) &&
Feature.Implies.test(Ext->Value))
return Error(Loc,
More information about the llvm-commits
mailing list