From e5c2c47f2fbe37712e50765d405e17cc46694e12 Mon Sep 17 00:00:00 2001 From: Diego Novillo Date: Mon, 23 Nov 2015 15:24:13 +0000 Subject: [PATCH] SamplePGO - Use newly introduced local variable. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253868 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/IPO/SampleProfile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Transforms/IPO/SampleProfile.cpp b/lib/Transforms/IPO/SampleProfile.cpp index 816fc9336d0..20bfac954a5 100644 --- a/lib/Transforms/IPO/SampleProfile.cpp +++ b/lib/Transforms/IPO/SampleProfile.cpp @@ -236,7 +236,7 @@ SampleCoverageTracker::countUsedSamples(const FunctionSamples *Samples) const { for (const auto &I : Samples->getCallsiteSamples()) { const FunctionSamples *CalleeSamples = &I.second; if (CalleeSamples->getTotalSamples() > 0) - Count += countUsedSamples(&I.second); + Count += countUsedSamples(CalleeSamples); } return Count; @@ -255,7 +255,7 @@ SampleCoverageTracker::countBodySamples(const FunctionSamples *Samples) const { for (const auto &I : Samples->getCallsiteSamples()) { const FunctionSamples *CalleeSamples = &I.second; if (CalleeSamples->getTotalSamples() > 0) - Count += countBodySamples(&I.second); + Count += countBodySamples(CalleeSamples); } return Count; -- 2.34.1