summaryrefslogtreecommitdiff
path: root/tools/bugpoint/ToolRunner.h
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2004-02-19 07:39:26 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2004-02-19 07:39:26 +0000
commit1d29a6d6c7a7f6203065c003d3d2d002870e38a1 (patch)
treee4829dcf6f561e06c0a4054e91169c5581f92f3d /tools/bugpoint/ToolRunner.h
parent280f9c939df526cca97b025bca405fb495db474d (diff)
downloadllvm-1d29a6d6c7a7f6203065c003d3d2d002870e38a1.tar.gz
llvm-1d29a6d6c7a7f6203065c003d3d2d002870e38a1.tar.bz2
llvm-1d29a6d6c7a7f6203065c003d3d2d002870e38a1.tar.xz
Make ToolExecutionError inherit std::exception and implement its
interface: getMessage() is gone, use what() instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11621 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/ToolRunner.h')
-rw-r--r--tools/bugpoint/ToolRunner.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/bugpoint/ToolRunner.h b/tools/bugpoint/ToolRunner.h
index d8e7503253..9cbbf7f51e 100644
--- a/tools/bugpoint/ToolRunner.h
+++ b/tools/bugpoint/ToolRunner.h
@@ -18,6 +18,7 @@
#define TOOLRUNNER_H
#include "Support/SystemUtils.h"
+#include <exception>
#include <vector>
namespace llvm {
@@ -30,11 +31,12 @@ class LLC;
/// AbstractInterpreter instances if there is an error running a tool (e.g., LLC
/// crashes) which prevents execution of the program.
///
-class ToolExecutionError {
+class ToolExecutionError : std::exception {
std::string Message;
public:
- ToolExecutionError(const std::string &M) : Message(M) {}
- const std::string getMessage() const { return Message; }
+ explicit ToolExecutionError(const std::string &M) : Message(M) {}
+ virtual ~ToolExecutionError() throw();
+ virtual const char* what() const throw() { return Message.c_str(); }
};