15 using namespace llvm::msf;
23 const char *
name()
const noexcept
override {
return "llvm.msf"; }
25 std::string message(
int Condition)
const override {
26 switch (static_cast<msf_error_code>(Condition)) {
28 return "An unknown error has occurred.";
30 return "The buffer is not large enough to read the requested number of "
33 return "The specified stream is not writable.";
35 return "The specified stream does not exist.";
37 return "The data is in an unexpected format.";
39 return "The block is already in use.";
56 ErrMsg =
"MSF Error: ";
59 ErrMsg += EC.message() +
" ";
69 return std::error_code(static_cast<int>(Code), *
Category);
Base class for errors originating when parsing raw PDB files.
MSFError(msf_error_code C)
const std::string & getErrorMessage() const
std::error_code convertToErrorCode() const override
Convert this error to a std::error_code.
static ManagedStatic< _object_error_category > error_category
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
static ManagedStatic< MSFErrorCategory > Category
static GCRegistry::Add< ShadowStackGC > C("shadow-stack","Very portable GC for uncooperative code generators")
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...
void log(raw_ostream &OS) const override
Print an error message to an output stream.