summaryrefslogtreecommitdiff
path: root/include/llvm/ProfileData/InstrProfReader.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/ProfileData/InstrProfReader.h')
-rw-r--r--include/llvm/ProfileData/InstrProfReader.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/ProfileData/InstrProfReader.h b/include/llvm/ProfileData/InstrProfReader.h
index 424360e0f765..aa58ead1eda1 100644
--- a/include/llvm/ProfileData/InstrProfReader.h
+++ b/include/llvm/ProfileData/InstrProfReader.h
@@ -397,6 +397,8 @@ private:
std::unique_ptr<InstrProfReaderIndexBase> Index;
/// Profile summary data.
std::unique_ptr<ProfileSummary> Summary;
+ // Index to the current record in the record array.
+ unsigned RecordIndex;
// Read the profile summary. Return a pointer pointing to one byte past the
// end of the summary data if it exists or the input \c Cur.
@@ -405,7 +407,7 @@ private:
public:
IndexedInstrProfReader(std::unique_ptr<MemoryBuffer> DataBuffer)
- : DataBuffer(std::move(DataBuffer)) {}
+ : DataBuffer(std::move(DataBuffer)), RecordIndex(0) {}
IndexedInstrProfReader(const IndexedInstrProfReader &) = delete;
IndexedInstrProfReader &operator=(const IndexedInstrProfReader &) = delete;