LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

llvm::GCC Class Reference

#include <ToolRunner.h>

Collaboration diagram for llvm::GCC:

Collaboration graph
[legend]
List of all members.

Public Types

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 436 of file ToolRunner.cpp.

References llvm::FindExecutable().

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 339 of file ToolRunner.cpp.

References CFile, DEBUG, llvm::getUniqueFilename(), ProcessFailure(), and llvm::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 400 of file ToolRunner.cpp.

References AsmFile, llvm::getUniqueFilename(), LTDL_SHLIB_EXT, ProcessFailure(), and llvm::RunProgramWithTimeout().


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