xref: /freebsd/contrib/llvm-project/llvm/include/llvm/DWP/DWPError.h (revision fe6060f10f634930ff71b7c50291ddc610da2475)
1 #ifndef LLVM_DWP_DWPERROR_H
2 #define LLVM_DWP_DWPERROR_H
3 
4 #include "llvm/Support/Error.h"
5 #include "llvm/Support/ErrorHandling.h"
6 #include <string>
7 
8 namespace llvm {
9 class DWPError : public ErrorInfo<DWPError> {
10 public:
DWPError(std::string Info)11   DWPError(std::string Info) : Info(std::move(Info)) {}
log(raw_ostream & OS)12   void log(raw_ostream &OS) const override { OS << Info; }
convertToErrorCode()13   std::error_code convertToErrorCode() const override {
14     llvm_unreachable("Not implemented");
15   }
16   static char ID;
17 
18 private:
19   std::string Info;
20 };
21 } // namespace llvm
22 
23 #endif // LLVM_DWP_DWPERROR_H
24