LLVM  14.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 
14 namespace llvm {
15 namespace codeview {
16 enum class cv_error_code {
17  unspecified = 1,
21  no_records,
23 };
24 } // namespace codeview
25 } // namespace llvm
26 
27 namespace std {
28 template <>
29 struct is_error_code_enum<llvm::codeview::cv_error_code> : std::true_type {};
30 } // namespace std
31 
32 namespace llvm {
33 namespace codeview {
35 
36 inline 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
41 class CodeViewError : public ErrorInfo<CodeViewError, StringError> {
42 public:
44  StringError>::ErrorInfo; // inherit constructors
46  static char ID;
47 };
48 
49 } // namespace codeview
50 } // namespace llvm
51 
52 #endif
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
llvm::codeview::cv_error_code::operation_unsupported
@ operation_unsupported
llvm::codeview::CodeViewError
Base class for errors originating when parsing raw PDB files.
Definition: CodeViewError.h:41
Error.h
llvm::codeview::cv_error_code::insufficient_buffer
@ insufficient_buffer
llvm::codeview::make_error_code
std::error_code make_error_code(cv_error_code E)
Definition: CodeViewError.h:36
llvm::codeview::CVErrorCategory
const std::error_category & CVErrorCategory()
Definition: CodeViewError.cpp:46
E
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
llvm::codeview::cv_error_code::no_records
@ no_records
llvm::codeview::CodeViewError::ID
static char ID
Definition: CodeViewError.h:46
llvm::codeview::cv_error_code
cv_error_code
Definition: CodeViewError.h:16
llvm::codeview::CodeViewError::CodeViewError
CodeViewError(const Twine &S)
Definition: CodeViewError.h:45
llvm::StringError
This class wraps a string in an Error.
Definition: Error.h:1208
llvm::ErrorInfo
Base class for user error types.
Definition: Error.h:349
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
llvm::Twine
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:83
std
Definition: BitVector.h:838
llvm::codeview::cv_error_code::corrupt_record
@ corrupt_record
llvm::codeview::cv_error_code::unknown_member_record
@ unknown_member_record
error_category
static ManagedStatic< _object_error_category > error_category
Definition: Error.cpp:76
llvm::codeview::cv_error_code::unspecified
@ unspecified