clang 20.0.0git
|
Command - An executable path/name and argument vector to execute. More...
#include "clang/Driver/Job.h"
Public Member Functions | |
Command (const Action &Source, const Tool &Creator, ResponseFileSupport ResponseSupport, const char *Executable, const llvm::opt::ArgStringList &Arguments, ArrayRef< InputInfo > Inputs, ArrayRef< InputInfo > Outputs=std::nullopt, const char *PrependArg=nullptr) | |
Command (const Command &)=default | |
virtual | ~Command ()=default |
virtual void | Print (llvm::raw_ostream &OS, const char *Terminator, bool Quote, CrashReportInfo *CrashInfo=nullptr) const |
virtual int | Execute (ArrayRef< std::optional< 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. | |
const ResponseFileSupport & | getResponseFileSupport () |
Returns the kind of response file supported by the current invocation. | |
void | setResponseFile (const char *FileName) |
Set to pass arguments via a response file when launching the command. | |
void | setInputFileList (llvm::opt::ArgStringList List) |
Set an input file list, necessary if you specified an RF_FileList response file support. | |
virtual void | setEnvironment (llvm::ArrayRef< const char * > NewEnvironment) |
Sets the environment to be used by the new process. | |
void | setRedirectFiles (const std::vector< std::optional< std::string > > &Redirects) |
void | replaceArguments (llvm::opt::ArgStringList List) |
void | replaceExecutable (const char *Exe) |
const char * | getExecutable () const |
const llvm::opt::ArgStringList & | getArguments () const |
const std::vector< InputInfo > & | getInputInfos () const |
const std::vector< std::string > & | getOutputFilenames () const |
std::optional< llvm::sys::ProcessStatistics > | getProcessStatistics () const |
Public Attributes | |
bool | PrintInputFilenames = false |
Whether to print the input filenames when executing. | |
bool | InProcess = false |
Whether the command will be executed in this process or not. | |
Protected Member Functions | |
void | PrintFileNames () const |
Optionally print the filenames to be compiled. | |
Command - An executable path/name and argument vector to execute.
|
default |
|
virtualdefault |
|
virtual |
Reimplemented in clang::driver::CC1Command.
Definition at line 326 of file Job.cpp.
References Env, PrintFileNames(), and clang::driver::ResponseFileSupport::ResponseEncoding.
Referenced by clang::driver::CC1Command::Execute(), and clang::driver::Driver::generateCompilationDiagnostics().
|
inline |
Definition at line 225 of file Job.h.
Referenced by clang::driver::CC1Command::Execute(), and clang::driver::Driver::generateCompilationDiagnostics().
|
inline |
getCreator - Return the Tool which caused the creation of this job.
Definition at line 192 of file Job.h.
Referenced by clang::driver::CC1Command::Execute(), clang::driver::Driver::ExecuteCompilation(), and clang::driver::Driver::generateCompilationDiagnostics().
|
inline |
Definition at line 223 of file Job.h.
Referenced by clang::driver::CC1Command::Execute().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
getSource - Return the Action which caused the creation of this job.
Definition at line 189 of file Job.h.
Referenced by clang::driver::Driver::ExecuteCompilation().
|
virtual |
Reimplemented in clang::driver::CC1Command.
Definition at line 207 of file Job.cpp.
References clang::driver::CrashReportInfo::Filename, clang::Found, clang::driver::InputInfo::getFilename(), clang::driver::ResponseFileSupport::ResponseKind, rewriteIncludes(), clang::driver::ResponseFileSupport::RF_FileList, ShortName, skipArgs(), and clang::driver::CrashReportInfo::VFSPath.
Referenced by clang::driver::CC1Command::Print().
|
protected |
Optionally print the filenames to be compiled.
Definition at line 318 of file Job.cpp.
References PrintInputFilenames.
Referenced by Execute(), and clang::driver::CC1Command::Execute().
|
inline |
Definition at line 217 of file Job.h.
Referenced by clang::driver::Driver::generateCompilationDiagnostics().
|
inline |
|
virtual |
Sets the environment to be used by the new process.
NewEnvironment | An array of environment variables. |
Reimplemented in clang::driver::CC1Command.
|
inline |
void Command::setRedirectFiles | ( | const std::vector< std::optional< std::string > > & | Redirects | ) |
void Command::setResponseFile | ( | const char * | FileName | ) |
Set to pass arguments via a response file when launching the command.
Definition at line 301 of file Job.cpp.
References clang::FileName, and clang::driver::ResponseFileSupport::ResponseFlag.
Whether the command will be executed in this process or not.
Definition at line 170 of file Job.h.
Referenced by clang::driver::CC1Command::CC1Command(), clang::driver::CC1Command::Execute(), and clang::driver::CC1Command::Print().
Whether to print the input filenames when executing.
Definition at line 167 of file Job.h.
Referenced by PrintFileNames().