This is a step1, mechanical refactor, of moving the bulk of llvm-dwp functionality in to a library. This should allow other tools, like BOLT, to re-use some of the llvm-dwp functionality. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D106198
24 lines
522 B
C++
24 lines
522 B
C++
#ifndef TOOLS_LLVM_DWP_DWPERROR
|
|
#define TOOLS_LLVM_DWP_DWPERROR
|
|
|
|
#include "llvm/Support/Error.h"
|
|
#include "llvm/Support/ErrorHandling.h"
|
|
#include <string>
|
|
|
|
namespace llvm {
|
|
class DWPError : public ErrorInfo<DWPError> {
|
|
public:
|
|
DWPError(std::string Info) : Info(std::move(Info)) {}
|
|
void log(raw_ostream &OS) const override { OS << Info; }
|
|
std::error_code convertToErrorCode() const override {
|
|
llvm_unreachable("Not implemented");
|
|
}
|
|
static char ID;
|
|
|
|
private:
|
|
std::string Info;
|
|
};
|
|
} // namespace llvm
|
|
|
|
#endif
|