LLVM 20.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
12#include "llvm/Support/Error.h"
13
14namespace llvm {
15namespace codeview {
16enum class cv_error_code {
17 unspecified = 1,
23};
24} // namespace codeview
25} // namespace llvm
26
27namespace std {
28template <>
29struct is_error_code_enum<llvm::codeview::cv_error_code> : std::true_type {};
30} // namespace std
31
32namespace llvm {
33namespace codeview {
34const std::error_category &CVErrorCategory();
35
36inline std::error_code make_error_code(cv_error_code E) {
37 return std::error_code(static_cast<int>(E), CVErrorCategory());
38}
39
40/// Base class for errors originating when parsing raw PDB files
41class CodeViewError : public ErrorInfo<CodeViewError, StringError> {
42public:
44 StringError>::ErrorInfo; // inherit constructors
46 static char ID;
47};
48
49} // namespace codeview
50} // namespace llvm
51
52#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:1263
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: CodeViewError.h:41
std::error_code make_error_code(cv_error_code E)
Definition: CodeViewError.h:36
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:858