diff --git a/llvm/include/llvm/ProfileData/SampleProfReader.h b/llvm/include/llvm/ProfileData/SampleProfReader.h index 49bf8be64c7f..93acad373154 100644 --- a/llvm/include/llvm/ProfileData/SampleProfReader.h +++ b/llvm/include/llvm/ProfileData/SampleProfReader.h @@ -480,7 +480,7 @@ protected: std::error_code readSecHdrTableEntry(); std::error_code readSecHdrTable(); virtual std::error_code readHeader() override; - virtual std::error_code verifySPMagic(uint64_t Magic) = 0; + virtual std::error_code verifySPMagic(uint64_t Magic) override = 0; public: SampleProfileReaderExtBinaryBase(std::unique_ptr B, diff --git a/llvm/include/llvm/ProfileData/SampleProfWriter.h b/llvm/include/llvm/ProfileData/SampleProfWriter.h index 4243ae7e7d50..67df6d3cd0e1 100644 --- a/llvm/include/llvm/ProfileData/SampleProfWriter.h +++ b/llvm/include/llvm/ProfileData/SampleProfWriter.h @@ -109,12 +109,12 @@ private: /// Sample-based profile writer (binary format). class SampleProfileWriterBinary : public SampleProfileWriter { public: - virtual std::error_code writeSample(const FunctionSamples &S) override; - -protected: SampleProfileWriterBinary(std::unique_ptr &OS) : SampleProfileWriter(OS) {} + virtual std::error_code writeSample(const FunctionSamples &S) override; + +protected: virtual std::error_code writeMagicIdent(SampleProfileFormat Format); virtual std::error_code writeNameTable(); virtual std::error_code @@ -176,7 +176,7 @@ class SampleProfileWriterExtBinary : public SampleProfileWriterExtBinaryBase { using SampleProfileWriterExtBinaryBase::SampleProfileWriterExtBinaryBase; private: - virtual void initSectionLayout() { + virtual void initSectionLayout() override { SectionLayout = {SecProfSummary, SecNameTable, SecLBRProfile}; }; virtual std::error_code