LLVM  14.0.0git
MSFError.h
Go to the documentation of this file.
1 //===- MSFError.h - Error extensions for MSF Files --------------*- 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_MSF_MSFERROR_H
10 #define LLVM_DEBUGINFO_MSF_MSFERROR_H
11 
12 #include "llvm/Support/Error.h"
13 
14 namespace llvm {
15 namespace msf {
16 enum class msf_error_code {
17  unspecified = 1,
21  no_stream,
24 };
25 } // namespace msf
26 } // namespace llvm
27 
28 namespace std {
29 template <>
30 struct is_error_code_enum<llvm::msf::msf_error_code> : std::true_type {};
31 } // namespace std
32 
33 namespace llvm {
34 namespace msf {
36 
37 inline std::error_code make_error_code(msf_error_code E) {
38  return std::error_code(static_cast<int>(E), MSFErrCategory());
39 }
40 
41 /// Base class for errors originating when parsing raw PDB files
42 class MSFError : public ErrorInfo<MSFError, StringError> {
43 public:
44  using ErrorInfo<MSFError, StringError>::ErrorInfo; // inherit constructors
45  MSFError(const Twine &S) : ErrorInfo(S, msf_error_code::unspecified) {}
46  static char ID;
47 };
48 } // namespace msf
49 } // namespace llvm
50 
51 #endif // LLVM_DEBUGINFO_MSF_MSFERROR_H
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
llvm::msf::msf_error_code
msf_error_code
Definition: MSFError.h:16
llvm::msf::msf_error_code::no_stream
@ no_stream
llvm::msf::msf_error_code::insufficient_buffer
@ insufficient_buffer
Error.h
llvm::msf::MSFError::ID
static char ID
Definition: MSFError.h:46
llvm::msf::MSFError
Base class for errors originating when parsing raw PDB files.
Definition: MSFError.h:42
E
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
llvm::msf::msf_error_code::not_writable
@ not_writable
llvm::msf::make_error_code
std::error_code make_error_code(msf_error_code E)
Definition: MSFError.h:37
llvm::msf::msf_error_code::unspecified
@ unspecified
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::msf::msf_error_code::size_overflow
@ size_overflow
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::msf::MSFErrCategory
const std::error_category & MSFErrCategory()
Definition: MSFError.cpp:48
llvm::msf::msf_error_code::invalid_format
@ invalid_format
llvm::msf::msf_error_code::block_in_use
@ block_in_use
error_category
static ManagedStatic< _object_error_category > error_category
Definition: Error.cpp:76
llvm::msf::MSFError::MSFError
MSFError(const Twine &S)
Definition: MSFError.h:45