6 using namespace llvm::pdb;
14 const char *
name()
const noexcept
override {
return "llvm.pdb.raw"; }
16 std::string message(
int Condition)
const override {
17 switch (static_cast<raw_error_code>(Condition)) {
19 return "An unknown error has occurred.";
21 return "The feature is unsupported by the implementation.";
23 return "The record is in an unexpected format.";
25 return "The PDB file is corrupt.";
27 return "The buffer is not large enough to read the requested number of "
30 return "The specified stream could not be loaded.";
32 return "The specified item does not exist in the array.";
34 return "The specified block address is not valid.";
36 return "The entry already exists.";
38 return "The entry does not exist.";
40 return "The PDB does not support writing.";
42 return "The Type record has an invalid hash value.";
59 ErrMsg =
"Native PDB Error: ";
62 ErrMsg += EC.message() +
" ";
72 return std::error_code(static_cast<int>(Code), *
Category);
const std::string & getErrorMessage() const
Base class for errors originating when parsing raw PDB files.
static ManagedStatic< RawErrorCategory > Category
void log(raw_ostream &OS) const override
Print an error message to an output stream.
static ManagedStatic< _object_error_category > error_category
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
std::error_code convertToErrorCode() const override
Convert this error to a std::error_code.
static GCRegistry::Add< ShadowStackGC > C("shadow-stack","Very portable GC for uncooperative code generators")
RawError(raw_error_code C)
This class implements an extremely fast bulk output stream that can only output to a stream...
ManagedStatic - This transparently changes the behavior of global statics to be lazily constructed on...