LLVM 22.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
13#include "llvm/Support/Error.h"
14
15namespace llvm {
16namespace msf {
30} // namespace msf
31} // namespace llvm
32
33namespace std {
34template <>
35struct is_error_code_enum<llvm::msf::msf_error_code> : std::true_type {};
36} // namespace std
37
38namespace llvm {
39namespace msf {
40LLVM_ABI const std::error_category &MSFErrCategory();
41
42inline std::error_code make_error_code(msf_error_code E) {
43 return std::error_code(static_cast<int>(E), MSFErrCategory());
44}
45
46/// Base class for errors originating when parsing raw PDB files
47class MSFError : public ErrorInfo<MSFError, StringError> {
48public:
49 using ErrorInfo<MSFError, StringError>::ErrorInfo; // inherit constructors
51
70
71 LLVM_ABI static char ID;
72};
73} // namespace msf
74} // namespace llvm
75
76#endif // LLVM_DEBUGINFO_MSF_MSFERROR_H
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
#define LLVM_ABI
Definition Compiler.h:213
Base class for user error types.
Definition Error.h:354
StringError(std::string &&S, std::error_code EC, bool PrintMsgOnly)
Definition Error.cpp:146
std::error_code convertToErrorCode() const override
Convert this error to a std::error_code.
Definition Error.cpp:159
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition Twine.h:82
bool isPageOverflow() const
Definition MSFError.h:52
static LLVM_ABI char ID
Definition MSFError.h:71
MSFError(const Twine &S)
Definition MSFError.h:50
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
LLVM_ABI const std::error_category & MSFErrCategory()
Definition MSFError.cpp:54
std::error_code make_error_code(msf_error_code E)
Definition MSFError.h:42
This is an optimization pass for GlobalISel generic memory operations.
Implement std::hash so that hash_code can be used in STL containers.
Definition BitVector.h:851