6 using namespace llvm::pdb;
13 const char *
name()
const noexcept
override {
return "llvm.pdb.dia"; }
15 std::string
message(
int Condition)
const override {
16 switch (static_cast<dia_error_code>(Condition)) {
18 return "Failed to connect to DIA at runtime. Verify that Visual Studio "
19 "is properly installed, or that msdiaXX.dll is in your PATH.";
21 return "Unable to load PDB. The file has an unrecognized format.";
23 return "The parameter is incorrect.";
25 return "Unable to load the PDB or EXE, because it is already loaded.";
27 return "The PDB file and the EXE file do not match.";
29 return "An unknown error has occurred.";
45 ErrMsg =
"DIA Error: ";
47 ErrMsg += EC.message() +
" ";
57 return std::error_code(static_cast<int>(Code), *
Category);
const char * name() const noexceptoverride
std::error_code convertToErrorCode() const override
Convert this error to a std::error_code.
DIAError(dia_error_code C)
static ManagedStatic< _object_error_category > error_category
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
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.
std::string message(int Condition) const override
static ManagedStatic< DIAErrorCategory > Category
Base class for errors originating in DIA SDK, e.g. COM calls.
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.
ManagedStatic - This transparently changes the behavior of global statics to be lazily constructed on...
void log(raw_ostream &OS) const override
Print an error message to an output stream.