Skip to content

Commit 8ca13e0

Browse files
committed
Use reference type
1 parent b9b7a12 commit 8ca13e0

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
@@ -901,7 +901,7 @@ RISCVISAInfo::parseArchString(StringRef Arch, bool EnableExperimentalExtension,
901901
if (auto E = splitExtsByUnderscore(Exts, SplitedExts))
902902
return std::move(E);
903903

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

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

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

0 commit comments

Comments
 (0)