class InstrProfError

Declaration

class InstrProfError : public ErrorInfo { /* full declaration omitted */ };

Description

Base class for user error types. Users should declare their error types like: class MyError : public ErrorInfo <MyError > { .... }; This class provides an implementation of the ErrorInfoBase::kind method, which is used by the Error RTTI system.

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:333

Inherits from: ErrorInfo

Member Variables

private llvm::instrprof_error Err
private std::string Msg
public static char ID

Method Overview

  • public InstrProfError(llvm::instrprof_error Err, const llvm::Twine & ErrStr = llvm::Twine())
  • public std::error_code convertToErrorCode() const
  • public llvm::instrprof_error get() const
  • public const std::string & getMessage() const
  • public void log(llvm::raw_ostream & OS) const
  • public std::string message() const
  • public static llvm::instrprof_error take(llvm::Error E)

Methods

InstrProfError(
    llvm::instrprof_error Err,
    const llvm::Twine& ErrStr = llvm::Twine())

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:335

Parameters

llvm::instrprof_error Err
const llvm::Twine& ErrStr = llvm::Twine()

std::error_code convertToErrorCode() const

Description

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.

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:344

llvm::instrprof_error get() const

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:348

const std::string& getMessage() const

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:349

void log(llvm::raw_ostream& OS) const

Description

Print an error message to an output stream.

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:342

Parameters

llvm::raw_ostream& OS

std::string message() const

Description

Return the error message as a string.

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:340

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

Description

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.

Declared at: llvm/include/llvm/ProfileData/InstrProf.h:353

Parameters

llvm::Error E