LLVM API Documentation

Public Member Functions | Static Public Member Functions | Protected Member Functions
llvm::InstrProfReader Class Reference

#include <InstrProfReader.h>

Inheritance diagram for llvm::InstrProfReader:
Inheritance graph
[legend]

List of all members.

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.

Detailed Description

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.


Constructor & Destructor Documentation

Definition at line 66 of file InstrProfReader.h.

virtual llvm::InstrProfReader::~InstrProfReader ( ) [inline, virtual]

Definition at line 67 of file InstrProfReader.h.


Member Function Documentation

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

Definition at line 75 of file InstrProfReader.h.

std::error_code llvm::InstrProfReader::error ( std::error_code  EC) [inline, protected]
std::error_code llvm::InstrProfReader::getError ( ) [inline]

Get the current error code.

Definition at line 93 of file InstrProfReader.h.

Return true if the reader encountered an error reading profiling data.

Definition at line 91 of file InstrProfReader.h.

References isEOF().

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]
std::error_code llvm::InstrProfReader::success ( ) [inline, protected]

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