aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-18 23:24:29 +0000
committerChris Lattner <sabre@nondot.org>2004-02-18 23:24:29 +0000
commitf03715c6a869c9838c4510693e74f796da7589eb (patch)
treeb14ebdf37fc9cd398b3b684b791e3b1bdbeb8344
parent779e640657e14420f8e796b7b179948038fc0707 (diff)
Add support for just compiling a program
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11610 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Support/ToolRunner.h19
-rw-r--r--tools/bugpoint/ToolRunner.h19
2 files changed, 38 insertions, 0 deletions
diff --git a/include/llvm/Support/ToolRunner.h b/include/llvm/Support/ToolRunner.h
index 37451f7439..d8e7503253 100644
--- a/include/llvm/Support/ToolRunner.h
+++ b/include/llvm/Support/ToolRunner.h
@@ -90,6 +90,12 @@ struct AbstractInterpreter {
virtual ~AbstractInterpreter() {}
+ /// compileProgram - Compile the specified program from bytecode to executable
+ /// code. This does not produce any output, it is only used when debugging
+ /// the code generator. If the code generator fails, an exception should be
+ /// thrown, otherwise, this function will just return.
+ virtual void compileProgram(const std::string &Bytecode) {}
+
/// ExecuteProgram - Run the specified bytecode file, emitting output to the
/// specified filename. This returns the exit code of the program.
///
@@ -111,6 +117,12 @@ public:
CBE(const std::string &llcPath, GCC *Gcc) : LLCPath(llcPath), gcc(Gcc) { }
~CBE() { delete gcc; }
+ /// compileProgram - Compile the specified program from bytecode to executable
+ /// code. This does not produce any output, it is only used when debugging
+ /// the code generator. If the code generator fails, an exception should be
+ /// thrown, otherwise, this function will just return.
+ virtual void compileProgram(const std::string &Bytecode);
+
virtual int ExecuteProgram(const std::string &Bytecode,
const std::vector<std::string> &Args,
const std::string &InputFile,
@@ -137,6 +149,13 @@ public:
: LLCPath(llcPath), gcc(Gcc) { }
~LLC() { delete gcc; }
+
+ /// compileProgram - Compile the specified program from bytecode to executable
+ /// code. This does not produce any output, it is only used when debugging
+ /// the code generator. If the code generator fails, an exception should be
+ /// thrown, otherwise, this function will just return.
+ virtual void compileProgram(const std::string &Bytecode);
+
virtual int ExecuteProgram(const std::string &Bytecode,
const std::vector<std::string> &Args,
const std::string &InputFile,
diff --git a/tools/bugpoint/ToolRunner.h b/tools/bugpoint/ToolRunner.h
index 37451f7439..d8e7503253 100644
--- a/tools/bugpoint/ToolRunner.h
+++ b/tools/bugpoint/ToolRunner.h
@@ -90,6 +90,12 @@ struct AbstractInterpreter {
virtual ~AbstractInterpreter() {}
+ /// compileProgram - Compile the specified program from bytecode to executable
+ /// code. This does not produce any output, it is only used when debugging
+ /// the code generator. If the code generator fails, an exception should be
+ /// thrown, otherwise, this function will just return.
+ virtual void compileProgram(const std::string &Bytecode) {}
+
/// ExecuteProgram - Run the specified bytecode file, emitting output to the
/// specified filename. This returns the exit code of the program.
///
@@ -111,6 +117,12 @@ public:
CBE(const std::string &llcPath, GCC *Gcc) : LLCPath(llcPath), gcc(Gcc) { }
~CBE() { delete gcc; }
+ /// compileProgram - Compile the specified program from bytecode to executable
+ /// code. This does not produce any output, it is only used when debugging
+ /// the code generator. If the code generator fails, an exception should be
+ /// thrown, otherwise, this function will just return.
+ virtual void compileProgram(const std::string &Bytecode);
+
virtual int ExecuteProgram(const std::string &Bytecode,
const std::vector<std::string> &Args,
const std::string &InputFile,
@@ -137,6 +149,13 @@ public:
: LLCPath(llcPath), gcc(Gcc) { }
~LLC() { delete gcc; }
+
+ /// compileProgram - Compile the specified program from bytecode to executable
+ /// code. This does not produce any output, it is only used when debugging
+ /// the code generator. If the code generator fails, an exception should be
+ /// thrown, otherwise, this function will just return.
+ virtual void compileProgram(const std::string &Bytecode);
+
virtual int ExecuteProgram(const std::string &Bytecode,
const std::vector<std::string> &Args,
const std::string &InputFile,