summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-exegesis/lib/Error.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/Error.h')
-rw-r--r--llvm/tools/llvm-exegesis/lib/Error.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/Error.h b/llvm/tools/llvm-exegesis/lib/Error.h
new file mode 100644
index 00000000000..720cc6829f3
--- /dev/null
+++ b/llvm/tools/llvm-exegesis/lib/Error.h
@@ -0,0 +1,28 @@
+//===-- Error.h -------------------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_TOOLS_LLVM_EXEGESIS_ERROR_H
+#define LLVM_TOOLS_LLVM_EXEGESIS_ERROR_H
+
+#include "llvm/ADT/Twine.h"
+#include "llvm/Support/Error.h"
+
+namespace llvm {
+namespace exegesis {
+
+// A class representing failures that happened within llvm-exegesis, they are
+// used to report informations to the user.
+class Failure : public StringError {
+public:
+ Failure(const Twine &S) : StringError(S, inconvertibleErrorCode()) {}
+};
+
+} // namespace exegesis
+} // namespace llvm
+
+#endif
OpenPOWER on IntegriCloud