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