aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/clang/include/clang/Driver/Job.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/clang/include/clang/Driver/Job.h')
-rw-r--r--contrib/llvm-project/clang/include/clang/Driver/Job.h29
1 files changed, 24 insertions, 5 deletions
diff --git a/contrib/llvm-project/clang/include/clang/Driver/Job.h b/contrib/llvm-project/clang/include/clang/Driver/Job.h
index 6173b9d314b4..199387cddd5c 100644
--- a/contrib/llvm-project/clang/include/clang/Driver/Job.h
+++ b/contrib/llvm-project/clang/include/clang/Driver/Job.h
@@ -122,6 +122,9 @@ class Command {
/// The list of program arguments which are inputs.
llvm::opt::ArgStringList InputFilenames;
+ /// The list of program arguments which are outputs. May be empty.
+ std::vector<std::string> OutputFilenames;
+
/// Response file name, if this command is set to use one, or nullptr
/// otherwise
const char *ResponseFile = nullptr;
@@ -137,6 +140,9 @@ class Command {
/// See Command::setEnvironment
std::vector<const char *> Environment;
+ /// Information on executable run provided by OS.
+ mutable Optional<llvm::sys::ProcessStatistics> ProcStat;
+
/// When a response file is needed, we try to put most arguments in an
/// exclusive file, while others remains as regular command line arguments.
/// This functions fills a vector with the regular command line arguments,
@@ -158,8 +164,8 @@ public:
Command(const Action &Source, const Tool &Creator,
ResponseFileSupport ResponseSupport, const char *Executable,
- const llvm::opt::ArgStringList &Arguments,
- ArrayRef<InputInfo> Inputs);
+ const llvm::opt::ArgStringList &Arguments, ArrayRef<InputInfo> Inputs,
+ ArrayRef<InputInfo> Outputs = None);
// FIXME: This really shouldn't be copyable, but is currently copied in some
// error handling in Driver::generateCompilationDiagnostics.
Command(const Command &) = default;
@@ -201,6 +207,18 @@ public:
const llvm::opt::ArgStringList &getArguments() const { return Arguments; }
+ const llvm::opt::ArgStringList &getInputFilenames() const {
+ return InputFilenames;
+ }
+
+ const std::vector<std::string> &getOutputFilenames() const {
+ return OutputFilenames;
+ }
+
+ Optional<llvm::sys::ProcessStatistics> getProcessStatistics() const {
+ return ProcStat;
+ }
+
protected:
/// Optionally print the filenames to be compiled
void PrintFileNames() const;
@@ -212,7 +230,7 @@ public:
CC1Command(const Action &Source, const Tool &Creator,
ResponseFileSupport ResponseSupport, const char *Executable,
const llvm::opt::ArgStringList &Arguments,
- ArrayRef<InputInfo> Inputs);
+ ArrayRef<InputInfo> Inputs, ArrayRef<InputInfo> Outputs = None);
void Print(llvm::raw_ostream &OS, const char *Terminator, bool Quote,
CrashReportInfo *CrashInfo = nullptr) const override;
@@ -230,7 +248,7 @@ public:
FallbackCommand(const Action &Source_, const Tool &Creator_,
ResponseFileSupport ResponseSupport, const char *Executable_,
const llvm::opt::ArgStringList &Arguments_,
- ArrayRef<InputInfo> Inputs,
+ ArrayRef<InputInfo> Inputs, ArrayRef<InputInfo> Outputs,
std::unique_ptr<Command> Fallback_);
void Print(llvm::raw_ostream &OS, const char *Terminator, bool Quote,
@@ -250,7 +268,8 @@ public:
ResponseFileSupport ResponseSupport,
const char *Executable_,
const llvm::opt::ArgStringList &Arguments_,
- ArrayRef<InputInfo> Inputs);
+ ArrayRef<InputInfo> Inputs,
+ ArrayRef<InputInfo> Outputs = None);
void Print(llvm::raw_ostream &OS, const char *Terminator, bool Quote,
CrashReportInfo *CrashInfo = nullptr) const override;