diff options
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Driver/Tools.h')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Driver/Tools.h | 89 |
1 files changed, 21 insertions, 68 deletions
diff --git a/contrib/llvm/tools/clang/lib/Driver/Tools.h b/contrib/llvm/tools/clang/lib/Driver/Tools.h index 7ac43ec..d647171 100644 --- a/contrib/llvm/tools/clang/lib/Driver/Tools.h +++ b/contrib/llvm/tools/clang/lib/Driver/Tools.h @@ -13,7 +13,6 @@ #include "clang/Driver/Tool.h" #include "clang/Driver/Types.h" #include "clang/Driver/Util.h" - #include "llvm/ADT/Triple.h" #include "llvm/Support/Compiler.h" @@ -31,7 +30,17 @@ namespace tools { /// \brief Clang compiler tool. class LLVM_LIBRARY_VISIBILITY Clang : public Tool { + public: + static const char *getBaseInputName(const ArgList &Args, + const InputInfoList &Inputs); + static const char *getBaseInputStem(const ArgList &Args, + const InputInfoList &Inputs); + static const char *getDependencyFileName(const ArgList &Args, + const InputInfoList &Inputs); + + private: void AddPreprocessingOptions(Compilation &C, + const JobAction &JA, const Driver &D, const ArgList &Args, ArgStringList &CmdArgs, @@ -42,6 +51,7 @@ namespace tools { bool KernelOrKext) const; void AddMIPSTargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const; void AddPPCTargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const; + void AddR600TargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const; void AddSparcTargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const; void AddX86TargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const; void AddHexagonTargetArgs (const ArgList &Args, ArgStringList &CmdArgs) const; @@ -219,63 +229,6 @@ namespace darwin { const ToolChain &TC) : Tool(Name, ShortName, TC) {} }; - class LLVM_LIBRARY_VISIBILITY CC1 : public DarwinTool { - virtual void anchor(); - public: - static const char *getBaseInputName(const ArgList &Args, - const InputInfoList &Input); - static const char *getBaseInputStem(const ArgList &Args, - const InputInfoList &Input); - static const char *getDependencyFileName(const ArgList &Args, - const InputInfoList &Inputs); - - protected: - const char *getCC1Name(types::ID Type) const; - - void AddCC1Args(const ArgList &Args, ArgStringList &CmdArgs) const; - void RemoveCC1UnsupportedArgs(ArgStringList &CmdArgs) const; - void AddCC1OptionsArgs(const ArgList &Args, ArgStringList &CmdArgs, - const InputInfoList &Inputs, - const ArgStringList &OutputArgs) const; - void AddCPPOptionsArgs(const ArgList &Args, ArgStringList &CmdArgs, - const InputInfoList &Inputs, - const ArgStringList &OutputArgs) const; - void AddCPPUniqueOptionsArgs(const ArgList &Args, - ArgStringList &CmdArgs, - const InputInfoList &Inputs) const; - void AddCPPArgs(const ArgList &Args, ArgStringList &CmdArgs) const; - - public: - CC1(const char *Name, const char *ShortName, - const ToolChain &TC) : DarwinTool(Name, ShortName, TC) {} - - virtual bool hasGoodDiagnostics() const { return true; } - virtual bool hasIntegratedCPP() const { return true; } - }; - - class LLVM_LIBRARY_VISIBILITY Preprocess : public CC1 { - public: - Preprocess(const ToolChain &TC) : CC1("darwin::Preprocess", - "gcc preprocessor", TC) {} - - virtual void ConstructJob(Compilation &C, const JobAction &JA, - const InputInfo &Output, - const InputInfoList &Inputs, - const ArgList &TCArgs, - const char *LinkingOutput) const; - }; - - class LLVM_LIBRARY_VISIBILITY Compile : public CC1 { - public: - Compile(const ToolChain &TC) : CC1("darwin::Compile", "gcc frontend", TC) {} - - virtual void ConstructJob(Compilation &C, const JobAction &JA, - const InputInfo &Output, - const InputInfoList &Inputs, - const ArgList &TCArgs, - const char *LinkingOutput) const; - }; - class LLVM_LIBRARY_VISIBILITY Assemble : public DarwinTool { public: Assemble(const ToolChain &TC) : DarwinTool("darwin::Assemble", @@ -327,6 +280,7 @@ namespace darwin { "dsymutil", TC) {} virtual bool hasIntegratedCPP() const { return false; } + virtual bool isDsymutilJob() const { return true; } virtual void ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, @@ -338,15 +292,15 @@ namespace darwin { class LLVM_LIBRARY_VISIBILITY VerifyDebug : public DarwinTool { public: VerifyDebug(const ToolChain &TC) : DarwinTool("darwin::VerifyDebug", - "dwarfdump", TC) {} + "dwarfdump", TC) {} virtual bool hasIntegratedCPP() const { return false; } virtual void ConstructJob(Compilation &C, const JobAction &JA, - const InputInfo &Output, - const InputInfoList &Inputs, - const ArgList &TCArgs, - const char *LinkingOutput) const; + const InputInfo &Output, + const InputInfoList &Inputs, + const ArgList &TCArgs, + const char *LinkingOutput) const; }; } @@ -474,12 +428,11 @@ namespace netbsd { }; } // end namespace netbsd - /// linux -- Directly call GNU Binutils assembler and linker -namespace linuxtools { + /// Directly call GNU Binutils' assembler and linker. +namespace gnutools { class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { public: - Assemble(const ToolChain &TC) : Tool("linux::Assemble", "assembler", - TC) {} + Assemble(const ToolChain &TC) : Tool("GNU::Assemble", "assembler", TC) {} virtual bool hasIntegratedCPP() const { return false; } @@ -491,7 +444,7 @@ namespace linuxtools { }; class LLVM_LIBRARY_VISIBILITY Link : public Tool { public: - Link(const ToolChain &TC) : Tool("linux::Link", "linker", TC) {} + Link(const ToolChain &TC) : Tool("GNU::Link", "linker", TC) {} virtual bool hasIntegratedCPP() const { return false; } virtual bool isLinkJob() const { return true; } |