LLVM  8.0.0svn
RawError.h
Go to the documentation of this file.
1 //===- RawError.h - Error extensions for raw PDB 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_RAW_RAWERROR_H
11 #define LLVM_DEBUGINFO_PDB_RAW_RAWERROR_H
12 
13 #include "llvm/Support/Error.h"
14 
15 #include <string>
16 
17 namespace llvm {
18 namespace pdb {
19 enum class raw_error_code {
20  unspecified = 1,
25  no_stream,
29  no_entry,
33 };
34 } // namespace pdb
35 } // namespace llvm
36 
37 namespace std {
38 template <>
39 struct is_error_code_enum<llvm::pdb::raw_error_code> : std::true_type {};
40 } // namespace std
41 
42 namespace llvm {
43 namespace pdb {
45 
46 inline std::error_code make_error_code(raw_error_code E) {
47  return std::error_code(static_cast<int>(E), RawErrCategory());
48 }
49 
50 /// Base class for errors originating when parsing raw PDB files
51 class RawError : public ErrorInfo<RawError, StringError> {
52 public:
53  using ErrorInfo<RawError, StringError>::ErrorInfo; // inherit constructors
55  static char ID;
56 };
57 } // namespace pdb
58 } // namespace llvm
59 #endif
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
Base class for errors originating when parsing raw PDB files.
Definition: RawError.h:51
Definition: BitVector.h:938
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:81
raw_error_code
Definition: RawError.h:19
std::error_code make_error_code(dia_error_code E)
Definition: DIAError.h:38
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
const std::error_category & RawErrCategory()
Definition: RawError.cpp:49
static ManagedStatic< _object_error_category > error_category
Definition: Error.cpp:74
Base class for user error types.
Definition: Error.h:345
RawError(const Twine &S)
Definition: RawError.h:54
static char ID
Definition: RawError.h:55