LLVM  10.0.0svn
DIAError.h
Go to the documentation of this file.
1 //===- DIAError.h - Error extensions for PDB DIA implementation -*- 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_PDB_DIA_DIAERROR_H
10 #define LLVM_DEBUGINFO_PDB_DIA_DIAERROR_H
11 
12 #include "llvm/ADT/StringRef.h"
13 #include "llvm/Support/Error.h"
14 
15 namespace llvm {
16 namespace pdb {
17 enum class dia_error_code {
18  unspecified = 1,
24 };
25 } // namespace pdb
26 } // namespace llvm
27 
28 namespace std {
29 template <>
30 struct is_error_code_enum<llvm::pdb::dia_error_code> : std::true_type {};
31 } // namespace std
32 
33 namespace llvm {
34 namespace pdb {
36 
37 inline std::error_code make_error_code(dia_error_code E) {
38  return std::error_code(static_cast<int>(E), DIAErrCategory());
39 }
40 
41 /// Base class for errors originating in DIA SDK, e.g. COM calls
42 class DIAError : public ErrorInfo<DIAError, StringError> {
43 public:
46  static char ID;
47 };
48 } // namespace pdb
49 } // namespace llvm
50 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:23
dia_error_code
Definition: DIAError.h:17
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(dia_error_code E)
Definition: DIAError.h:37
const std::error_category & DIAErrCategory()
Definition: DIAError.cpp:35
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
static char ID
Definition: DIAError.h:46
static ManagedStatic< _object_error_category > error_category
Definition: Error.cpp:74
Base class for user error types.
Definition: Error.h:344
Base class for errors originating in DIA SDK, e.g. COM calls.
Definition: DIAError.h:42
DIAError(const Twine &S)
Definition: DIAError.h:45