diff options
author | ed <ed@FreeBSD.org> | 2009-07-04 13:58:54 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-07-04 13:58:54 +0000 |
commit | 4981926bf654fe5a2c3893f24ca44106b217e71e (patch) | |
tree | 8ddfe382e1c6d590dc240e76f7cd45cea5c78e24 /include/clang/Driver/Compilation.h | |
parent | c1ff020ff2d3e7ba86f7ab986ac7569c34f2ab1a (diff) | |
download | FreeBSD-src-4981926bf654fe5a2c3893f24ca44106b217e71e.zip FreeBSD-src-4981926bf654fe5a2c3893f24ca44106b217e71e.tar.gz |
Import Clang r74788.
Diffstat (limited to 'include/clang/Driver/Compilation.h')
-rw-r--r-- | include/clang/Driver/Compilation.h | 33 |
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 |