MLIR
20.0.0git
|
This diagnostic handler is a simple RAII class that registers and erases a diagnostic handler on a given context. More...
#include "mlir/IR/Diagnostics.h"
Public Member Functions | |
ScopedDiagnosticHandler (MLIRContext *ctx) | |
template<typename FuncTy > | |
ScopedDiagnosticHandler (MLIRContext *ctx, FuncTy &&handler) | |
~ScopedDiagnosticHandler () | |
Protected Member Functions | |
template<typename FuncTy > | |
void | setHandler (FuncTy &&handler) |
Set the handler to manage via RAII. More... | |
This diagnostic handler is a simple RAII class that registers and erases a diagnostic handler on a given context.
This class can be either be used directly, or in conjunction with a derived diagnostic handler.
Definition at line 522 of file Diagnostics.h.
|
inlineexplicit |
Definition at line 524 of file Diagnostics.h.
|
inline |
Definition at line 526 of file Diagnostics.h.
References setHandler().
ScopedDiagnosticHandler::~ScopedDiagnosticHandler | ( | ) |
Definition at line 353 of file Diagnostics.cpp.
|
inlineprotected |
Set the handler to manage via RAII.
Definition at line 535 of file Diagnostics.h.
References mlir::DiagnosticEngine::eraseHandler(), and mlir::MLIRContext::getDiagEngine().
Referenced by ScopedDiagnosticHandler(), mlir::SourceMgrDiagnosticHandler::SourceMgrDiagnosticHandler(), and mlir::SourceMgrDiagnosticVerifierHandler::SourceMgrDiagnosticVerifierHandler().