LLVM  8.0.1
Public Member Functions | Static Public Member Functions | List of all members
llvm::ErrorInfoBase Class Referenceabstract

Base class for error info classes. More...

#include "llvm/Support/Error.h"

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

Public Member Functions

virtual ~ErrorInfoBase ()=default
 
virtual void log (raw_ostream &OS) const =0
 Print an error message to an output stream. More...
 
virtual std::string message () const
 Return the error message as a string. More...
 
virtual std::error_code convertToErrorCode () const =0
 Convert this error to a std::error_code. More...
 
virtual const void * dynamicClassID () const =0
 
virtual bool isA (const void *const ClassID) const
 
template<typename ErrorInfoT >
bool isA () const
 

Static Public Member Functions

static const void * classID ()
 

Detailed Description

Base class for error info classes.

Do not extend this directly: Extend the ErrorInfo template subclass instead.

Definition at line 49 of file Error.h.

Constructor & Destructor Documentation

◆ ~ErrorInfoBase()

virtual llvm::ErrorInfoBase::~ErrorInfoBase ( )
virtualdefault

Member Function Documentation

◆ classID()

static const void* llvm::ErrorInfoBase::classID ( )
inlinestatic

Definition at line 71 of file Error.h.

References dynamicClassID().

Referenced by isA(), and llvm::ErrorInfo< MSFError, StringError >::isA().

◆ convertToErrorCode()

virtual std::error_code llvm::ErrorInfoBase::convertToErrorCode ( ) const
pure virtual

◆ dynamicClassID()

virtual const void* llvm::ErrorInfoBase::dynamicClassID ( ) const
pure virtual

◆ isA() [1/2]

virtual bool llvm::ErrorInfoBase::isA ( const void *const  ClassID) const
inlinevirtual

◆ isA() [2/2]

template<typename ErrorInfoT >
bool llvm::ErrorInfoBase::isA ( ) const
inline

Definition at line 83 of file Error.h.

◆ log()

virtual void llvm::ErrorInfoBase::log ( raw_ostream OS) const
pure virtual

◆ message()

virtual std::string llvm::ErrorInfoBase::message ( ) const
inlinevirtual

Return the error message as a string.

Reimplemented in llvm::InstrProfError, and llvm::coverage::CoverageMapError.

Definition at line 57 of file Error.h.

References convertToErrorCode(), log(), and llvm::raw_string_ostream::str().

Referenced by annotateAllFunctions(), llvm::DWARFContext::dumpWarning(), getMinVisibility(), and llvm::toString().


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