diff --git a/llvm/include/llvm/ProfileData/InstrProfReader.h b/llvm/include/llvm/ProfileData/InstrProfReader.h index 00b361f4ad1c56..6be3fad41824a9 100644 --- a/llvm/include/llvm/ProfileData/InstrProfReader.h +++ b/llvm/include/llvm/ProfileData/InstrProfReader.h @@ -669,7 +669,8 @@ class InstrProfReaderRemapper { class IndexedMemProfReader { private: /// The MemProf version. - memprof::IndexedVersion Version = memprof::Version0; + memprof::IndexedVersion Version = + static_cast(memprof::MinimumSupportedVersion); /// MemProf profile schema (if available). memprof::MemProfSchema Schema; /// MemProf record profile data on-disk indexed via llvm::md5(FunctionName). diff --git a/llvm/include/llvm/ProfileData/InstrProfWriter.h b/llvm/include/llvm/ProfileData/InstrProfWriter.h index 559549b0a22cc9..199e565bead044 100644 --- a/llvm/include/llvm/ProfileData/InstrProfWriter.h +++ b/llvm/include/llvm/ProfileData/InstrProfWriter.h @@ -86,12 +86,16 @@ class InstrProfWriter { // MemprofGenerateRandomHotness is enabled. The random seed can be either // provided by MemprofGenerateRandomHotnessSeed, or if that is 0, one will be // generated in the writer using the current time. - InstrProfWriter( - bool Sparse = false, uint64_t TemporalProfTraceReservoirSize = 0, - uint64_t MaxTemporalProfTraceLength = 0, bool WritePrevVersion = false, - memprof::IndexedVersion MemProfVersionRequested = memprof::Version0, - bool MemProfFullSchema = false, bool MemprofGenerateRandomHotness = false, - unsigned MemprofGenerateRandomHotnessSeed = 0); + InstrProfWriter(bool Sparse = false, + uint64_t TemporalProfTraceReservoirSize = 0, + uint64_t MaxTemporalProfTraceLength = 0, + bool WritePrevVersion = false, + memprof::IndexedVersion MemProfVersionRequested = + static_cast( + memprof::MinimumSupportedVersion), + bool MemProfFullSchema = false, + bool MemprofGenerateRandomHotness = false, + unsigned MemprofGenerateRandomHotnessSeed = 0); ~InstrProfWriter(); StringMap &getProfileData() { return FunctionData; }