Skip to content

Commit 417324a

Browse files
committed
[RISCV] Remove unnecessary ArrayRef. NFC
1 parent 06e310f commit 417324a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2823,9 +2823,8 @@ bool RISCVAsmParser::parseDirectiveOption() {
28232823
break;
28242824
}
28252825

2826-
ArrayRef<SubtargetFeatureKV> KVArray(RISCVFeatureKV);
2827-
auto Ext = llvm::lower_bound(KVArray, Arch);
2828-
if (Ext == KVArray.end() || StringRef(Ext->Key) != Arch ||
2826+
auto Ext = llvm::lower_bound(RISCVFeatureKV, Arch);
2827+
if (Ext == std::end(RISCVFeatureKV) || StringRef(Ext->Key) != Arch ||
28292828
!RISCVISAInfo::isSupportedExtension(Arch)) {
28302829
if (isDigit(Arch.back()))
28312830
return Error(
@@ -2858,7 +2857,7 @@ bool RISCVAsmParser::parseDirectiveOption() {
28582857
// It is invalid to disable an extension that there are other enabled
28592858
// extensions depend on it.
28602859
// TODO: Make use of RISCVISAInfo to handle this
2861-
for (auto Feature : KVArray) {
2860+
for (auto Feature : RISCVFeatureKV) {
28622861
if (getSTI().hasFeature(Feature.Value) &&
28632862
Feature.Implies.test(Ext->Value))
28642863
return Error(Loc,

0 commit comments

Comments
 (0)