DWPError.h 706 B

12345678910111213141516171819202122232425262728293031323334
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. #ifndef LLVM_DWP_DWPERROR_H
  7. #define LLVM_DWP_DWPERROR_H
  8. #include "llvm/Support/Error.h"
  9. #include "llvm/Support/ErrorHandling.h"
  10. #include <string>
  11. namespace llvm {
  12. class DWPError : public ErrorInfo<DWPError> {
  13. public:
  14. DWPError(std::string Info) : Info(std::move(Info)) {}
  15. void log(raw_ostream &OS) const override { OS << Info; }
  16. std::error_code convertToErrorCode() const override {
  17. llvm_unreachable("Not implemented");
  18. }
  19. static char ID;
  20. private:
  21. std::string Info;
  22. };
  23. } // namespace llvm
  24. #endif // LLVM_DWP_DWPERROR_H
  25. #ifdef __GNUC__
  26. #pragma GCC diagnostic pop
  27. #endif