LLVM API Documentation

llvm::AbstractInterpreter Class Reference

#include <ToolRunner.h>

Inheritance diagram for llvm::AbstractInterpreter:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual ~AbstractInterpreter ()
virtual void compileProgram (const std::string &Bytecode)
virtual int ExecuteProgram (const std::string &Bytecode, const std::vector< std::string > &Args, const std::string &InputFile, const std::string &OutputFile, const std::vector< std::string > &SharedLibs=std::vector< std::string >(), unsigned Timeout=0)=0

Static Public Member Functions

static CBEcreateCBE (const std::string &ProgramPath, std::string &Message, const std::vector< std::string > *Args=0)
static LLCcreateLLC (const std::string &ProgramPath, std::string &Message, const std::vector< std::string > *Args=0)
static AbstractInterpretercreateLLI (const std::string &ProgramPath, std::string &Message, const std::vector< std::string > *Args=0)
static AbstractInterpretercreateJIT (const std::string &ProgramPath, std::string &Message, const std::vector< std::string > *Args=0)

Detailed Description

AbstractInterpreter Class - Subclasses of this class are used to execute LLVM bytecode in a variety of ways. This abstract interface hides this complexity behind a simple interface.

Definition at line 82 of file ToolRunner.h.


Constructor & Destructor Documentation

virtual llvm::AbstractInterpreter::~AbstractInterpreter (  )  [inline, virtual]

Definition at line 98 of file ToolRunner.h.


Member Function Documentation

virtual void llvm::AbstractInterpreter::compileProgram ( const std::string &  Bytecode  )  [inline, virtual]

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.

Reimplemented in llvm::CBE, and llvm::LLC.

Definition at line 104 of file ToolRunner.h.

CBE * AbstractInterpreter::createCBE ( const std::string &  ProgramPath,
std::string &  Message,
const std::vector< std::string > *  Args = 0 
) [static]

createCBE - Try to find the 'llc' executable

Definition at line 345 of file ToolRunner.cpp.

References llvm::GCC::create(), llvm::FindExecutable(), llvm::sys::Path::isEmpty(), and llvm::sys::Path::toString().

AbstractInterpreter * AbstractInterpreter::createJIT ( const std::string &  ProgPath,
std::string &  Message,
const std::vector< std::string > *  Args = 0 
) [static]

createJIT - Try to find the LLI executable

Definition at line 281 of file ToolRunner.cpp.

References llvm::FindExecutable(), LLIPath, and llvm::sys::Path::toString().

LLC * AbstractInterpreter::createLLC ( const std::string &  ProgramPath,
std::string &  Message,
const std::vector< std::string > *  Args = 0 
) [static]

createLLC - Try to find the LLC executable

Definition at line 201 of file ToolRunner.cpp.

References llvm::GCC::create(), llvm::FindExecutable(), and llvm::sys::Path::toString().

AbstractInterpreter * AbstractInterpreter::createLLI ( const std::string &  ProgramPath,
std::string &  Message,
const std::vector< std::string > *  Args = 0 
) [static]

Definition at line 133 of file ToolRunner.cpp.

References llvm::FindExecutable(), LLIPath, and llvm::sys::Path::toString().

virtual int llvm::AbstractInterpreter::ExecuteProgram ( const std::string &  Bytecode,
const std::vector< std::string > &  Args,
const std::string &  InputFile,
const std::string &  OutputFile,
const std::vector< std::string > &  SharedLibs = std::vector< std::string >(),
unsigned  Timeout = 0 
) [pure virtual]

ExecuteProgram - Run the specified bytecode file, emitting output to the specified filename. This returns the exit code of the program.

Implemented in llvm::CBE, and llvm::LLC.


The documentation for this class was generated from the following files: