From 03a3d29541d8652b30e96eee9fa139c234bb7b60 Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Mon, 30 Sep 2019 13:53:50 +0000 Subject: [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 --- llvm/tools/llvm-exegesis/lib/Error.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 llvm/tools/llvm-exegesis/lib/Error.h (limited to 'llvm/tools/llvm-exegesis/lib/Error.h') 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 -- cgit v1.2.3