LLVM API Documentation
#include <InstrProfReader.h>
Public Member Functions | |
TextInstrProfReader (std::unique_ptr< MemoryBuffer > DataBuffer_) | |
std::error_code | readHeader () override |
Read the header. | |
std::error_code | readNextRecord (InstrProfRecord &Record) override |
Read a single record. |
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 109 of file InstrProfReader.h.
llvm::TextInstrProfReader::TextInstrProfReader | ( | std::unique_ptr< MemoryBuffer > | DataBuffer_ | ) | [inline] |
Definition at line 122 of file InstrProfReader.h.
std::error_code llvm::TextInstrProfReader::readHeader | ( | ) | [inline, override, virtual] |
Read the header.
Implements llvm::InstrProfReader.
Definition at line 126 of file InstrProfReader.h.
References llvm::InstrProfReader::success().
std::error_code TextInstrProfReader::readNextRecord | ( | InstrProfRecord & | Record | ) | [override, virtual] |
Read a single record.
Implements llvm::InstrProfReader.
Definition at line 85 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.