From 31aa31919a1a3379910890345a6cf8394bb663d6 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Mon, 21 Sep 2020 16:28:10 +0100 Subject: [PATCH] ProfileSummary.cpp - use auto const& iterator in for-range loop to avoid copies. NFCI. --- lib/IR/ProfileSummary.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/IR/ProfileSummary.cpp b/lib/IR/ProfileSummary.cpp index ac6bcd9fe3a..453a278a7f3 100644 --- a/lib/IR/ProfileSummary.cpp +++ b/lib/IR/ProfileSummary.cpp @@ -259,7 +259,7 @@ void ProfileSummary::printSummary(raw_ostream &OS) { void ProfileSummary::printDetailedSummary(raw_ostream &OS) { OS << "Detailed summary:\n"; - for (auto Entry : DetailedSummary) { + for (const auto &Entry : DetailedSummary) { OS << Entry.NumCounts << " blocks with count >= " << Entry.MinCount << " account for " << format("%0.6g", (float)Entry.Cutoff / Scale * 100)