mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
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
This commit is contained in:
@@ -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(); }
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user