aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
diff options
context:
space:
mode:
authorMark de Wever <koraq@xs4all.nl>2019-12-22 19:20:17 +0100
committerMark de Wever <koraq@xs4all.nl>2019-12-22 19:20:17 +0100
commit098d3347e74ac89ea87744bf40ca98ade5e8468e (patch)
tree95b0d3ab6a59b13650331ad6611b042af9c7bd0e /llvm/lib/Transforms/Utils/InlineFunction.cpp
parentb6d9e976629ac655e0ed2655289e90357107793f (diff)
downloadllvm-098d3347e74ac89ea87744bf40ca98ade5e8468e.zip
llvm-098d3347e74ac89ea87744bf40ca98ade5e8468e.tar.gz
llvm-098d3347e74ac89ea87744bf40ca98ade5e8468e.tar.bz2
[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
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/InlineFunction.cpp4
1 files changed, 2 insertions, 2 deletions
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<BasicBlock *, 16> ClonedBBs;
- for (auto const &Entry : VMap) {
+ for (auto Entry : VMap) {
if (!isa<BasicBlock>(Entry.first) || !Entry.second)
continue;
auto *OrigBB = cast<BasicBlock>(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<CallInst>(Entry.first))
if (auto *CI = dyn_cast_or_null<CallInst>(Entry.second))
CI->updateProfWeight(cloneEntryCount, priorEntryCount);