llvm::DiagnosticHandler

This is the base class for diagnostic handling in LLVM.

Synopsis

Declared in <llvm/IR/DiagnosticHandler.h>

struct DiagnosticHandler;

Description

The handleDiagnostics method must be overridden by the subclasses to handle diagnostic. The *RemarkEnabled methods can be overridden to control which remarks are enabled.

Type Aliases

NameDescription
DiagnosticHandlerTy Function pointer type for C-style diagnostic callbacks.

Member Functions

NameDescription
DiagnosticHandler [constructor]Construct a handler, optionally storing an opaque client context.
~DiagnosticHandler [destructor] [virtual]Destroy the diagnostic handler.
handleDiagnostics [virtual]Handle a diagnostic, returning true if reporting was consumed.
isAnalysisRemarkEnabled [virtual]Return true if analysis remarks are enabled, override to provide different implementation.
isAnyRemarkEnabled isAnyRemarkEnabled overloads
isMissedOptRemarkEnabled [virtual]Return true if missed optimization remarks are enabled, override to provide different implementation.
isPassedOptRemarkEnabled [virtual]Return true if passed optimization remarks are enabled, override to provide different implementation.

Data Members

NameDescription
DiagHandlerCallback Callback set from the C API and invoked by handleDiagnostics().
DiagnosticContext Opaque client context passed to DiagHandlerCallback.
HasErrors True if an error diagnostic has been reported.

Derived Classes

NameDescription
LTOLLVMDiagnosticHandler Diagnostic handler that forwards diagnostics to a function callback.