MLIR
20.0.0git
|
This class provides a simple implementation of a PDLL diagnostic. More...
#include "mlir/Tools/PDLL/AST/Diagnostic.h"
Public Types | |
using | Severity = llvm::SourceMgr::DiagKind |
Public Member Functions | |
Severity | getSeverity () const |
Return the severity of this diagnostic. More... | |
StringRef | getMessage () const |
Return the message of this diagnostic. More... | |
SMRange | getLocation () const |
Return the location of this diagnostic. More... | |
auto | getNotes () const |
Return the notes of this diagnostic. More... | |
Diagnostic & | attachNote (const Twine &msg, std::optional< SMRange > noteLoc=std::nullopt) |
Attach a note to this diagnostic. More... | |
operator LogicalResult () const | |
Allow an inflight diagnostic to be converted to 'failure', otherwise 'success' if this is an empty diagnostic. More... | |
This class provides a simple implementation of a PDLL diagnostic.
Definition at line 29 of file Diagnostic.h.
using mlir::pdll::ast::Diagnostic::Severity = llvm::SourceMgr::DiagKind |
Definition at line 31 of file Diagnostic.h.
|
inline |
Attach a note to this diagnostic.
Definition at line 46 of file Diagnostic.h.
References getSeverity().
Referenced by mlir::pdll::Lexer::emitErrorAndNote().
|
inline |
Return the location of this diagnostic.
Definition at line 40 of file Diagnostic.h.
|
inline |
Return the message of this diagnostic.
Definition at line 37 of file Diagnostic.h.
|
inline |
Return the notes of this diagnostic.
Definition at line 43 of file Diagnostic.h.
|
inline |
Return the severity of this diagnostic.
Definition at line 34 of file Diagnostic.h.
Referenced by attachNote().
|
inline |
Allow an inflight diagnostic to be converted to 'failure', otherwise 'success' if this is an empty diagnostic.
Definition at line 57 of file Diagnostic.h.