clang API Documentation
#include <Job.h>
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 Action & | getSource () const |
getSource - Return the Action which caused the creation of this job. | |
const Tool & | getCreator () 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) |
Command - An executable path/name and argument vector to execute.
Command::Command | ( | const Action & | _Source, |
const Tool & | _Creator, | ||
const char * | _Executable, | ||
const llvm::opt::ArgStringList & | _Arguments | ||
) |
static bool clang::driver::Command::classof | ( | const Job * | J | ) | [inline, static] |
Reimplemented in clang::driver::FallbackCommand.
Definition at line 137 of file Job.h.
References clang::driver::Job::CommandClass, clang::driver::Job::FallbackCommandClass, and clang::driver::Job::getKind().
int Command::Execute | ( | const StringRef ** | Redirects, |
std::string * | ErrMsg, | ||
bool * | ExecutionFailed | ||
) | const [virtual] |
Reimplemented in clang::driver::FallbackCommand.
Definition at line 214 of file Job.cpp.
References clang::driver::Tool::getResponseFileEncoding().
Referenced by clang::driver::Compilation::ExecuteCommand().
const llvm::opt::ArgStringList& clang::driver::Command::getArguments | ( | ) | const [inline] |
Definition at line 135 of file Job.h.
Referenced by clang::createInvocationFromCommandLine(), and clang::tooling::getCC1Arguments().
const Tool& clang::driver::Command::getCreator | ( | ) | const [inline] |
getCreator - Return the Tool which caused the creation of this job.
Definition at line 122 of file Job.h.
Referenced by clang::createInvocationFromCommandLine(), clang::driver::FallbackCommand::Execute(), clang::driver::Driver::ExecuteCompilation(), clang::driver::Driver::generateCompilationDiagnostics(), and clang::tooling::getCC1Arguments().
const char* clang::driver::Command::getExecutable | ( | ) | const [inline] |
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.
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] |
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().