9 #ifndef LLVM_CLANG_DRIVER_JOB_H 10 #define LLVM_CLANG_DRIVER_JOB_H 13 #include "llvm/ADT/ArrayRef.h" 14 #include "llvm/ADT/Optional.h" 15 #include "llvm/ADT/SmallVector.h" 16 #include "llvm/ADT/StringRef.h" 17 #include "llvm/ADT/iterator.h" 18 #include "llvm/Option/Option.h" 36 : Filename(Filename), VFSPath(VFSPath) {}
49 const char *Executable;
53 llvm::opt::ArgStringList Arguments;
56 llvm::opt::ArgStringList InputFilenames;
59 bool PrintInputFilenames =
false;
63 const char *ResponseFile =
nullptr;
67 llvm::opt::ArgStringList InputFileList;
71 std::string ResponseFileFlag;
74 std::vector<const char *> Environment;
86 void writeResponseFile(raw_ostream &OS)
const;
90 const llvm::opt::ArgStringList &Arguments,
97 virtual void Print(llvm::raw_ostream &OS,
const char *Terminator,
bool Quote,
101 std::string *ErrMsg,
bool *ExecutionFailed)
const;
110 void setResponseFile(
const char *FileName);
115 InputFileList = std::move(List);
126 const llvm::opt::ArgStringList &
getArguments()
const {
return Arguments; }
129 static void printArg(llvm::raw_ostream &OS, StringRef Arg,
bool Quote);
140 const char *Executable_,
141 const llvm::opt::ArgStringList &Arguments_,
143 std::unique_ptr<Command> Fallback_);
145 void Print(llvm::raw_ostream &OS,
const char *Terminator,
bool Quote,
149 bool *ExecutionFailed)
const override;
152 std::unique_ptr<Command> Fallback;
159 const char *Executable_,
160 const llvm::opt::ArgStringList &Arguments_,
163 void Print(llvm::raw_ostream &OS,
const char *Terminator,
bool Quote,
167 bool *ExecutionFailed)
const override;
175 using iterator = llvm::pointee_iterator<list_type::iterator>;
182 void Print(llvm::raw_ostream &OS,
const char *Terminator,
186 void addJob(std::unique_ptr<Command> J) { Jobs.push_back(std::move(J)); }
193 bool empty()
const {
return Jobs.empty(); }
204 #endif // LLVM_CLANG_DRIVER_JOB_H
Like Command, but with a fallback which is executed in case the primary command crashes.
llvm::pointee_iterator< list_type::const_iterator > const_iterator
const_iterator begin() const
Action - Represent an abstract compilation step to perform.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
list_type::size_type size_type
void setPrintInputFilenames(bool P)
Set whether to print the input filenames when executing.
const Tool & getCreator() const
getCreator - Return the Tool which caused the creation of this job.
JobList - A sequence of jobs to perform.
void addJob(std::unique_ptr< Command > J)
Add a job to the list (taking ownership).
const_iterator end() const
Command - An executable path/name and argument vector to execute.
const Action & getSource() const
getSource - Return the Action which caused the creation of this job.
Dataflow Directional Tag Classes.
const char * getExecutable() const
const llvm::opt::ArgStringList & getArguments() const
Like Command, but always pretends that the wrapped command succeeded.
void setInputFileList(llvm::opt::ArgStringList List)
Set an input file list, necessary if we need to use a response file but the tool being called only su...
llvm::pointee_iterator< list_type::iterator > iterator
CrashReportInfo(StringRef Filename, StringRef VFSPath)
const list_type & getJobs() const