aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeewon Cho <heewon6752@gmail.com>2024-05-22 08:26:53 +0900
committerGitHub <noreply@github.com>2024-05-21 16:26:53 -0700
commitb90861498b5b5c06ba24a122b6987738560acf99 (patch)
tree8ad12e386059de195bcd5960a2fb4b5396b89a28
parenta5bab70d0667d3bd709720c5c78870b8ad280545 (diff)
downloadllvm-b90861498b5b5c06ba24a122b6987738560acf99.zip
llvm-b90861498b5b5c06ba24a122b6987738560acf99.tar.gz
llvm-b90861498b5b5c06ba24a122b6987738560acf99.tar.bz2
[BOLT][NFC] Use const reference in range-based for loop (#92932)
Addressing #91195
-rw-r--r--bolt/include/bolt/Passes/StokeInfo.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/bolt/include/bolt/Passes/StokeInfo.h b/bolt/include/bolt/Passes/StokeInfo.h
index 76417e6..a18c2a0 100644
--- a/bolt/include/bolt/Passes/StokeInfo.h
+++ b/bolt/include/bolt/Passes/StokeInfo.h
@@ -87,10 +87,10 @@ struct StokeFuncInfo {
<< "," << NumBlocks << "," << IsLoopFree << "," << NumLoops << ","
<< MaxLoopDepth << "," << HotSize << "," << TotalSize << ","
<< Score << "," << HasCall << ",\"{ ";
- for (std::string S : DefIn)
+ for (const std::string &S : DefIn)
Outfile << "%" << S << " ";
Outfile << "}\",\"{ ";
- for (std::string S : LiveOut)
+ for (const std::string &S : LiveOut)
Outfile << "%" << S << " ";
Outfile << "}\"," << HeapOut << "," << StackOut << "," << HasRipAddr
<< "," << Omitted << "\n";