LLVM
15.0.0git
include
llvm
DebugInfo
PDB
GenericError.h
Go to the documentation of this file.
1
//===- GenericError.h - system_error extensions for PDB ---------*- 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_GENERICERROR_H
10
#define LLVM_DEBUGINFO_PDB_GENERICERROR_H
11
12
#include "
llvm/Support/Error.h
"
13
14
namespace
llvm
{
15
namespace
pdb {
16
17
enum class
pdb_error_code
{
18
invalid_utf8_path
= 1,
19
dia_sdk_not_present
,
20
dia_failed_loading
,
21
signature_out_of_date
,
22
no_matching_pch
,
23
unspecified
,
24
};
25
}
// namespace pdb
26
}
// namespace llvm
27
28
namespace
std
{
29
template
<>
30
struct
is_error_code_enum<
llvm
::
pdb::pdb_error_code
> : std::true_type {};
31
}
// namespace std
32
33
namespace
llvm
{
34
namespace
pdb {
35
const
std::error_category
&
PDBErrCategory
();
36
37
inline
std::error_code
make_error_code
(
pdb_error_code
E
) {
38
return
std::error_code(
static_cast<
int
>
(
E
),
PDBErrCategory
());
39
}
40
41
/// Base class for errors originating when parsing raw PDB files
42
class
PDBError
:
public
ErrorInfo
<PDBError, StringError> {
43
public
:
44
using
ErrorInfo<PDBError, StringError>::ErrorInfo
;
// inherit constructors
45
PDBError
(
const
Twine
&
S
) :
ErrorInfo
(
S
,
pdb_error_code
::unspecified) {}
46
static
char
ID
;
47
};
48
}
// namespace pdb
49
}
// namespace llvm
50
#endif
llvm::pdb::pdb_error_code
pdb_error_code
Definition:
GenericError.h:17
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:17
Error.h
llvm::pdb::pdb_error_code::invalid_utf8_path
@ invalid_utf8_path
E
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
llvm::pdb::pdb_error_code::signature_out_of_date
@ signature_out_of_date
llvm::pdb::PDBError::PDBError
PDBError(const Twine &S)
Definition:
GenericError.h:45
llvm::pdb::pdb_error_code::unspecified
@ unspecified
llvm::pdb::make_error_code
std::error_code make_error_code(dia_error_code E)
Definition:
DIAError.h:37
llvm::pdb::pdb_error_code::dia_sdk_not_present
@ dia_sdk_not_present
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::Twine
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition:
Twine.h:83
std
Definition:
BitVector.h:851
llvm::pdb::PDBError
Base class for errors originating when parsing raw PDB files.
Definition:
GenericError.h:42
llvm::pdb::pdb_error_code::dia_failed_loading
@ dia_failed_loading
llvm::pdb::pdb_error_code::no_matching_pch
@ no_matching_pch
llvm::pdb::PDBErrCategory
const std::error_category & PDBErrCategory()
Definition:
GenericError.cpp:46
llvm::pdb::PDBError::ID
static char ID
Definition:
GenericError.h:46
error_category
static ManagedStatic< _object_error_category > error_category
Definition:
Error.cpp:76
Generated on Fri May 20 2022 08:01:55 for LLVM by
1.8.17