LLVM API Documentation

llvm::GCC Class Reference

#include <ToolRunner.h>

Collaboration diagram for llvm::GCC:

Collaboration graph
[legend]
List of all members.

Public Types

 AsmFile
 CFile
enum  FileType { AsmFile, CFile }

Public Member Functions

int ExecuteProgram (const std::string &ProgramFile, const std::vector< std::string > &Args, FileType fileType, const std::string &InputFile, const std::string &OutputFile, const std::vector< std::string > &SharedLibs=std::vector< std::string >(), unsigned Timeout=0)
int MakeSharedObject (const std::string &InputFile, FileType fileType, std::string &OutputFile)

Static Public Member Functions

static GCCcreate (const std::string &ProgramPath, std::string &Message)

Detailed Description

Definition at line 46 of file ToolRunner.h.


Member Enumeration Documentation

enum llvm::GCC::FileType

Enumerator:
AsmFile 
CFile 

Definition at line 50 of file ToolRunner.h.


Member Function Documentation

GCC * GCC::create ( const std::string &  ProgramPath,
std::string &  Message 
) [static]

create - Try to find the `gcc' executable

Definition at line 483 of file ToolRunner.cpp.

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

Referenced by llvm::AbstractInterpreter::createCBE(), and llvm::AbstractInterpreter::createLLC().

int GCC::ExecuteProgram ( const std::string &  ProgramFile,
const std::vector< std::string > &  Args,
FileType  fileType,
const std::string &  InputFile,
const std::string &  OutputFile,
const std::vector< std::string > &  SharedLibs = std::vector< std::string >(),
unsigned  Timeout = 0 
)

ExecuteProgram - Execute the program specified by "ProgramFile" (which is either a .s file, or a .c file, specified by FileType), with the specified arguments. Standard input is specified with InputFile, and standard Output is captured to the specified OutputFile location. The SharedLibs option specifies optional native shared objects that can be loaded into the program for execution.

Definition at line 367 of file ToolRunner.cpp.

References llvm::sys::Path::c_str(), CFile, DEBUG, llvm::sys::Path::makeUnique(), ProcessFailure(), and RunProgramWithTimeout().

Referenced by llvm::CBE::ExecuteProgram(), and llvm::LLC::ExecuteProgram().

int GCC::MakeSharedObject ( const std::string &  InputFile,
FileType  fileType,
std::string &  OutputFile 
)

MakeSharedObject - This compiles the specified file (which is either a .c file or a .s file) into a shared object.

Definition at line 437 of file ToolRunner.cpp.

References AsmFile, llvm::sys::Path::c_str(), LTDL_SHLIB_EXT, llvm::sys::Path::makeUnique(), ProcessFailure(), RunProgramWithTimeout(), and llvm::sys::Path::toString().


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