LLVM  12.0.0git
Go to the documentation of this file.
5 using namespace llvm;
6 using namespace llvm::pdb;
8 namespace {
9 // FIXME: This class is only here to support the transition to llvm::Error. It
10 // will be removed once this transition is complete. Clients should prefer to
11 // deal with the Error value directly, rather than converting to error_code.
12 class RawErrorCategory : public std::error_category {
13 public:
14  const char *name() const noexcept override { return "llvm.pdb.raw"; }
15  std::string message(int Condition) const override {
16  switch (static_cast<raw_error_code>(Condition)) {
18  return "An unknown error has occurred.";
20  return "The feature is unsupported by the implementation.";
22  return "The record is in an unexpected format.";
24  return "The PDB file is corrupt.";
26  return "The buffer is not large enough to read the requested number of "
27  "bytes.";
29  return "The specified stream could not be loaded.";
31  return "The specified item does not exist in the array.";
33  return "The specified block address is not valid.";
35  return "The entry already exists.";
37  return "The entry does not exist.";
39  return "The PDB does not support writing.";
41  return "The stream was longer than expected.";
43  return "The Type record has an invalid hash value.";
44  }
45  llvm_unreachable("Unrecognized raw_error_code");
46  }
47 };
48 } // namespace
53 char RawError::ID;
This class represents lattice values for constants.
Definition: AllocatorList.h:23
static const char * name
static llvm::ManagedStatic< RawErrorCategory > RawCategory
Definition: RawError.cpp:50
const std::error_category & RawErrCategory()
Definition: RawError.cpp:51
static ManagedStatic< _object_error_category > error_category
Definition: Error.cpp:76
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
aarch64 promote const
ManagedStatic - This transparently changes the behavior of global statics to be lazily constructed on...
Definition: ManagedStatic.h:83
static char ID
Definition: RawError.h:54