LLVM  16.0.0git
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 namespace llvm {
15 namespace msf {
16 enum class msf_error_code {
17  unspecified = 1,
24  no_stream,
27 };
28 } // namespace msf
29 } // namespace llvm
30 
31 namespace std {
32 template <>
33 struct is_error_code_enum<llvm::msf::msf_error_code> : std::true_type {};
34 } // namespace std
35 
36 namespace llvm {
37 namespace msf {
38 const std::error_category &MSFErrCategory();
39 
40 inline std::error_code make_error_code(msf_error_code E) {
41  return std::error_code(static_cast<int>(E), MSFErrCategory());
42 }
43 
44 /// Base class for errors originating when parsing raw PDB files
45 class MSFError : public ErrorInfo<MSFError, StringError> {
46 public:
47  using ErrorInfo<MSFError, StringError>::ErrorInfo; // inherit constructors
48  MSFError(const Twine &S) : ErrorInfo(S, msf_error_code::unspecified) {}
49  static char ID;
50 };
51 } // namespace msf
52 } // namespace llvm
53 
54 #endif // LLVM_DEBUGINFO_MSF_MSFERROR_H
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::msf::msf_error_code
msf_error_code
Definition: MSFError.h:16
llvm::msf::msf_error_code::no_stream
@ no_stream
llvm::msf::msf_error_code::insufficient_buffer
@ insufficient_buffer
Error.h
llvm::msf::MSFError::ID
static char ID
Definition: MSFError.h:49
llvm::msf::MSFError
Base class for errors originating when parsing raw PDB files.
Definition: MSFError.h:45
E
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
llvm::msf::msf_error_code::not_writable
@ not_writable
llvm::msf::make_error_code
std::error_code make_error_code(msf_error_code E)
Definition: MSFError.h:40
llvm::msf::msf_error_code::size_overflow_8192
@ size_overflow_8192
llvm::msf::msf_error_code::unspecified
@ unspecified
llvm::ErrorInfo
Base class for user error types.
Definition: Error.h:347
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
llvm::msf::msf_error_code::size_overflow_16384
@ size_overflow_16384
llvm::msf::msf_error_code::size_overflow_4096
@ size_overflow_4096
llvm::Twine
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:81
std
Definition: BitVector.h:851
llvm::msf::MSFErrCategory
const std::error_category & MSFErrCategory()
Definition: MSFError.cpp:52
llvm::msf::msf_error_code::size_overflow_32768
@ size_overflow_32768
llvm::msf::msf_error_code::invalid_format
@ invalid_format
llvm::msf::msf_error_code::block_in_use
@ block_in_use
llvm::msf::MSFError::MSFError
MSFError(const Twine &S)
Definition: MSFError.h:48