|
LLZK 0.1.0
Veridise's ZK Language IR
|
Wrapper around InFlightDiagnostic that can either be a regular InFlightDiagnostic or a special version that asserts false after reporting the diagnostic. More...
#include <ErrorHelper.h>
Public Member Functions | |
| InFlightDiagnosticWrapper (mlir::InFlightDiagnostic &&diag) | |
| Constructor for regular InFlightDiagnostic. | |
| InFlightDiagnosticWrapper (mlir::MLIRContext *ctx) | |
| Constructor for DefaultAndFailInFlightDiagnostic from MLIRContext. | |
| InFlightDiagnosticWrapper (const mlir::Location &loc) | |
| Constructor for DefaultAndFailInFlightDiagnostic from Location. | |
| template<typename Arg> | |
| InFlightDiagnosticWrapper & | operator<< (Arg &&arg) & |
| Stream operator for new diagnostic arguments. | |
| template<typename Arg> | |
| InFlightDiagnosticWrapper && | operator<< (Arg &&arg) && |
| Stream operator for new diagnostic arguments. | |
| template<typename... Args> | |
| InFlightDiagnosticWrapper & | append (Args &&...args) & |
| Append arguments to the diagnostic. | |
| template<typename... Args> | |
| InFlightDiagnosticWrapper && | append (Args &&...args) && |
| Append arguments to the diagnostic. | |
| mlir::Diagnostic & | attachNote (std::optional< mlir::Location > noteLoc=std::nullopt) |
| Attaches a note to this diagnostic. | |
| mlir::Diagnostic * | getUnderlyingDiagnostic () |
| Returns the underlying diagnostic or nullptr if this diagnostic isn't active. | |
| void | report () |
| Reports the diagnostic to the engine. | |
| void | abandon () |
| Abandons this diagnostic so that it will no longer be reported. | |
| operator mlir::LogicalResult () const | |
| Allow an inflight diagnostic to be converted to 'failure', otherwise 'success' if this is an empty diagnostic. | |
| operator mlir::ParseResult () const | |
| Allow an inflight diagnostic to be converted to 'failure', otherwise 'success' if this is an empty diagnostic. | |
| template<typename T> | |
| operator mlir::FailureOr< T > () const | |
| Allow an inflight diagnostic to be converted to FailureOr<T>. | |
| InFlightDiagnosticWrapper (InFlightDiagnosticWrapper &&)=default | |
| InFlightDiagnosticWrapper (const InFlightDiagnosticWrapper &)=delete | |
| InFlightDiagnosticWrapper & | operator= (InFlightDiagnosticWrapper &&)=delete |
| InFlightDiagnosticWrapper & | operator= (const InFlightDiagnosticWrapper &)=delete |
Wrapper around InFlightDiagnostic that can either be a regular InFlightDiagnostic or a special version that asserts false after reporting the diagnostic.
See wrapNullableInFlightDiagnostic() below for details.
Definition at line 26 of file ErrorHelper.h.
|
inlineexplicit |
Constructor for regular InFlightDiagnostic.
Definition at line 57 of file ErrorHelper.h.
|
inlineexplicit |
Constructor for DefaultAndFailInFlightDiagnostic from MLIRContext.
NOTE: This is not a common use case since it will always result in an assertion failure immediately after reporting the error; likely only useful in custom type builders.
Definition at line 62 of file ErrorHelper.h.
|
inlineexplicit |
Constructor for DefaultAndFailInFlightDiagnostic from Location.
NOTE: This is not a common use case since it will always result in an assertion failure immediately after reporting the error; likely only useful in custom type builders.
Definition at line 70 of file ErrorHelper.h.
|
default |
|
delete |
|
inline |
Abandons this diagnostic so that it will no longer be reported.
Definition at line 112 of file ErrorHelper.h.
|
inline |
Append arguments to the diagnostic.
Definition at line 83 of file ErrorHelper.h.
|
inline |
Append arguments to the diagnostic.
Definition at line 88 of file ErrorHelper.h.
|
inline |
Attaches a note to this diagnostic.
Definition at line 93 of file ErrorHelper.h.
|
inline |
Returns the underlying diagnostic or nullptr if this diagnostic isn't active.
Definition at line 100 of file ErrorHelper.h.
|
inline |
Allow an inflight diagnostic to be converted to FailureOr<T>.
Always results in 'failure' because this cast cannot possibly return an object of 'T'.
Definition at line 128 of file ErrorHelper.h.
|
inline |
Allow an inflight diagnostic to be converted to 'failure', otherwise 'success' if this is an empty diagnostic.
Definition at line 118 of file ErrorHelper.h.
|
inline |
Allow an inflight diagnostic to be converted to 'failure', otherwise 'success' if this is an empty diagnostic.
Definition at line 124 of file ErrorHelper.h.
|
inline |
Stream operator for new diagnostic arguments.
Definition at line 74 of file ErrorHelper.h.
|
inline |
Stream operator for new diagnostic arguments.
Definition at line 78 of file ErrorHelper.h.
|
delete |
|
delete |
|
inline |
Reports the diagnostic to the engine.
Definition at line 107 of file ErrorHelper.h.