From 098d3347e74ac89ea87744bf40ca98ade5e8468e Mon Sep 17 00:00:00 2001 From: Mark de Wever Date: Sun, 22 Dec 2019 19:20:17 +0100 Subject: [Transforms] Fixes -Wrange-loop-analysis warnings This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D71810 --- llvm/lib/Transforms/Utils/InlineFunction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp') diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index 401a0e8..6da612e 100644 --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -1473,7 +1473,7 @@ static void updateCallerBFI(BasicBlock *CallSiteBlock, BlockFrequencyInfo *CalleeBFI, const BasicBlock &CalleeEntryBlock) { SmallPtrSet ClonedBBs; - for (auto const &Entry : VMap) { + for (auto Entry : VMap) { if (!isa(Entry.first) || !Entry.second) continue; auto *OrigBB = cast(Entry.first); @@ -1531,7 +1531,7 @@ void llvm::updateProfileCallee( // During inlining ? if (VMap) { uint64_t cloneEntryCount = priorEntryCount - newEntryCount; - for (auto const &Entry : *VMap) + for (auto Entry : *VMap) if (isa(Entry.first)) if (auto *CI = dyn_cast_or_null(Entry.second)) CI->updateProfWeight(cloneEntryCount, priorEntryCount); -- cgit v1.1