|
template<typename ErrT, typename... ArgTs> |
Error | llvm::make_error (ArgTs &&... Args) |
| Make a Error instance representing failure using the given error info type.
|
Error | llvm::joinErrors (Error E1, Error E2) |
| Concatenate errors.
|
LLVM_ABI void | llvm::report_fatal_error (Error Err, bool gen_crash_diag=true) |
LLVM_ABI void | llvm::reportFatalInternalError (Error Err) |
| Report a fatal error that indicates a bug in LLVM.
|
LLVM_ABI void | llvm::reportFatalUsageError (Error Err) |
| Report a fatal error that does not indicate a bug in LLVM.
|
void | llvm::cantFail (Error Err, const char *Msg=nullptr) |
| Report a fatal error if Err is a failure value.
|
template<typename T> |
T | llvm::cantFail (Expected< T > ValOrErr, const char *Msg=nullptr) |
| Report a fatal error if ValOrErr is a failure value, otherwise unwraps and returns the contained value.
|
template<typename T> |
T & | llvm::cantFail (Expected< T & > ValOrErr, const char *Msg=nullptr) |
| Report a fatal error if ValOrErr is a failure value, otherwise unwraps and returns the contained reference.
|
Error | llvm::handleErrorImpl (std::unique_ptr< ErrorInfoBase > Payload) |
template<typename HandlerT, typename... HandlerTs> |
Error | llvm::handleErrorImpl (std::unique_ptr< ErrorInfoBase > Payload, HandlerT &&Handler, HandlerTs &&... Handlers) |
template<typename... HandlerTs> |
Error | llvm::handleErrors (Error E, HandlerTs &&... Hs) |
| Pass the ErrorInfo(s) contained in E to their respective handlers.
|
template<typename... HandlerTs> |
void | llvm::handleAllErrors (Error E, HandlerTs &&... Handlers) |
| Behaves the same as handleErrors, except that by contract all errors must be handled by the given handlers (i.e.
|
void | llvm::handleAllErrors (Error E) |
| Check that E is a non-error, then drop it.
|
template<typename HandlerT> |
void | llvm::visitErrors (const Error &E, HandlerT H) |
| Visit all the ErrorInfo(s) contained in E by passing them to the respective handler, without consuming the error.
|
template<typename T, typename RecoveryFtor, typename... HandlerTs> |
Expected< T > | llvm::handleExpected (Expected< T > ValOrErr, RecoveryFtor &&RecoveryPath, HandlerTs &&... Handlers) |
| Handle any errors (if present) in an Expected<T>, then try a recovery path.
|
LLVM_ABI void | llvm::logAllUnhandledErrors (Error E, raw_ostream &OS, Twine ErrorBanner={}) |
| Log all errors (if any) in E to OS.
|
LLVM_ABI std::string | llvm::toString (Error E) |
| Write all error messages (if any) in E to a string.
|
LLVM_ABI std::string | llvm::toStringWithoutConsuming (const Error &E) |
| Like toString(), but does not consume the error.
|
void | llvm::consumeError (Error Err) |
| Consume a Error without doing anything.
|
template<typename T> |
std::optional< T > | llvm::expectedToOptional (Expected< T > &&E) |
| Convert an Expected to an Optional without doing anything.
|
template<typename T> |
std::optional< T > | llvm::expectedToStdOptional (Expected< T > &&E) |
bool | llvm::errorToBool (Error Err) |
| Helper for converting an Error to a bool.
|
LLVM_ABI std::error_code | llvm::inconvertibleErrorCode () |
| The value returned by this function can be returned from convertToErrorCode for Error values where no sensible translation to std::error_code exists.
|
LLVM_ABI Error | llvm::errorCodeToError (std::error_code EC) |
| Helper for converting an std::error_code to a Error.
|
LLVM_ABI std::error_code | llvm::errorToErrorCode (Error Err) |
| Helper for converting an ECError to a std::error_code.
|
std::error_code | llvm::errnoAsErrorCode () |
| Helper to get errno as an std::error_code.
|
template<typename T> |
Expected< T > | llvm::errorOrToExpected (ErrorOr< T > &&EO) |
| Convert an ErrorOr<T> to an Expected<T>.
|
template<typename T> |
ErrorOr< T > | llvm::expectedToErrorOr (Expected< T > &&E) |
| Convert an Expected<T> to an ErrorOr<T>.
|
template<typename... Ts> |
Error | llvm::createStringError (std::error_code EC, char const *Fmt, const Ts &... Vals) |
| Create formatted StringError object.
|
LLVM_ABI Error | llvm::createStringError (std::string &&Msg, std::error_code EC) |
Error | llvm::createStringError (std::error_code EC, const char *S) |
Error | llvm::createStringError (std::error_code EC, const Twine &S) |
Error | llvm::createStringError (const Twine &S) |
| Create a StringError with an inconvertible error code.
|
template<typename... Ts> |
Error | llvm::createStringError (char const *Fmt, const Ts &...Vals) |
template<typename... Ts> |
Error | llvm::createStringError (std::errc EC, char const *Fmt, const Ts &... Vals) |
Error | llvm::createFileError (const Twine &F, Error E) |
| Concatenate a source file path and/or name with an Error.
|
Error | llvm::createFileError (const Twine &F, size_t Line, Error E) |
| Concatenate a source file path and/or name with line number and an Error.
|
Error | llvm::createFileError (const Twine &F, std::error_code EC) |
| Concatenate a source file path and/or name with a std::error_code to form an Error object.
|
Error | llvm::createFileError (const Twine &F, size_t Line, std::error_code EC) |
| Concatenate a source file path and/or name with line number and std::error_code to form an Error object.
|
Error | llvm::createFileError (const Twine &F, std::error_code EC, const Twine &S) |
| Create a StringError with the specified error code and prepend the file path to it.
|
template<typename... Ts> |
Error | llvm::createFileError (const Twine &F, std::error_code EC, char const *Fmt, const Ts &...Vals) |
| Create a StringError with the specified error code and prepend the file path to it.
|
Error | llvm::createFileError (const Twine &F, ErrorSuccess)=delete |
LLVMErrorRef | llvm::wrap (Error Err) |
| Conversion from Error to LLVMErrorRef for C error bindings.
|
Error | llvm::unwrap (LLVMErrorRef ErrRef) |
| Conversion from LLVMErrorRef to Error for C error bindings.
|