[llvm-commits] CVS: llvm/include/llvm/Support/ToolRunner.h
Alkis Evlogimenos
alkis at cs.uiuc.edu
Thu Feb 19 01:40:03 PST 2004
Changes in directory llvm/include/llvm/Support:
ToolRunner.h updated: 1.10 -> 1.11
---
Log message:
Make ToolExecutionError inherit std::exception and implement its
interface: getMessage() is gone, use what() instead.
---
Diffs of the changes: (+5 -3)
Index: llvm/include/llvm/Support/ToolRunner.h
diff -u llvm/include/llvm/Support/ToolRunner.h:1.10 llvm/include/llvm/Support/ToolRunner.h:1.11
--- llvm/include/llvm/Support/ToolRunner.h:1.10 Wed Feb 18 17:24:29 2004
+++ llvm/include/llvm/Support/ToolRunner.h Thu Feb 19 01:39:26 2004
@@ -18,6 +18,7 @@
#define TOOLRUNNER_H
#include "Support/SystemUtils.h"
+#include <exception>
#include <vector>
namespace llvm {
@@ -30,11 +31,12 @@
/// 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(); }
};
More information about the llvm-commits
mailing list