Skip to content

Commit fb9c7dd

Browse files
committed
[RISCV] Minor cleanups to RISCVISAInfo::parseArchString. NFC
Remove unneeded an unneeded variable and rename another.
1 parent faad4e3 commit fb9c7dd

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

llvm/lib/Support/RISCVISAInfo.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,6 @@ RISCVISAInfo::parseArchString(StringRef Arch, bool EnableExperimentalExtension,
935935

936936
// The canonical order specified in ISA manual.
937937
// Ref: Table 22.1 in RISC-V User-Level ISA V2.2
938-
StringRef StdExts = AllStdExts;
939938
char Baseline = Arch[4];
940939

941940
// First letter should be 'e', 'i' or 'g'.
@@ -951,7 +950,6 @@ RISCVISAInfo::parseArchString(StringRef Arch, bool EnableExperimentalExtension,
951950
if (Arch.size() > 5 && isDigit(Arch[5]))
952951
return createStringError(errc::invalid_argument,
953952
"version not supported for 'g'");
954-
StdExts = StdExts.drop_front(4);
955953
break;
956954
}
957955

@@ -1001,11 +999,11 @@ RISCVISAInfo::parseArchString(StringRef Arch, bool EnableExperimentalExtension,
1001999
Exts = Exts.drop_front(ConsumeLength);
10021000
Exts.consume_front("_");
10031001

1004-
std::vector<std::string> SplittedExts;
1005-
if (auto E = splitExtsByUnderscore(Exts, SplittedExts))
1002+
std::vector<std::string> SplitExts;
1003+
if (auto E = splitExtsByUnderscore(Exts, SplitExts))
10061004
return std::move(E);
10071005

1008-
for (auto &Ext : SplittedExts) {
1006+
for (auto &Ext : SplitExts) {
10091007
StringRef CurrExt = Ext;
10101008
while (!CurrExt.empty()) {
10111009
if (AllStdExts.contains(CurrExt.front())) {

0 commit comments

Comments
 (0)