diff options
author | Rong Xu <xur@google.com> | 2017-03-03 21:56:34 +0000 |
---|---|---|
committer | Rong Xu <xur@google.com> | 2017-03-03 21:56:34 +0000 |
commit | 5497dd541ac57f011f86a55f31abac19e2a93459 (patch) | |
tree | e559a86c975482f84cc83e4cc145a8f77d3e748c /lib/ProfileData | |
parent | 2b465546ecc2d08600b0b8780d709dfe06ffa7a5 (diff) |
[PGO] Text format profile reader needs to clear the value profile
Summary:
Reset the ValueData for each function to avoid using the ones in
the previous function.
Reviewers: davidxl
Reviewed By: davidxl
Subscribers: llvm-commits, xur
Differential Revision: https://reviews.llvm.org/D30479
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296916 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ProfileData')
-rw-r--r-- | lib/ProfileData/InstrProfReader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ProfileData/InstrProfReader.cpp b/lib/ProfileData/InstrProfReader.cpp index 0ba6cdb0c70..856f793363f 100644 --- a/lib/ProfileData/InstrProfReader.cpp +++ b/lib/ProfileData/InstrProfReader.cpp @@ -250,7 +250,7 @@ Error TextInstrProfReader::readNextRecord(InstrProfRecord &Record) { return error(instrprof_error::malformed); // Read each counter and fill our internal storage with the values. - Record.Counts.clear(); + Record.Clear(); Record.Counts.reserve(NumCounters); for (uint64_t I = 0; I < NumCounters; ++I) { if (Line.is_at_end()) |