LLVM  10.0.0svn
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 #include <string>
15 
16 namespace llvm {
17 namespace msf {
18 enum class msf_error_code {
19  unspecified = 1,
22  no_stream,
25 };
26 } // namespace msf
27 } // namespace llvm
28 
29 namespace std {
30 template <>
31 struct is_error_code_enum<llvm::msf::msf_error_code> : std::true_type {};
32 } // namespace std
33 
34 namespace llvm {
35 namespace msf {
37 
38 inline std::error_code make_error_code(msf_error_code E) {
39  return std::error_code(static_cast<int>(E), MSFErrCategory());
40 }
41 
42 /// Base class for errors originating when parsing raw PDB files
43 class MSFError : public ErrorInfo<MSFError, StringError> {
44 public:
45  using ErrorInfo<MSFError, StringError>::ErrorInfo; // inherit constructors
47  static char ID;
48 };
49 } // namespace msf
50 } // namespace llvm
51 
52 #endif // LLVM_DEBUGINFO_MSF_MSFERROR_H
Base class for errors originating when parsing raw PDB files.
Definition: MSFError.h:43
This class represents lattice values for constants.
Definition: AllocatorList.h:23
Definition: BitVector.h:937
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:80
std::error_code make_error_code(msf_error_code E)
Definition: MSFError.h:38
static char ID
Definition: MSFError.h:47
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
static ManagedStatic< _object_error_category > error_category
Definition: Error.cpp:74
msf_error_code
Definition: MSFError.h:18
Base class for user error types.
Definition: Error.h:344
MSFError(const Twine &S)
Definition: MSFError.h:46
const std::error_category & MSFErrCategory()
Definition: MSFError.cpp:45