LLVM 22.0.0git
RawError.h
Go to the documentation of this file.
1//===- RawError.h - Error extensions for raw PDB 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_NATIVE_RAWERROR_H
10#define LLVM_DEBUGINFO_PDB_NATIVE_RAWERROR_H
11
13#include "llvm/Support/Error.h"
14
15namespace llvm {
16namespace pdb {
32} // namespace pdb
33} // namespace llvm
34
35namespace std {
36template <>
37struct is_error_code_enum<llvm::pdb::raw_error_code> : std::true_type {};
38} // namespace std
39
40namespace llvm {
41namespace pdb {
42LLVM_ABI const std::error_category &RawErrCategory();
43
44inline std::error_code make_error_code(raw_error_code E) {
45 return std::error_code(static_cast<int>(E), RawErrCategory());
46}
47
48/// Base class for errors originating when parsing raw PDB files
49class RawError : public ErrorInfo<RawError, StringError> {
50public:
51 using ErrorInfo<RawError, StringError>::ErrorInfo; // inherit constructors
53 LLVM_ABI static char ID;
54};
55} // namespace pdb
56} // namespace llvm
57#endif
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
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition Twine.h:82
static LLVM_ABI char ID
Definition RawError.h:53
RawError(const Twine &S)
Definition RawError.h:52
std::error_code make_error_code(dia_error_code E)
Definition DIAError.h:37
LLVM_ABI const std::error_category & RawErrCategory()
Definition RawError.cpp:49
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