9 #ifndef MLIR_SUPPORT_LOGICALRESULT_H 10 #define MLIR_SUPPORT_LOGICALRESULT_H 13 #include "llvm/ADT/Optional.h" 83 "success should be constructed with an instance of 'T'");
117 explicit operator bool()
const {
return failed(); }
122 #endif // MLIR_SUPPORT_LOGICALRESULT_H ParseResult(LogicalResult result=success())
Include the generated interface declarations.
bool failed(LogicalResult result)
Utility function that returns true if the provided LogicalResult corresponds to a failure value...
bool succeeded(LogicalResult result)
Utility function that returns true if the provided LogicalResult corresponds to a success value...
static constexpr const bool value
bool failed() const
Returns true if the provided LogicalResult corresponds to a failure value.
static LogicalResult success(bool isSuccess=true)
If isSuccess is true a success result is generated, otherwise a 'failure' result is generated...
LogicalResult success(bool isSuccess=true)
Utility function to generate a LogicalResult.
This class represents an efficient way to signal success or failure.
LogicalResult failure(bool isFailure=true)
Utility function to generate a LogicalResult.
This class provides support for representing a failure result, or a valid value of type T...
FailureOr(LogicalResult result)
Allow constructing from a LogicalResult.
bool succeeded() const
Returns true if the provided LogicalResult corresponds to a success value.
FailureOr(const FailureOr< U > &other)
static LogicalResult failure(bool isFailure=true)
If isFailure is true a failure result is generated, otherwise a 'success' result is generated...
This class represents success/failure for parsing-like operations that find it important to chain tog...