clang  5.0.0
Public Member Functions | Static Public Member Functions | List of all members
clang::driver::Command Class Reference

Command - An executable path/name and argument vector to execute. More...

#include "clang/Driver/Job.h"

Inheritance diagram for clang::driver::Command:
[legend]

Public Member Functions

 Command (const Action &Source, const Tool &Creator, const char *Executable, const llvm::opt::ArgStringList &Arguments, ArrayRef< InputInfo > Inputs)
 
 Command (const Command &)=default
 
virtual ~Command ()
 
virtual void Print (llvm::raw_ostream &OS, const char *Terminator, bool Quote, CrashReportInfo *CrashInfo=nullptr) const
 
virtual int Execute (const StringRef **Redirects, std::string *ErrMsg, bool *ExecutionFailed) const
 
const ActiongetSource () const
 getSource - Return the Action which caused the creation of this job. More...
 
const ToolgetCreator () const
 getCreator - Return the Tool which caused the creation of this job. More...
 
void setResponseFile (const char *FileName)
 Set to pass arguments via a response file when launching the command. More...
 
void setInputFileList (llvm::opt::ArgStringList List)
 Set an input file list, necessary if we need to use a response file but the tool being called only supports input files lists. More...
 
void setEnvironment (llvm::ArrayRef< const char * > NewEnvironment)
 Sets the environment to be used by the new process. More...
 
const char * getExecutable () const
 
const llvm::opt::ArgStringList & getArguments () const
 

Static Public Member Functions

static void printArg (llvm::raw_ostream &OS, StringRef Arg, bool Quote)
 Print a command argument, and optionally quote it. More...
 

Detailed Description

Command - An executable path/name and argument vector to execute.

Definition at line 44 of file Job.h.

Constructor & Destructor Documentation

clang::driver::Command::Command ( const Action Source,
const Tool Creator,
const char *  Executable,
const llvm::opt::ArgStringList &  Arguments,
ArrayRef< InputInfo Inputs 
)
clang::driver::Command::Command ( const Command )
default
virtual clang::driver::Command::~Command ( )
inlinevirtual

Definition at line 95 of file Job.h.

Member Function Documentation

int Command::Execute ( const StringRef **  Redirects,
std::string *  ErrMsg,
bool ExecutionFailed 
) const
virtual
const llvm::opt::ArgStringList& clang::driver::Command::getArguments ( ) const
inline
const Tool& clang::driver::Command::getCreator ( ) const
inline
const char* clang::driver::Command::getExecutable ( ) const
inline

Definition at line 124 of file Job.h.

const Action& clang::driver::Command::getSource ( ) const
inline

getSource - Return the Action which caused the creation of this job.

Definition at line 104 of file Job.h.

Referenced by clang::driver::Driver::ExecuteCompilation().

void Command::Print ( llvm::raw_ostream &  OS,
const char *  Terminator,
bool  Quote,
CrashReportInfo CrashInfo = nullptr 
) const
virtual
void Command::printArg ( llvm::raw_ostream &  OS,
StringRef  Arg,
bool  Quote 
)
static

Print a command argument, and optionally quote it.

Definition at line 96 of file Job.cpp.

Referenced by printArgList().

void Command::setEnvironment ( llvm::ArrayRef< const char * >  NewEnvironment)

Sets the environment to be used by the new process.

Parameters
NewEnvironmentAn array of environment variables.
Remarks
If the environment remains unset, then the environment from the parent process will be used.

Definition at line 304 of file Job.cpp.

void clang::driver::Command::setInputFileList ( llvm::opt::ArgStringList  List)
inline

Set an input file list, necessary if we need to use a response file but the tool being called only supports input files lists.

Definition at line 114 of file Job.h.

void Command::setResponseFile ( const char *  FileName)

Set to pass arguments via a response file when launching the command.

Definition at line 298 of file Job.cpp.

References FileName, and clang::driver::Tool::getResponseFileFlag().


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