LLVM  4.0.0
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
llvm::InstrProfError Class Reference

#include <InstrProf.h>

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

Public Member Functions

 InstrProfError (instrprof_error Err)
 
std::string message () const override
 Return the error message as a string. More...
 
void log (raw_ostream &OS) const override
 Print an error message to an output stream. More...
 
std::error_code convertToErrorCode () const override
 Convert this error to a std::error_code. More...
 
instrprof_error get () const
 
- Public Member Functions inherited from llvm::ErrorInfo< InstrProfError >
bool isA (const void *const ClassID) const override
 
- Public Member Functions inherited from llvm::ErrorInfoBase
virtual ~ErrorInfoBase ()=default
 
template<typename ErrorInfoT >
bool isA () const
 

Static Public Member Functions

static instrprof_error take (Error E)
 Consume an Error and return the raw enum value contained within it. More...
 
- Static Public Member Functions inherited from llvm::ErrorInfo< InstrProfError >
static const void * classID ()
 
- Static Public Member Functions inherited from llvm::ErrorInfoBase
static const void * classID ()
 

Static Public Attributes

static char ID = 0
 

Detailed Description

Definition at line 312 of file InstrProf.h.

Constructor & Destructor Documentation

llvm::InstrProfError::InstrProfError ( instrprof_error  Err)
inline

Definition at line 314 of file InstrProf.h.

References assert(), and llvm::success.

Member Function Documentation

std::error_code llvm::InstrProfError::convertToErrorCode ( ) const
inlineoverridevirtual

Convert this error to a std::error_code.

This is a temporary crutch to enable interaction with code still using std::error_code. It will be removed in the future.

Implements llvm::ErrorInfoBase.

Definition at line 322 of file InstrProf.h.

References llvm::make_error_code().

instrprof_error llvm::InstrProfError::get ( ) const
inline

Definition at line 326 of file InstrProf.h.

Referenced by take().

void llvm::InstrProfError::log ( raw_ostream OS) const
inlineoverridevirtual

Print an error message to an output stream.

Implements llvm::ErrorInfoBase.

Definition at line 320 of file InstrProf.h.

References message().

std::string llvm::InstrProfError::message ( ) const
overridevirtual

Return the error message as a string.

Reimplemented from llvm::ErrorInfoBase.

Definition at line 123 of file InstrProf.cpp.

Referenced by log().

static instrprof_error llvm::InstrProfError::take ( Error  E)
inlinestatic

Consume an Error and return the raw enum value contained within it.

The Error must either be a success value, or contain a single InstrProfError.

Definition at line 330 of file InstrProf.h.

References assert(), get(), llvm::handleAllErrors(), and llvm::success.

Referenced by llvm::InstrProfReader::error().

Member Data Documentation

char llvm::InstrProfError::ID = 0
static

Definition at line 339 of file InstrProf.h.


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