LLVM  16.0.0git
DIAError.cpp
Go to the documentation of this file.
3 
4 using namespace llvm;
5 using namespace llvm::pdb;
6 
7 // FIXME: This class is only here to support the transition to llvm::Error. It
8 // will be removed once this transition is complete. Clients should prefer to
9 // deal with the Error value directly, rather than converting to error_code.
10 class DIAErrorCategory : public std::error_category {
11 public:
12  const char *name() const noexcept override { return "llvm.pdb.dia"; }
13  std::string message(int Condition) const override {
14  switch (static_cast<dia_error_code>(Condition)) {
16  return "Failed to connect to DIA at runtime. Verify that Visual Studio "
17  "is properly installed, or that msdiaXX.dll is in your PATH.";
19  return "Unable to load PDB. The file has an unrecognized format.";
21  return "The parameter is incorrect.";
23  return "Unable to load the PDB or EXE, because it is already loaded.";
25  return "The PDB file and the EXE file do not match.";
27  return "An unknown error has occurred.";
28  }
29  llvm_unreachable("Unrecognized DIAErrorCode");
30  }
31 };
32 
33 const std::error_category &llvm::pdb::DIAErrCategory() {
34  static DIAErrorCategory DIACategory;
35  return DIACategory;
36 }
37 
38 char DIAError::ID;
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::pdb::DIAError::ID
static char ID
Definition: DIAError.h:46
ErrorHandling.h
llvm::pdb::dia_error_code::could_not_create_impl
@ could_not_create_impl
llvm::pdb::dia_error_code::unspecified
@ unspecified
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
Definition: ConcreteSymbolEnumerator.h:20
const
aarch64 promote const
Definition: AArch64PromoteConstant.cpp:232
llvm::pdb::dia_error_code::already_loaded
@ already_loaded
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition: ErrorHandling.h:143
llvm::pdb::dia_error_code::invalid_parameter
@ invalid_parameter
DIAErrorCategory::message
std::string message(int Condition) const override
Definition: DIAError.cpp:13
DIAErrorCategory::name
const char * name() const noexcept override
Definition: DIAError.cpp:12
llvm::pdb::DIAErrCategory
const std::error_category & DIAErrCategory()
Definition: DIAError.cpp:33
DIAErrorCategory
Definition: DIAError.cpp:10
DIAError.h