LLVM 20.0.0git
RawError.h
Go to the documentation of this file.
1//===- RawError.h - Error extensions for raw PDB implementation -*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_DEBUGINFO_PDB_NATIVE_RAWERROR_H
10#define LLVM_DEBUGINFO_PDB_NATIVE_RAWERROR_H
11
12#include "llvm/Support/Error.h"
13
14namespace llvm {
15namespace pdb {
16enum class raw_error_code {
17 unspecified = 1,
30};
31} // namespace pdb
32} // namespace llvm
33
34namespace std {
35template <>
36struct is_error_code_enum<llvm::pdb::raw_error_code> : std::true_type {};
37} // namespace std
38
39namespace llvm {
40namespace pdb {
41const std::error_category &RawErrCategory();
42
43inline std::error_code make_error_code(raw_error_code E) {
44 return std::error_code(static_cast<int>(E), RawErrCategory());
45}
46
47/// Base class for errors originating when parsing raw PDB files
48class RawError : public ErrorInfo<RawError, StringError> {
49public:
50 using ErrorInfo<RawError, StringError>::ErrorInfo; // inherit constructors
52 static char ID;
53};
54} // namespace pdb
55} // namespace llvm
56#endif
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
Base class for user error types.
Definition: Error.h:355
This class wraps a string in an Error.
Definition: Error.h:1268
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:81
Base class for errors originating when parsing raw PDB files.
Definition: RawError.h:48
static char ID
Definition: RawError.h:52
RawError(const Twine &S)
Definition: RawError.h:51
std::error_code make_error_code(dia_error_code E)
Definition: DIAError.h:37
raw_error_code
Definition: RawError.h:16
const std::error_category & RawErrCategory()
Definition: RawError.cpp:49
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
Implement std::hash so that hash_code can be used in STL containers.
Definition: BitVector.h:858