Skip to content

Commit

Permalink
Add support for just compiling a program
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11610 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
lattner committed Feb 18, 2004
1 parent 779e640 commit f03715c
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
19 changes: 19 additions & 0 deletions include/llvm/Support/ToolRunner.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand All @@ -111,6 +117,12 @@ class CBE : public AbstractInterpreter {
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,
Expand All @@ -137,6 +149,13 @@ class LLC : public AbstractInterpreter {
: 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,
Expand Down
19 changes: 19 additions & 0 deletions tools/bugpoint/ToolRunner.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand All @@ -111,6 +117,12 @@ class CBE : public AbstractInterpreter {
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,
Expand All @@ -137,6 +149,13 @@ class LLC : public AbstractInterpreter {
: 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,
Expand Down

0 comments on commit f03715c

Please sign in to comment.