|
LLVM
3.7.0
|
Reader for the simple text based instrprof format. More...
#include <InstrProfReader.h>
Public Member Functions | |
| TextInstrProfReader (std::unique_ptr< MemoryBuffer > DataBuffer_) | |
| std::error_code | readHeader () override |
| Read the header. More... | |
| std::error_code | readNextRecord (InstrProfRecord &Record) override |
| Read a single record. More... | |
Public Member Functions inherited from llvm::InstrProfReader | |
| InstrProfReader () | |
| virtual | ~InstrProfReader () |
| 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... | |
Additional Inherited Members | |
Static Public Member Functions inherited from llvm::InstrProfReader | |
| 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 inherited from llvm::InstrProfReader | |
| 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... | |
Reader for the simple text based instrprof format.
This format is a simple text format that's suitable for test data. Records are separated by one or more blank lines, and record fields are separated by new lines.
Each record consists of a function name, a function hash, a number of counters, and then each counter value, in that order.
Definition at line 101 of file InstrProfReader.h.
|
inline |
Definition at line 111 of file InstrProfReader.h.
|
inlineoverridevirtual |
Read the header.
Implements llvm::InstrProfReader.
Definition at line 115 of file InstrProfReader.h.
References llvm::InstrProfReader::success().
|
overridevirtual |
Read a single record.
Implements llvm::InstrProfReader.
Definition at line 101 of file InstrProfReader.cpp.
References llvm::InstrProfRecord::Counts, llvm::StringRef::empty(), llvm::eof, llvm::InstrProfReader::error(), llvm::InstrProfRecord::Hash, I, llvm::line_iterator::is_at_end(), llvm::malformed, llvm::InstrProfRecord::Name, llvm::StringRef::startswith(), llvm::InstrProfReader::success(), and llvm::truncated.
1.8.6