diff options
author | Mark de Wever <koraq@xs4all.nl> | 2019-12-17 21:57:58 +0100 |
---|---|---|
committer | Mark de Wever <koraq@xs4all.nl> | 2019-12-17 21:57:58 +0100 |
commit | 1a8ff89653d2a80a013701fe927d2d32491bff59 (patch) | |
tree | 3873ac29a9f199925f8fa773144750b3a0bf451f /llvm/lib/IR/ModuleSummaryIndex.cpp | |
parent | b750486c5d96320daf77a9760166f78b4a0c942e (diff) | |
download | bcm5719-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.cpp | 2 |
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()); |