15 using namespace llvm::pdb;
23 const char *
name()
const noexcept
override {
return "llvm.pdb"; }
25 std::string message(
int Condition)
const override {
26 switch (static_cast<generic_error_code>(Condition)) {
28 return "An unknown error has occurred.";
30 return "LLVM was not compiled with support for DIA. This usually means "
31 "that you are are not using MSVC, or your Visual Studio "
35 return "Unable to load PDB. Make sure the file exists and is readable.";
52 ErrMsg =
"PDB Error: ";
55 ErrMsg += EC.message() +
" ";
65 return std::error_code(static_cast<int>(Code), *
Category);
GenericError(generic_error_code C)
static ManagedStatic< _object_error_category > error_category
Base class for errors originating when parsing raw PDB files.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
static ManagedStatic< GenericErrorCategory > Category
StringRef getErrorMessage() const
static GCRegistry::Add< ShadowStackGC > C("shadow-stack","Very portable GC for uncooperative code generators")
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
void log(raw_ostream &OS) const override
Print an error message to an output stream.
This class implements an extremely fast bulk output stream that can only output to a stream...
StringRef - Represent a constant reference to a string, i.e.
std::error_code convertToErrorCode() const override
Convert this error to a std::error_code.
ManagedStatic - This transparently changes the behavior of global statics to be lazily constructed on...