Skip to content

Commit b04637e

Browse files
committed
Use reference type
1 parent 39a81c4 commit b04637e

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
@@ -904,7 +904,7 @@ RISCVISAInfo::parseArchString(StringRef Arch, bool EnableExperimentalExtension,
904904
if (auto E = splitExtsByUnderscore(Exts, SplitedExts))
905905
return std::move(E);
906906

907-
for (auto Ext : SplitedExts) {
907+
for (auto &Ext : SplitedExts) {
908908
StringRef CurrExt = Ext;
909909
while (!CurrExt.empty()) {
910910
if (AllStdExts.contains(CurrExt.front())) {
@@ -939,8 +939,8 @@ RISCVISAInfo::parseArchString(StringRef Arch, bool EnableExperimentalExtension,
939939
}
940940

941941
// Check all Extensions are supported.
942-
for (auto SeenExtAndVers : SeenExtMap) {
943-
std::string ExtName = SeenExtAndVers.first;
942+
for (auto &SeenExtAndVers : SeenExtMap) {
943+
const std::string &ExtName = SeenExtAndVers.first;
944944
RISCVISAInfo::ExtensionVersion ExtVers = SeenExtAndVers.second;
945945

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

0 commit comments

Comments
 (0)