Skip to content

Commit 06ac457

Browse files
committed
Use reference type
1 parent e57522f commit 06ac457

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Support/RISCVISAInfo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ RISCVISAInfo::parseArchString(StringRef Arch, bool EnableExperimentalExtension,
900900
if (auto E = splitExtsByUnderscore(Exts, SplitedExts))
901901
return std::move(E);
902902

903-
for (auto Ext : SplitedExts) {
903+
for (auto &Ext : SplitedExts) {
904904
StringRef CurrExt = Ext;
905905
while (!CurrExt.empty()) {
906906
if (AllStdExts.contains(CurrExt.front())) {
@@ -935,8 +935,8 @@ RISCVISAInfo::parseArchString(StringRef Arch, bool EnableExperimentalExtension,
935935
}
936936

937937
// Check all Extensions are supported.
938-
for (auto SeenExtAndVers : SeenExtMap) {
939-
std::string ExtName = SeenExtAndVers.first;
938+
for (auto &SeenExtAndVers : SeenExtMap) {
939+
const std::string &ExtName = SeenExtAndVers.first;
940940
RISCVISAInfo::ExtensionVersion ExtVers = SeenExtAndVers.second;
941941

942942
if (!RISCVISAInfo::isSupportedExtension(ExtName)) {

0 commit comments

Comments
 (0)