clang API Documentation

Public Member Functions | Static Public Member Functions
clang::driver::Command Class Reference

#include <Job.h>

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

List of all members.

Public Member Functions

 Command (const Action &_Source, const Tool &_Creator, const char *_Executable, const llvm::opt::ArgStringList &_Arguments)
void Print (llvm::raw_ostream &OS, const char *Terminator, bool Quote, CrashReportInfo *CrashInfo=nullptr) const override
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.
const ToolgetCreator () const
 getCreator - Return the Tool which caused the creation of this job.
void setResponseFile (const char *FileName)
 Set to pass arguments via a response file when launching the command.
void setInputFileList (llvm::opt::ArgStringList List)
const char * getExecutable () const
const llvm::opt::ArgStringList & getArguments () const

Static Public Member Functions

static bool classof (const Job *J)

Detailed Description

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

Definition at line 70 of file Job.h.


Constructor & Destructor Documentation

Command::Command ( const Action _Source,
const Tool _Creator,
const char *  _Executable,
const llvm::opt::ArgStringList &  _Arguments 
)

Definition at line 30 of file Job.cpp.


Member Function Documentation

static bool clang::driver::Command::classof ( const Job J) [inline, static]
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 133 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 119 of file Job.h.

Referenced by clang::driver::Driver::ExecuteCompilation(), InputsOk(), and clang::tooling::stripPositionalArgs().

void Command::Print ( llvm::raw_ostream &  OS,
const char *  Terminator,
bool  Quote,
CrashReportInfo CrashInfo = nullptr 
) const [override, virtual]

Print - Print this Job in -### format.

Parameters:
OS- The stream to print on.
Terminator- A string to print at the end of the line.
Quote- Should separate arguments be quoted.
CrashInfo- Details for inclusion in a crash report.

Implements clang::driver::Job.

Reimplemented in clang::driver::FallbackCommand.

Definition at line 147 of file Job.cpp.

References clang::driver::CrashReportInfo::Filename, clang::driver::Tool::getResponseFilesSupport(), PrintArg(), clang::driver::Tool::RF_FileList, skipArgs(), and clang::driver::CrashReportInfo::VFSPath.

Referenced by clang::driver::Compilation::ExecuteCommand(), and clang::driver::Driver::generateCompilationDiagnostics().

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 129 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 208 of file Job.cpp.

References clang::driver::Tool::getResponseFileFlag().


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