aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h')
-rw-r--r--contrib/llvm-project/llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/contrib/llvm-project/llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h b/contrib/llvm-project/llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h
index 9a0abdfa8954..8bf902fc8d28 100644
--- a/contrib/llvm-project/llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h
+++ b/contrib/llvm-project/llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h
@@ -114,9 +114,8 @@ public:
uint64_t CallsiteCount = 0;
LineLocation Callsite = Callee->getCallSiteLoc();
if (auto CallTargets = CallerSamples->findCallTargetMapAt(Callsite)) {
- SampleRecord::CallTargetMap &TargetCounts = CallTargets.get();
- auto It = TargetCounts.find(CalleeSamples->getFunction());
- if (It != TargetCounts.end())
+ auto It = CallTargets->find(CalleeSamples->getFunction());
+ if (It != CallTargets->end())
CallsiteCount = It->second;
}
Weight = std::max(CallsiteCount, CalleeEntryCount);