25#include "llvm/ADT/SmallString.h"
26#include "llvm/ADT/Triple.h"
27#include "llvm/Support/Error.h"
31namespace saq::bartleby {
34class Error :
public llvm::ErrorInfo<Error> {
42 llvm::SmallString<32>
Msg;
60 llvm::SmallString<32>
Msg;
71 template <
typename T>
Error(T Reason) noexcept : Reason(std::move(Reason)) {}
73 ~Error() noexcept override = default;
75 void log(llvm::raw_ostream &OS) const noexcept override;
76 std::
string message() const noexcept override;
77 std::error_code convertToErrorCode() const noexcept override;
Custom error info for Bartleby.
Definition: Error.h:34
std::variant< UnsupportedBinaryReason, ObjectFormatTypeMismatchReason, MachOUniversalBinaryReason > ReasonT
Reason for error.
Definition: Error.h:66
Error(T Reason) noexcept
Constructs an error using a reason.
Definition: Error.h:71
static char ID
Error ID.
Definition: Error.h:37
Fat Mach-O related error.
Definition: Error.h:58
llvm::SmallString< 32 > Msg
Error message.
Definition: Error.h:60
Error from std::error_code.
Definition: Error.h:40
llvm::SmallString< 32 > Msg
Error message.
Definition: Error.h:42