summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-exegesis/lib/Error.h
diff options
context:
space:
mode:
authorClement Courbet <courbet@google.com>2019-09-30 13:53:50 +0000
committerClement Courbet <courbet@google.com>2019-09-30 13:53:50 +0000
commit03a3d29541d8652b30e96eee9fa139c234bb7b60 (patch)
treed4ebecdf5ce8febf8fff74cc85ef94cc6b6f3561 /llvm/tools/llvm-exegesis/lib/Error.h
parent6f23a68a84c0cb25bd3009758f62367fd475ed24 (diff)
downloadbcm5719-llvm-03a3d29541d8652b30e96eee9fa139c234bb7b60.tar.gz
bcm5719-llvm-03a3d29541d8652b30e96eee9fa139c234bb7b60.zip
[llvm-exegesis][NFC] Move BenchmarkFailure to own file.
Summary: And rename to exegesis::Failure, as it's used everytwhere. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68217 llvm-svn: 373209
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