LLVM 22.0.0git
CodeViewError.h
Go to the documentation of this file.
1//===- CodeViewError.h - Error extensions for CodeView ----------*- 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_CODEVIEW_CODEVIEWERROR_H
10#define LLVM_DEBUGINFO_CODEVIEW_CODEVIEWERROR_H
11
13#include "llvm/Support/Error.h"
14
15namespace llvm {
16namespace codeview {
17enum class cv_error_code {
18 unspecified = 1,
24};
25} // namespace codeview
26} // namespace llvm
27
28namespace std {
29template <>
30struct is_error_code_enum<llvm::codeview::cv_error_code> : std::true_type {};
31} // namespace std
32
33namespace llvm {
34namespace codeview {
35LLVM_ABI const std::error_category &CVErrorCategory();
36
37inline std::error_code make_error_code(cv_error_code E) {
38 return std::error_code(static_cast<int>(E), CVErrorCategory());
39}
40
41/// Base class for errors originating when parsing raw PDB files
42class CodeViewError : public ErrorInfo<CodeViewError, StringError> {
43public:
45 StringError>::ErrorInfo; // inherit constructors
47 LLVM_ABI static char ID;
48};
49
50} // namespace codeview
51} // namespace llvm
52
53#endif
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
#define LLVM_ABI
Definition: Compiler.h:213
Base class for user error types.
Definition: Error.h:354
This class wraps a string in an Error.
Definition: Error.h:1282
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:82
Base class for errors originating when parsing raw PDB files.
Definition: CodeViewError.h:42
static LLVM_ABI char ID
Definition: CodeViewError.h:47
std::error_code make_error_code(cv_error_code E)
Definition: CodeViewError.h:37
LLVM_ABI const std::error_category & CVErrorCategory()
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:856