diff options
Diffstat (limited to 'contrib/llvm-project/llvm/include/llvm/ProfileData/SampleProfReader.h')
-rw-r--r-- | contrib/llvm-project/llvm/include/llvm/ProfileData/SampleProfReader.h | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/contrib/llvm-project/llvm/include/llvm/ProfileData/SampleProfReader.h b/contrib/llvm-project/llvm/include/llvm/ProfileData/SampleProfReader.h index 7da336b9f61b..b96d6c70dae4 100644 --- a/contrib/llvm-project/llvm/include/llvm/ProfileData/SampleProfReader.h +++ b/contrib/llvm-project/llvm/include/llvm/ProfileData/SampleProfReader.h @@ -585,14 +585,14 @@ public: : SampleProfileReader(std::move(B), C, Format) {} /// Read and validate the file header. - virtual std::error_code readHeader() override; + std::error_code readHeader() override; /// Read sample profiles from the associated file. std::error_code readImpl() override; /// It includes all the names that have samples either in outline instance /// or inline instance. - virtual std::vector<StringRef> *getNameTable() override { return &NameTable; } + std::vector<StringRef> *getNameTable() override { return &NameTable; } protected: /// Read a numeric value of type T from the profile. @@ -656,7 +656,7 @@ private: class SampleProfileReaderRawBinary : public SampleProfileReaderBinary { private: - virtual std::error_code verifySPMagic(uint64_t Magic) override; + std::error_code verifySPMagic(uint64_t Magic) override; public: SampleProfileReaderRawBinary(std::unique_ptr<MemoryBuffer> B, LLVMContext &C, @@ -710,14 +710,14 @@ protected: std::error_code readCSNameTableSec(); std::error_code readProfileSymbolList(); - virtual std::error_code readHeader() override; - virtual std::error_code verifySPMagic(uint64_t Magic) override = 0; + std::error_code readHeader() override; + std::error_code verifySPMagic(uint64_t Magic) override = 0; virtual std::error_code readOneSection(const uint8_t *Start, uint64_t Size, const SecHdrTableEntry &Entry); // placeholder for subclasses to dispatch their own section readers. virtual std::error_code readCustomSection(const SecHdrTableEntry &Entry) = 0; - virtual ErrorOr<StringRef> readStringFromTable() override; - virtual ErrorOr<SampleContext> readSampleContextFromTable() override; + ErrorOr<StringRef> readStringFromTable() override; + ErrorOr<SampleContext> readSampleContextFromTable() override; ErrorOr<SampleContextFrames> readContextFromTable(); std::unique_ptr<ProfileSymbolList> ProfSymList; @@ -770,27 +770,26 @@ public: uint64_t getSectionSize(SecType Type); /// Get the total size of header and all sections. uint64_t getFileSize(); - virtual bool dumpSectionInfo(raw_ostream &OS = dbgs()) override; + bool dumpSectionInfo(raw_ostream &OS = dbgs()) override; /// Collect functions with definitions in Module M. Return true if /// the reader has been given a module. bool collectFuncsFromModule() override; /// Return whether names in the profile are all MD5 numbers. - virtual bool useMD5() override { return MD5StringBuf.get(); } + bool useMD5() override { return MD5StringBuf.get(); } - virtual std::unique_ptr<ProfileSymbolList> getProfileSymbolList() override { + std::unique_ptr<ProfileSymbolList> getProfileSymbolList() override { return std::move(ProfSymList); }; - virtual void setSkipFlatProf(bool Skip) override { SkipFlatProf = Skip; } + void setSkipFlatProf(bool Skip) override { SkipFlatProf = Skip; } }; class SampleProfileReaderExtBinary : public SampleProfileReaderExtBinaryBase { private: - virtual std::error_code verifySPMagic(uint64_t Magic) override; - virtual std::error_code - readCustomSection(const SecHdrTableEntry &Entry) override { + std::error_code verifySPMagic(uint64_t Magic) override; + std::error_code readCustomSection(const SecHdrTableEntry &Entry) override { // Update the data reader pointer to the end of the section. Data = End; return sampleprof_error::success; @@ -814,11 +813,11 @@ private: DenseMap<StringRef, uint64_t> FuncOffsetTable; /// The set containing the functions to use when compiling a module. DenseSet<StringRef> FuncsToUse; - virtual std::error_code verifySPMagic(uint64_t Magic) override; - virtual std::error_code readNameTable() override; + std::error_code verifySPMagic(uint64_t Magic) override; + std::error_code readNameTable() override; /// Read a string indirectly via the name table. - virtual ErrorOr<StringRef> readStringFromTable() override; - virtual std::error_code readHeader() override; + ErrorOr<StringRef> readStringFromTable() override; + std::error_code readHeader() override; std::error_code readFuncOffsetTable(); public: @@ -837,7 +836,7 @@ public: bool collectFuncsFromModule() override; /// Return whether names in the profile are all MD5 numbers. - virtual bool useMD5() override { return true; } + bool useMD5() override { return true; } }; using InlineCallStack = SmallVector<FunctionSamples *, 10>; |