|
LLVM
3.7.0
|
Base class and interface for reading profiling data of any known instrprof format. More...
#include <InstrProfReader.h>
Public Member Functions | |
| InstrProfReader () | |
| virtual | ~InstrProfReader () |
| virtual std::error_code | readHeader ()=0 |
| Read the header. Required before reading first record. More... | |
| virtual std::error_code | readNextRecord (InstrProfRecord &Record)=0 |
| Read a single record. More... | |
| InstrProfIterator | begin () |
| Iterator over profile data. More... | |
| InstrProfIterator | end () |
| bool | isEOF () |
| Return true if the reader has finished reading the profile data. More... | |
| bool | hasError () |
| Return true if the reader encountered an error reading profiling data. More... | |
| std::error_code | getError () |
| Get the current error code. More... | |
Static Public Member Functions | |
| static ErrorOr < std::unique_ptr < InstrProfReader > > | create (std::string Path) |
| Factory method to create an appropriately typed reader for the given instrprof file. More... | |
| static ErrorOr < std::unique_ptr < InstrProfReader > > | create (std::unique_ptr< MemoryBuffer > Buffer) |
Protected Member Functions | |
| std::error_code | error (std::error_code EC) |
| Set the current std::error_code and return same. More... | |
| std::error_code | success () |
| Clear the current error code and return a successful one. More... | |
Base class and interface for reading profiling data of any known instrprof format.
Provides an iterator over InstrProfRecords.
Definition at line 52 of file InstrProfReader.h.
|
inline |
Definition at line 56 of file InstrProfReader.h.
|
inlinevirtual |
Definition at line 57 of file InstrProfReader.h.
|
inline |
Iterator over profile data.
Definition at line 64 of file InstrProfReader.h.
|
static |
Factory method to create an appropriately typed reader for the given instrprof file.
Definition at line 36 of file InstrProfReader.cpp.
References setupMemoryBuffer().
|
static |
Definition at line 45 of file InstrProfReader.cpp.
References llvm::RawInstrProfReader< IntPtrT >::hasFormat(), llvm::IndexedInstrProfReader::hasFormat(), initializeReader(), and llvm::too_large.
|
inline |
Definition at line 65 of file InstrProfReader.h.
|
inlineprotected |
Set the current std::error_code and return same.
Definition at line 69 of file InstrProfReader.h.
Referenced by llvm::TextInstrProfReader::readNextRecord(), and success().
|
inline |
Get the current error code.
Definition at line 83 of file InstrProfReader.h.
|
inline |
Return true if the reader encountered an error reading profiling data.
Definition at line 81 of file InstrProfReader.h.
References isEOF().
|
inline |
Return true if the reader has finished reading the profile data.
Definition at line 79 of file InstrProfReader.h.
References llvm::eof.
Referenced by hasError().
|
pure virtual |
Read the header. Required before reading first record.
Implemented in llvm::IndexedInstrProfReader, llvm::RawInstrProfReader< IntPtrT >, and llvm::TextInstrProfReader.
Referenced by initializeReader().
|
pure virtual |
Read a single record.
Implemented in llvm::IndexedInstrProfReader, llvm::RawInstrProfReader< IntPtrT >, and llvm::TextInstrProfReader.
|
inlineprotected |
Clear the current error code and return a successful one.
Definition at line 75 of file InstrProfReader.h.
References error(), and llvm::success.
Referenced by llvm::TextInstrProfReader::readHeader(), and llvm::TextInstrProfReader::readNextRecord().
1.8.6