LLVM
17.0.0git
lib
DebugInfo
PDB
Native
RawError.cpp
Go to the documentation of this file.
1
#include "
llvm/DebugInfo/PDB/Native/RawError.h
"
2
#include "
llvm/Support/ErrorHandling.h
"
3
4
using namespace
llvm
;
5
using namespace
llvm::pdb
;
6
7
namespace
{
8
// FIXME: This class is only here to support the transition to llvm::Error. It
9
// will be removed once this transition is complete. Clients should prefer to
10
// deal with the Error value directly, rather than converting to error_code.
11
class
RawErrorCategory :
public
std::error_category {
12
public
:
13
const
char
*
name
()
const
noexcept
override
{
return
"llvm.pdb.raw"
; }
14
std::string
message
(
int
Condition)
const override
{
15
switch
(
static_cast<
raw_error_code
>
(Condition)) {
16
case
raw_error_code::unspecified
:
17
return
"An unknown error has occurred."
;
18
case
raw_error_code::feature_unsupported
:
19
return
"The feature is unsupported by the implementation."
;
20
case
raw_error_code::invalid_format
:
21
return
"The record is in an unexpected format."
;
22
case
raw_error_code::corrupt_file
:
23
return
"The PDB file is corrupt."
;
24
case
raw_error_code::insufficient_buffer
:
25
return
"The buffer is not large enough to read the requested number of "
26
"bytes."
;
27
case
raw_error_code::no_stream
:
28
return
"The specified stream could not be loaded."
;
29
case
raw_error_code::index_out_of_bounds
:
30
return
"The specified item does not exist in the array."
;
31
case
raw_error_code::invalid_block_address
:
32
return
"The specified block address is not valid."
;
33
case
raw_error_code::duplicate_entry
:
34
return
"The entry already exists."
;
35
case
raw_error_code::no_entry
:
36
return
"The entry does not exist."
;
37
case
raw_error_code::not_writable
:
38
return
"The PDB does not support writing."
;
39
case
raw_error_code::stream_too_long
:
40
return
"The stream was longer than expected."
;
41
case
raw_error_code::invalid_tpi_hash
:
42
return
"The Type record has an invalid hash value."
;
43
}
44
llvm_unreachable
(
"Unrecognized raw_error_code"
);
45
}
46
};
47
}
// namespace
48
49
const
std::error_category &
llvm::pdb::RawErrCategory
() {
50
static
RawErrorCategory RawCategory;
51
return
RawCategory;
52
}
53
54
char
RawError::ID
;
llvm::pdb::raw_error_code::no_stream
@ no_stream
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:18
llvm::pdb::RawErrCategory
const std::error_category & RawErrCategory()
Definition:
RawError.cpp:49
name
static const char * name
Definition:
SMEABIPass.cpp:49
ErrorHandling.h
llvm::pdb::raw_error_code::index_out_of_bounds
@ index_out_of_bounds
llvm::pdb::raw_error_code::invalid_format
@ invalid_format
RawError.h
llvm::pdb::raw_error_code
raw_error_code
Definition:
RawError.h:16
llvm::pdb::raw_error_code::corrupt_file
@ corrupt_file
llvm::pdb::raw_error_code::unspecified
@ unspecified
llvm::pdb::raw_error_code::invalid_block_address
@ invalid_block_address
llvm::pdb
Definition:
ConcreteSymbolEnumerator.h:20
llvm::pdb::RawError::ID
static char ID
Definition:
RawError.h:52
const
aarch64 promote const
Definition:
AArch64PromoteConstant.cpp:232
message
message(STATUS "Targeting ${t}") add_subdirectory($
Definition:
CMakeLists.txt:35
llvm::pdb::raw_error_code::feature_unsupported
@ feature_unsupported
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition:
ErrorHandling.h:143
llvm::pdb::raw_error_code::not_writable
@ not_writable
llvm::pdb::raw_error_code::invalid_tpi_hash
@ invalid_tpi_hash
llvm::pdb::raw_error_code::insufficient_buffer
@ insufficient_buffer
llvm::pdb::raw_error_code::no_entry
@ no_entry
llvm::pdb::raw_error_code::stream_too_long
@ stream_too_long
llvm::pdb::raw_error_code::duplicate_entry
@ duplicate_entry
Generated on Sat Jan 28 2023 09:37:23 for LLVM by
1.8.17