summaryrefslogtreecommitdiffstats
path: root/include/clang/Driver/Compilation.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Driver/Compilation.h')
-rw-r--r--include/clang/Driver/Compilation.h33
1 files changed, 19 insertions, 14 deletions
diff --git a/include/clang/Driver/Compilation.h b/include/clang/Driver/Compilation.h
index 4985f30..6414ef1 100644
--- a/include/clang/Driver/Compilation.h
+++ b/include/clang/Driver/Compilation.h
@@ -32,10 +32,10 @@ namespace driver {
/// invocation.
class Compilation {
/// The driver we were created by.
- Driver &TheDriver;
+ const Driver &TheDriver;
/// The default tool chain.
- ToolChain &DefaultToolChain;
+ const ToolChain &DefaultToolChain;
/// The original (untranslated) input argument list.
InputArgList *Args;
@@ -56,7 +56,8 @@ class Compilation {
ArgStringList ResultFiles;
public:
- Compilation(Driver &D, ToolChain &DefaultToolChain, InputArgList *Args);
+ Compilation(const Driver &D, const ToolChain &DefaultToolChain,
+ InputArgList *Args);
~Compilation();
const Driver &getDriver() const { return TheDriver; }
@@ -69,6 +70,11 @@ public:
const ActionList &getActions() const { return Actions; }
JobList &getJobs() { return Jobs; }
+ const JobList &getJobs() const { return Jobs; }
+
+ const ArgStringList &getTempFiles() const { return TempFiles; }
+
+ const ArgStringList &getResultFiles() const { return ResultFiles; }
/// getArgsForToolChain - Return the derived argument list for the
/// tool chain \arg TC (or the default tool chain, if TC is not
@@ -89,11 +95,6 @@ public:
return Name;
}
- /// Execute - Execute the compilation jobs and return an
- /// appropriate exit code.
- int Execute() const;
-
-private:
/// CleanupFileList - Remove the files in the given list.
///
/// \param IssueErrors - Report failures as errors.
@@ -103,22 +104,26 @@ private:
/// PrintJob - Print one job in -### format.
///
- /// OS - The stream to print on.
- /// J - The job to print.
- /// Terminator - A string to print at the end of the line.
- /// Quote - Should separate arguments be quoted.
+ /// \param OS - The stream to print on.
+ /// \param J - The job to print.
+ /// \param Terminator - A string to print at the end of the line.
+ /// \param Quote - Should separate arguments be quoted.
void PrintJob(llvm::raw_ostream &OS, const Job &J,
const char *Terminator, bool Quote) const;
/// ExecuteCommand - Execute an actual command.
///
+ /// \param FailingCommand - For non-zero results, this will be set to the
+ /// Command which failed, if any.
/// \return The result code of the subprocess.
- int ExecuteCommand(const Command &C) const;
+ int ExecuteCommand(const Command &C, const Command *&FailingCommand) const;
/// ExecuteJob - Execute a single job.
///
+ /// \param FailingCommand - For non-zero results, this will be set to the
+ /// Command which failed.
/// \return The accumulated result code of the job.
- int ExecuteJob(const Job &J) const;
+ int ExecuteJob(const Job &J, const Command *&FailingCommand) const;
};
} // end namespace driver
OpenPOWER on IntegriCloud