diff options
Diffstat (limited to 'include/clang/Driver/Driver.h')
-rw-r--r-- | include/clang/Driver/Driver.h | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/include/clang/Driver/Driver.h b/include/clang/Driver/Driver.h index df974ad..67d67c3 100644 --- a/include/clang/Driver/Driver.h +++ b/include/clang/Driver/Driver.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef CLANG_DRIVER_DRIVER_H_ -#define CLANG_DRIVER_DRIVER_H_ +#ifndef LLVM_CLANG_DRIVER_DRIVER_H +#define LLVM_CLANG_DRIVER_DRIVER_H #include "clang/Basic/Diagnostic.h" #include "clang/Basic/LLVM.h" @@ -42,6 +42,7 @@ namespace driver { class Command; class Compilation; class InputInfo; + class Job; class JobAction; class SanitizerArgs; class ToolChain; @@ -103,9 +104,6 @@ public: /// Default target triple. std::string DefaultTargetTriple; - /// Default name for linked images (e.g., "a.out"). - std::string DefaultImageName; - /// Driver title to use with help. std::string DriverTitle; @@ -190,6 +188,12 @@ private: phases::ID getFinalPhase(const llvm::opt::DerivedArgList &DAL, llvm::opt::Arg **FinalPhaseArg = nullptr) const; + // Before executing jobs, sets up response files for commands that need them. + void setUpResponseFiles(Compilation &C, Job &J); + + void generatePrefixedToolNames(const char *Tool, const ToolChain &TC, + SmallVectorImpl<std::string> &Names) const; + public: Driver(StringRef _ClangExecutable, StringRef _DefaultTargetTriple, @@ -291,16 +295,16 @@ public: /// arguments and return an appropriate exit code. /// /// This routine handles additional processing that must be done in addition - /// to just running the subprocesses, for example reporting errors, removing - /// temporary files, etc. - int ExecuteCompilation(const Compilation &C, - SmallVectorImpl< std::pair<int, const Command *> > &FailingCommands) const; + /// to just running the subprocesses, for example reporting errors, setting + /// up response files, removing temporary files, etc. + int ExecuteCompilation(Compilation &C, + SmallVectorImpl< std::pair<int, const Command *> > &FailingCommands); /// generateCompilationDiagnostics - Generate diagnostics information /// including preprocessed source file(s). /// void generateCompilationDiagnostics(Compilation &C, - const Command *FailingCommand); + const Command &FailingCommand); /// @} /// @name Helper Methods @@ -343,8 +347,9 @@ public: /// ConstructAction - Construct the appropriate action to do for /// \p Phase on the \p Input, taking in to account arguments /// like -fsyntax-only or --analyze. - Action *ConstructPhaseAction(const llvm::opt::ArgList &Args, phases::ID Phase, - Action *Input) const; + std::unique_ptr<Action> + ConstructPhaseAction(const llvm::opt::ArgList &Args, phases::ID Phase, + std::unique_ptr<Action> Input) const; /// BuildJobsForAction - Construct the jobs to perform for the /// action \p A. @@ -357,6 +362,9 @@ public: const char *LinkingOutput, InputInfo &Result) const; + /// Returns the default name for linked images (e.g., "a.out"). + const char *getDefaultImageName() const; + /// GetNamedOutputPath - Return the name to use for the output of /// the action \p JA. The result is appended to the compilation's /// list of temporary or result files, as appropriate. |