LLVM API Documentation
#include <InstrProfReader.h>
Public Member Functions | |
InstrProfReader () | |
virtual | ~InstrProfReader () |
virtual std::error_code | readHeader ()=0 |
Read the header. Required before reading first record. | |
virtual std::error_code | readNextRecord (InstrProfRecord &Record)=0 |
Read a single record. | |
InstrProfIterator | begin () |
Iterator over profile data. | |
InstrProfIterator | end () |
bool | isEOF () |
Return true if the reader has finished reading the profile data. | |
bool | hasError () |
Return true if the reader encountered an error reading profiling data. | |
std::error_code | getError () |
Get the current error code. | |
Static Public Member Functions | |
static std::error_code | create (std::string Path, std::unique_ptr< InstrProfReader > &Result) |
Protected Member Functions | |
std::error_code | error (std::error_code EC) |
Set the current std::error_code and return same. | |
std::error_code | success () |
Clear the current error code and return a successful one. |
Base class and interface for reading profiling data of any known instrprof format. Provides an iterator over InstrProfRecords.
Definition at line 62 of file InstrProfReader.h.
llvm::InstrProfReader::InstrProfReader | ( | ) | [inline] |
Definition at line 66 of file InstrProfReader.h.
virtual llvm::InstrProfReader::~InstrProfReader | ( | ) | [inline, virtual] |
Definition at line 67 of file InstrProfReader.h.
InstrProfIterator llvm::InstrProfReader::begin | ( | ) | [inline] |
Iterator over profile data.
Definition at line 74 of file InstrProfReader.h.
std::error_code InstrProfReader::create | ( | std::string | Path, |
std::unique_ptr< InstrProfReader > & | Result | ||
) | [static] |
Factory method to create an appropriately typed reader for the given instrprof file.
Definition at line 43 of file InstrProfReader.cpp.
References llvm::RawInstrProfReader< IntPtrT >::hasFormat(), llvm::IndexedInstrProfReader::hasFormat(), initializeReader(), and setupMemoryBuffer().
InstrProfIterator llvm::InstrProfReader::end | ( | ) | [inline] |
Definition at line 75 of file InstrProfReader.h.
std::error_code llvm::InstrProfReader::error | ( | std::error_code | EC | ) | [inline, protected] |
Set the current std::error_code and return same.
Definition at line 79 of file InstrProfReader.h.
Referenced by llvm::IndexedInstrProfReader::getFunctionCounts(), llvm::IndexedInstrProfReader::readHeader(), llvm::TextInstrProfReader::readNextRecord(), llvm::IndexedInstrProfReader::readNextRecord(), and success().
std::error_code llvm::InstrProfReader::getError | ( | ) | [inline] |
Get the current error code.
Definition at line 93 of file InstrProfReader.h.
bool llvm::InstrProfReader::hasError | ( | ) | [inline] |
Return true if the reader encountered an error reading profiling data.
Definition at line 91 of file InstrProfReader.h.
References isEOF().
bool llvm::InstrProfReader::isEOF | ( | ) | [inline] |
Return true if the reader has finished reading the profile data.
Definition at line 89 of file InstrProfReader.h.
References llvm::eof.
Referenced by hasError().
virtual std::error_code llvm::InstrProfReader::readHeader | ( | ) | [pure virtual] |
Read the header. Required before reading first record.
Implemented in llvm::IndexedInstrProfReader, llvm::RawInstrProfReader< IntPtrT >, and llvm::TextInstrProfReader.
Referenced by initializeReader().
virtual std::error_code llvm::InstrProfReader::readNextRecord | ( | InstrProfRecord & | Record | ) | [pure virtual] |
Read a single record.
Implemented in llvm::IndexedInstrProfReader, llvm::RawInstrProfReader< IntPtrT >, and llvm::TextInstrProfReader.
std::error_code llvm::InstrProfReader::success | ( | ) | [inline, protected] |
Clear the current error code and return a successful one.
Definition at line 85 of file InstrProfReader.h.
References error(), and llvm::object::success.
Referenced by llvm::IndexedInstrProfReader::getFunctionCounts(), llvm::TextInstrProfReader::readHeader(), llvm::IndexedInstrProfReader::readHeader(), llvm::TextInstrProfReader::readNextRecord(), and llvm::IndexedInstrProfReader::readNextRecord().