LLVM
15.0.0git
include
llvm
DebugInfo
PDB
DIA
DIAError.h
Go to the documentation of this file.
1
//===- DIAError.h - Error extensions for PDB DIA 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_DIA_DIAERROR_H
10
#define LLVM_DEBUGINFO_PDB_DIA_DIAERROR_H
11
12
#include "
llvm/ADT/StringRef.h
"
13
#include "
llvm/Support/Error.h
"
14
15
namespace
llvm
{
16
namespace
pdb {
17
enum class
dia_error_code
{
18
unspecified
= 1,
19
could_not_create_impl
,
20
invalid_file_format
,
21
invalid_parameter
,
22
already_loaded
,
23
debug_info_mismatch
,
24
};
25
}
// namespace pdb
26
}
// namespace llvm
27
28
namespace
std
{
29
template
<>
30
struct
is_error_code_enum<
llvm
::
pdb::dia_error_code
> : std::true_type {};
31
}
// namespace std
32
33
namespace
llvm
{
34
namespace
pdb {
35
const
std::error_category
&
DIAErrCategory
();
36
37
inline
std::error_code
make_error_code
(
dia_error_code
E
) {
38
return
std::error_code(
static_cast<
int
>
(
E
),
DIAErrCategory
());
39
}
40
41
/// Base class for errors originating in DIA SDK, e.g. COM calls
42
class
DIAError
:
public
ErrorInfo
<DIAError, StringError> {
43
public
:
44
using
ErrorInfo<DIAError, StringError>::ErrorInfo
;
45
DIAError
(
const
Twine
&
S
) :
ErrorInfo
(
S
,
dia_error_code
::unspecified) {}
46
static
char
ID
;
47
};
48
}
// namespace pdb
49
}
// namespace llvm
50
#endif
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:17
llvm::pdb::DIAError::ID
static char ID
Definition:
DIAError.h:46
StringRef.h
Error.h
llvm::pdb::dia_error_code::could_not_create_impl
@ could_not_create_impl
llvm::pdb::dia_error_code::unspecified
@ unspecified
E
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
llvm::pdb::dia_error_code
dia_error_code
Definition:
DIAError.h:17
llvm::pdb::dia_error_code::invalid_file_format
@ invalid_file_format
llvm::pdb::dia_error_code::debug_info_mismatch
@ debug_info_mismatch
llvm::pdb::dia_error_code::already_loaded
@ already_loaded
llvm::pdb::DIAError::DIAError
DIAError(const Twine &S)
Definition:
DIAError.h:45
llvm::pdb::make_error_code
std::error_code make_error_code(dia_error_code E)
Definition:
DIAError.h:37
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::pdb::DIAError
Base class for errors originating in DIA SDK, e.g. COM calls.
Definition:
DIAError.h:42
llvm::pdb::dia_error_code::invalid_parameter
@ invalid_parameter
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::DIAErrCategory
const std::error_category & DIAErrCategory()
Definition:
DIAError.cpp:35
error_category
static ManagedStatic< _object_error_category > error_category
Definition:
Error.cpp:78
Generated on Mon Jun 27 2022 02:00:34 for LLVM by
1.8.17