From 920677a997302b6ff2862c7cb116617cecb0c52d Mon Sep 17 00:00:00 2001 From: Dehao Chen Date: Wed, 22 Feb 2017 17:27:21 +0000 Subject: Fix an obvious bug in SampleProfileReaderGCC. Summary: The CallTargetProfile should be added to FProfile to be consistent with other profile readers. Reviewers: dnovillo, davidxl Reviewed By: davidxl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30233 llvm-svn: 295852 --- llvm/lib/ProfileData/SampleProfReader.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'llvm/lib/ProfileData') diff --git a/llvm/lib/ProfileData/SampleProfReader.cpp b/llvm/lib/ProfileData/SampleProfReader.cpp index af80b036a5b..6d063602fb2 100644 --- a/llvm/lib/ProfileData/SampleProfReader.cpp +++ b/llvm/lib/ProfileData/SampleProfReader.cpp @@ -681,11 +681,9 @@ std::error_code SampleProfileReaderGCC::readOneFunctionProfile( if (!GcovBuffer.readInt64(TargetCount)) return sampleprof_error::truncated; - if (Update) { - FunctionSamples &TargetProfile = Profiles[TargetName]; - TargetProfile.addCalledTargetSamples(LineOffset, Discriminator, - TargetName, TargetCount); - } + if (Update) + FProfile->addCalledTargetSamples(LineOffset, Discriminator, + TargetName, TargetCount); } } -- cgit v1.2.3