MLIR
20.0.0git
|
A compatibility class connecting InFlightDiagnostic
to DiagnosedSilenceableFailure
while providing an interface similar to the former.
More...
#include "mlir/Dialect/Transform/Utils/DiagnosedSilenceableFailure.h"
Public Member Functions | |
DiagnosedDefiniteFailure (DiagnosedDefiniteFailure &&)=default | |
Only move-constructible because it carries an in-flight diagnostic. More... | |
template<typename T > | |
DiagnosedDefiniteFailure & | operator<< (T &&value) & |
Forward the message to the diagnostic. More... | |
template<typename T > | |
DiagnosedDefiniteFailure && | operator<< (T &&value) && |
Diagnostic & | attachNote (std::optional< Location > loc=std::nullopt) |
Attaches a note to the error. More... | |
operator DiagnosedSilenceableFailure () | |
Implicit conversion to DiagnosedSilenceableFailure in the definite failure state. More... | |
operator LogicalResult () | |
Implicit conversion to LogicalResult in the failure state. More... | |
Friends | |
DiagnosedDefiniteFailure | emitDefiniteFailure (Location loc, const Twine &message) |
Emits a definite failure with the given message. More... | |
A compatibility class connecting InFlightDiagnostic
to DiagnosedSilenceableFailure
while providing an interface similar to the former.
Implicitly convertible to DiagnosticSilenceableFailure
in definite failure state and to LogicalResult
failure. Reports the error on conversion or on destruction. Instances of this class can be created by emitDefiniteFailure()
.
Definition at line 184 of file DiagnosedSilenceableFailure.h.
|
default |
Only move-constructible because it carries an in-flight diagnostic.
|
inline |
Attaches a note to the error.
Definition at line 204 of file DiagnosedSilenceableFailure.h.
References mlir::InFlightDiagnostic::attachNote().
|
inline |
Implicit conversion to DiagnosedSilenceableFailure in the definite failure state.
Reports the error.
Definition at line 210 of file DiagnosedSilenceableFailure.h.
References mlir::DiagnosedSilenceableFailure::definiteFailure(), and mlir::InFlightDiagnostic::report().
|
inline |
Implicit conversion to LogicalResult in the failure state.
Reports the error.
Definition at line 217 of file DiagnosedSilenceableFailure.h.
References mlir::InFlightDiagnostic::report().
|
inline |
Forward the message to the diagnostic.
Definition at line 194 of file DiagnosedSilenceableFailure.h.
|
inline |
Definition at line 199 of file DiagnosedSilenceableFailure.h.
|
friend |
Emits a definite failure with the given message.
The returned object allows for last-minute modification to the error message, such as attaching notes and completing the message. It will be reported when the object is destructed or converted.
Definition at line 243 of file DiagnosedSilenceableFailure.h.