LLVM  8.0.1
MSFError.h
Go to the documentation of this file.
1 //===- MSFError.h - Error extensions for MSF Files --------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_DEBUGINFO_MSF_MSFERROR_H
11 #define LLVM_DEBUGINFO_MSF_MSFERROR_H
12 
13 #include "llvm/Support/Error.h"
14 
15 #include <string>
16 
17 namespace llvm {
18 namespace msf {
19 enum class msf_error_code {
20  unspecified = 1,
23  no_stream,
26 };
27 } // namespace msf
28 } // namespace llvm
29 
30 namespace std {
31 template <>
32 struct is_error_code_enum<llvm::msf::msf_error_code> : std::true_type {};
33 } // namespace std
34 
35 namespace llvm {
36 namespace msf {
38 
39 inline std::error_code make_error_code(msf_error_code E) {
40  return std::error_code(static_cast<int>(E), MSFErrCategory());
41 }
42 
43 /// Base class for errors originating when parsing raw PDB files
44 class MSFError : public ErrorInfo<MSFError, StringError> {
45 public:
46  using ErrorInfo<MSFError, StringError>::ErrorInfo; // inherit constructors
48  static char ID;
49 };
50 } // namespace msf
51 } // namespace llvm
52 
53 #endif // LLVM_DEBUGINFO_MSF_MSFERROR_H
Base class for errors originating when parsing raw PDB files.
Definition: MSFError.h:44
This class represents lattice values for constants.
Definition: AllocatorList.h:24
Definition: BitVector.h:938
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:81
std::error_code make_error_code(msf_error_code E)
Definition: MSFError.h:39
static char ID
Definition: MSFError.h:48
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
static ManagedStatic< _object_error_category > error_category
Definition: Error.cpp:75
msf_error_code
Definition: MSFError.h:19
Base class for user error types.
Definition: Error.h:345
MSFError(const Twine &S)
Definition: MSFError.h:47
const std::error_category & MSFErrCategory()
Definition: MSFError.cpp:44