File indexing completed on 2026-05-10 08:43:45
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLVM_DEBUGINFO_PDB_NATIVE_RAWERROR_H
0010 #define LLVM_DEBUGINFO_PDB_NATIVE_RAWERROR_H
0011
0012 #include "llvm/Support/Error.h"
0013
0014 namespace llvm {
0015 namespace pdb {
0016 enum class raw_error_code {
0017 unspecified = 1,
0018 feature_unsupported,
0019 invalid_format,
0020 corrupt_file,
0021 insufficient_buffer,
0022 no_stream,
0023 index_out_of_bounds,
0024 invalid_block_address,
0025 duplicate_entry,
0026 no_entry,
0027 not_writable,
0028 stream_too_long,
0029 invalid_tpi_hash,
0030 };
0031 }
0032 }
0033
0034 namespace std {
0035 template <>
0036 struct is_error_code_enum<llvm::pdb::raw_error_code> : std::true_type {};
0037 }
0038
0039 namespace llvm {
0040 namespace pdb {
0041 const std::error_category &RawErrCategory();
0042
0043 inline std::error_code make_error_code(raw_error_code E) {
0044 return std::error_code(static_cast<int>(E), RawErrCategory());
0045 }
0046
0047
0048 class RawError : public ErrorInfo<RawError, StringError> {
0049 public:
0050 using ErrorInfo<RawError, StringError>::ErrorInfo;
0051 RawError(const Twine &S) : ErrorInfo(S, raw_error_code::unspecified) {}
0052 static char ID;
0053 };
0054 }
0055 }
0056 #endif