UnimplementedError.h 897 B

12345678910111213141516171819202122232425262728
  1. //===-- UnimplementedError.h ------------------------------------*- C++ -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. #ifndef LLDB_UTILITY_UNIMPLEMENTEDERROR_H
  9. #define LLDB_UTILITY_UNIMPLEMENTEDERROR_H
  10. #include "llvm/Support/Errc.h"
  11. #include "llvm/Support/Error.h"
  12. namespace lldb_private {
  13. class UnimplementedError : public llvm::ErrorInfo<UnimplementedError> {
  14. public:
  15. static char ID;
  16. void log(llvm::raw_ostream &OS) const override { OS << "Not implemented"; }
  17. std::error_code convertToErrorCode() const override {
  18. return llvm::errc::not_supported;
  19. };
  20. };
  21. } // namespace lldb_private
  22. #endif // LLDB_UTILITY_UNIMPLEMENTEDERROR_H