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