MLIR
20.0.0git
|
This class manages the construction and emission of PDLL diagnostics. More...
#include "mlir/Tools/PDLL/AST/Diagnostic.h"
Public Types | |
using | HandlerFn = llvm::unique_function< void(Diagnostic &)> |
A function used to handle diagnostics emitted by the engine. More... | |
Public Member Functions | |
InFlightDiagnostic | emitError (SMRange loc, const Twine &msg) |
Emit an error to the diagnostic engine. More... | |
InFlightDiagnostic | emitWarning (SMRange loc, const Twine &msg) |
void | report (Diagnostic &&diagnostic) |
Report the given diagnostic. More... | |
const HandlerFn & | getHandlerFn () const |
Get the current handler function of this diagnostic engine. More... | |
HandlerFn | takeHandlerFn () |
Take the current handler function, resetting the current handler to null. More... | |
void | setHandlerFn (HandlerFn &&newHandler) |
Set the handler function for this diagnostic engine. More... | |
This class manages the construction and emission of PDLL diagnostics.
Definition at line 139 of file Diagnostic.h.
using mlir::pdll::ast::DiagnosticEngine::HandlerFn = llvm::unique_function<void(Diagnostic &)> |
A function used to handle diagnostics emitted by the engine.
Definition at line 142 of file Diagnostic.h.
|
inline |
Emit an error to the diagnostic engine.
Definition at line 145 of file Diagnostic.h.
Referenced by mlir::pdll::Lexer::emitError(), and mlir::pdll::Lexer::emitErrorAndNote().
|
inline |
Definition at line 149 of file Diagnostic.h.
|
inline |
Get the current handler function of this diagnostic engine.
Definition at line 161 of file Diagnostic.h.
Referenced by mlir::pdll::Lexer::Lexer().
|
inline |
Report the given diagnostic.
Definition at line 155 of file Diagnostic.h.
|
inline |
Set the handler function for this diagnostic engine.
Definition at line 171 of file Diagnostic.h.
Referenced by mlir::pdll::Lexer::Lexer(), and mlir::pdll::Lexer::~Lexer().
|
inline |
Take the current handler function, resetting the current handler to null.
Definition at line 164 of file Diagnostic.h.