File indexing completed on 2026-05-10 08:43:39
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLVM_DEBUGINFO_CODEVIEW_CODEVIEWERROR_H
0010 #define LLVM_DEBUGINFO_CODEVIEW_CODEVIEWERROR_H
0011
0012 #include "llvm/Support/Error.h"
0013
0014 namespace llvm {
0015 namespace codeview {
0016 enum class cv_error_code {
0017 unspecified = 1,
0018 insufficient_buffer,
0019 operation_unsupported,
0020 corrupt_record,
0021 no_records,
0022 unknown_member_record,
0023 };
0024 }
0025 }
0026
0027 namespace std {
0028 template <>
0029 struct is_error_code_enum<llvm::codeview::cv_error_code> : std::true_type {};
0030 }
0031
0032 namespace llvm {
0033 namespace codeview {
0034 const std::error_category &CVErrorCategory();
0035
0036 inline std::error_code make_error_code(cv_error_code E) {
0037 return std::error_code(static_cast<int>(E), CVErrorCategory());
0038 }
0039
0040
0041 class CodeViewError : public ErrorInfo<CodeViewError, StringError> {
0042 public:
0043 using ErrorInfo<CodeViewError,
0044 StringError>::ErrorInfo;
0045 CodeViewError(const Twine &S) : ErrorInfo(S, cv_error_code::unspecified) {}
0046 static char ID;
0047 };
0048
0049 }
0050 }
0051
0052 #endif