LLVM  3.7.0
Public Member Functions | List of all members
llvm::TextInstrProfReader Class Reference

Reader for the simple text based instrprof format. More...

#include <InstrProfReader.h>

Inheritance diagram for llvm::TextInstrProfReader:
[legend]
Collaboration diagram for llvm::TextInstrProfReader:
[legend]

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

llvm::TextInstrProfReader::TextInstrProfReader ( std::unique_ptr< MemoryBuffer DataBuffer_)
inline

Definition at line 111 of file InstrProfReader.h.

Member Function Documentation

std::error_code llvm::TextInstrProfReader::readHeader ( )
inlineoverridevirtual

Read the header.

Implements llvm::InstrProfReader.

Definition at line 115 of file InstrProfReader.h.

References llvm::InstrProfReader::success().

std::error_code TextInstrProfReader::readNextRecord ( InstrProfRecord Record)
overridevirtual

The documentation for this class was generated from the following files: