File indexing completed on 2026-05-10 08:44:38
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef LLVM_TEXTAPI_TEXTAPIERROR_H
0015 #define LLVM_TEXTAPI_TEXTAPIERROR_H
0016
0017 #include "llvm/Support/Error.h"
0018
0019 namespace llvm::MachO {
0020 enum class TextAPIErrorCode {
0021 NoSuchArchitecture,
0022 EmptyResults,
0023 GenericFrontendError,
0024 InvalidInputFormat,
0025 UnsupportedTarget
0026 };
0027
0028 class TextAPIError : public llvm::ErrorInfo<TextAPIError> {
0029 public:
0030 static char ID;
0031 TextAPIErrorCode EC;
0032 std::string Msg;
0033
0034 TextAPIError(TextAPIErrorCode EC) : EC(EC) {}
0035 TextAPIError(TextAPIErrorCode EC, std::string Msg)
0036 : EC(EC), Msg(std::move(Msg)) {}
0037
0038 void log(raw_ostream &OS) const override;
0039 std::error_code convertToErrorCode() const override;
0040 };
0041
0042 }
0043 #endif