NFC Add const

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282952 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Piotr Padlewski 2016-09-30 21:05:55 +00:00
parent 66c32d553d
commit 05539ce1ca

View File

@ -59,14 +59,14 @@ void SampleProfileSummaryBuilder::addRecord(
void ProfileSummaryBuilder::computeDetailedSummary() {
if (DetailedSummaryCutoffs.empty())
return;
auto Iter = CountFrequencies.begin();
auto End = CountFrequencies.end();
std::sort(DetailedSummaryCutoffs.begin(), DetailedSummaryCutoffs.end());
auto Iter = CountFrequencies.begin();
const auto End = CountFrequencies.end();
uint32_t CountsSeen = 0;
uint64_t CurrSum = 0, Count = 0;
for (uint32_t Cutoff : DetailedSummaryCutoffs) {
for (const uint32_t Cutoff : DetailedSummaryCutoffs) {
assert(Cutoff <= 999999);
APInt Temp(128, TotalCount);
APInt N(128, Cutoff);