clang  14.0.0git
Public Member Functions | List of all members
clang::driver::CC1Command Class Reference

Use the CC1 tool callback when available, to avoid creating a new process. More...

#include "clang/Driver/Job.h"

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

Public Member Functions

 CC1Command (const Action &Source, const Tool &Creator, ResponseFileSupport ResponseSupport, const char *Executable, const llvm::opt::ArgStringList &Arguments, ArrayRef< InputInfo > Inputs, ArrayRef< InputInfo > Outputs=None)
 
void Print (llvm::raw_ostream &OS, const char *Terminator, bool Quote, CrashReportInfo *CrashInfo=nullptr) const override
 
int Execute (ArrayRef< Optional< StringRef >> Redirects, std::string *ErrMsg, bool *ExecutionFailed) const override
 
void setEnvironment (llvm::ArrayRef< const char * > NewEnvironment) override
 Sets the environment to be used by the new process. More...
 
- Public Member Functions inherited from clang::driver::Command
 Command (const Action &Source, const Tool &Creator, ResponseFileSupport ResponseSupport, const char *Executable, const llvm::opt::ArgStringList &Arguments, ArrayRef< InputInfo > Inputs, ArrayRef< InputInfo > Outputs=None)
 
 Command (const Command &)=default
 
virtual ~Command ()=default
 
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...
 
const ResponseFileSupportgetResponseFileSupport ()
 Returns the kind of response file supported by the current invocation. 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 you specified an RF_FileList response file support. More...
 
const char * getExecutable () const
 
const llvm::opt::ArgStringList & getArguments () const
 
const std::vector< InputInfo > & getInputInfos () const
 
const std::vector< std::string > & getOutputFilenames () const
 
Optional< llvm::sys::ProcessStatistics > getProcessStatistics () const
 

Additional Inherited Members

- Public Attributes inherited from clang::driver::Command
bool PrintInputFilenames = false
 Whether to print the input filenames when executing. More...
 
bool InProcess = false
 Whether the command will be executed in this process or not. More...
 
- Protected Member Functions inherited from clang::driver::Command
void PrintFileNames () const
 Optionally print the filenames to be compiled. More...
 

Detailed Description

Use the CC1 tool callback when available, to avoid creating a new process.

Definition at line 227 of file Job.h.

Constructor & Destructor Documentation

◆ CC1Command()

CC1Command::CC1Command ( const Action Source,
const Tool Creator,
ResponseFileSupport  ResponseSupport,
const char *  Executable,
const llvm::opt::ArgStringList &  Arguments,
ArrayRef< InputInfo Inputs,
ArrayRef< InputInfo Outputs = None 
)

Definition at line 360 of file Job.cpp.

References clang::driver::Command::InProcess.

Member Function Documentation

◆ Execute()

int CC1Command::Execute ( ArrayRef< Optional< StringRef >>  Redirects,
std::string ErrMsg,
bool ExecutionFailed 
) const
overridevirtual

◆ Print()

void CC1Command::Print ( llvm::raw_ostream &  OS,
const char *  Terminator,
bool  Quote,
CrashReportInfo CrashInfo = nullptr 
) const
overridevirtual

Reimplemented from clang::driver::Command.

Definition at line 370 of file Job.cpp.

References clang::driver::Command::InProcess, and clang::driver::Command::Print().

◆ setEnvironment()

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

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.

Reimplemented from clang::driver::Command.

Definition at line 412 of file Job.cpp.


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