summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/ModuleSummaryIndex.cpp
diff options
context:
space:
mode:
authorMark de Wever <koraq@xs4all.nl>2019-12-17 21:57:58 +0100
committerMark de Wever <koraq@xs4all.nl>2019-12-17 21:57:58 +0100
commit1a8ff89653d2a80a013701fe927d2d32491bff59 (patch)
tree3873ac29a9f199925f8fa773144750b3a0bf451f /llvm/lib/IR/ModuleSummaryIndex.cpp
parentb750486c5d96320daf77a9760166f78b4a0c942e (diff)
downloadbcm5719-llvm-1a8ff89653d2a80a013701fe927d2d32491bff59.tar.gz
bcm5719-llvm-1a8ff89653d2a80a013701fe927d2d32491bff59.zip
[IR] Use a reference in a range-based for
This avoids unneeded copies when using a range-based for loops. This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D70870
Diffstat (limited to 'llvm/lib/IR/ModuleSummaryIndex.cpp')
-rw-r--r--llvm/lib/IR/ModuleSummaryIndex.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/ModuleSummaryIndex.cpp b/llvm/lib/IR/ModuleSummaryIndex.cpp
index a3bc14c22e2..5d35dbe06f2 100644
--- a/llvm/lib/IR/ModuleSummaryIndex.cpp
+++ b/llvm/lib/IR/ModuleSummaryIndex.cpp
@@ -244,7 +244,7 @@ void ModuleSummaryIndex::dumpSCCs(raw_ostream &O) {
!I.isAtEnd(); ++I) {
O << "SCC (" << utostr(I->size()) << " node" << (I->size() == 1 ? "" : "s")
<< ") {\n";
- for (const ValueInfo V : *I) {
+ for (const ValueInfo &V : *I) {
FunctionSummary *F = nullptr;
if (V.getSummaryList().size())
F = cast<FunctionSummary>(V.getSummaryList().front().get());
OpenPOWER on IntegriCloud