13 #ifndef MLIR_SUPPORT_WALKRESULT_H
14 #define MLIR_SUPPORT_WALKRESULT_H
20 class InFlightDiagnostic;
30 enum ResultEnum { Interrupt, Advance, Skip } result;
33 WalkResult(ResultEnum result = Advance) : result(result) {}
37 : result(failed(result) ? Interrupt : Advance) {}
This class contains all of the information necessary to report a diagnostic to the DiagnosticEngine.
This class represents a diagnostic that is inflight and set to be reported.
A utility result that is used to signal how to proceed with an ongoing walk:
WalkResult(InFlightDiagnostic &&)
bool operator==(const WalkResult &rhs) const
WalkResult(LogicalResult result)
Allow LogicalResult to interrupt the walk on failure.
WalkResult(ResultEnum result=Advance)
bool wasSkipped() const
Returns true if the walk was skipped.
static WalkResult advance()
bool wasInterrupted() const
Returns true if the walk was interrupted.
WalkResult(Diagnostic &&)
Allow diagnostics to interrupt the walk.
static WalkResult interrupt()
bool operator!=(const WalkResult &rhs) const
Include the generated interface declarations.