clang 17.0.0git
Public Member Functions | List of all members
clang::driver::ForceSuccessCommand Class Reference

Like Command, but always pretends that the wrapped command succeeded. More...

#include "clang/Driver/Job.h"

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

Public Member Functions

 ForceSuccessCommand (const Action &Source_, const Tool &Creator_, ResponseFileSupport ResponseSupport, const char *Executable_, const llvm::opt::ArgStringList &Arguments_, ArrayRef< InputInfo > Inputs, ArrayRef< InputInfo > Outputs=std::nullopt)
 
void Print (llvm::raw_ostream &OS, const char *Terminator, bool Quote, CrashReportInfo *CrashInfo=nullptr) const override
 
int Execute (ArrayRef< std::optional< StringRef > > Redirects, std::string *ErrMsg, bool *ExecutionFailed) const override
 
- 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=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 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.
 
const ResponseFileSupportgetResponseFileSupport ()
 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
 

Additional Inherited Members

- Public Attributes inherited from clang::driver::Command
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 inherited from clang::driver::Command
void PrintFileNames () const
 Optionally print the filenames to be compiled.
 

Detailed Description

Like Command, but always pretends that the wrapped command succeeded.

Definition at line 262 of file Job.h.

Constructor & Destructor Documentation

◆ ForceSuccessCommand()

ForceSuccessCommand::ForceSuccessCommand ( const Action Source_,
const Tool Creator_,
ResponseFileSupport  ResponseSupport,
const char *  Executable_,
const llvm::opt::ArgStringList &  Arguments_,
ArrayRef< InputInfo Inputs,
ArrayRef< InputInfo Outputs = std::nullopt 
)

Definition at line 452 of file Job.cpp.

Member Function Documentation

◆ Execute()

int ForceSuccessCommand::Execute ( ArrayRef< std::optional< StringRef > >  Redirects,
std::string *  ErrMsg,
bool ExecutionFailed 
) const
overridevirtual

Reimplemented from clang::driver::Command.

Definition at line 466 of file Job.cpp.

References clang::driver::Command::Execute().

◆ Print()

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

Reimplemented from clang::driver::Command.

Definition at line 460 of file Job.cpp.

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


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