LLVM 19.0.0git
Classes | Namespaces | Functions
LogicalResult.h File Reference
#include <cassert>
#include <optional>

Go to the source code of this file.

Classes

struct  llvm::LogicalResult
 This class represents an efficient way to signal success or failure. More...
 
class  llvm::FailureOr< T >
 This class provides support for representing a failure result, or a valid value of type T. More...
 
class  llvm::ParseResult
 This class represents success/failure for parsing-like operations that find it important to chain together failable operations with ||. More...
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Functions

LogicalResult llvm::success (bool IsSuccess=true)
 Utility function to generate a LogicalResult.
 
LogicalResult llvm::failure (bool IsFailure=true)
 Utility function to generate a LogicalResult.
 
bool llvm::succeeded (LogicalResult Result)
 Utility function that returns true if the provided LogicalResult corresponds to a success value.
 
bool llvm::failed (LogicalResult Result)
 Utility function that returns true if the provided LogicalResult corresponds to a failure value.
 
template<typename T , typename = std::enable_if_t<!std::is_convertible_v<T, bool>>>
auto llvm::success (T &&Y)
 Wrap a value on the success path in a FailureOr of the same value type.