diff options
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Driver/Tools.h')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Driver/Tools.h | 68 |
1 files changed, 62 insertions, 6 deletions
diff --git a/contrib/llvm/tools/clang/lib/Driver/Tools.h b/contrib/llvm/tools/clang/lib/Driver/Tools.h index 5aea825..133a389 100644 --- a/contrib/llvm/tools/clang/lib/Driver/Tools.h +++ b/contrib/llvm/tools/clang/lib/Driver/Tools.h @@ -10,6 +10,7 @@ #ifndef LLVM_CLANG_LIB_DRIVER_TOOLS_H #define LLVM_CLANG_LIB_DRIVER_TOOLS_H +#include "clang/Basic/VersionTuple.h" #include "clang/Driver/Tool.h" #include "clang/Driver/Types.h" #include "clang/Driver/Util.h" @@ -40,7 +41,7 @@ using llvm::opt::ArgStringList; class LLVM_LIBRARY_VISIBILITY Clang : public Tool { public: static const char *getBaseInputName(const llvm::opt::ArgList &Args, - const InputInfoList &Inputs); + const InputInfo &Input); static const char *getBaseInputStem(const llvm::opt::ArgList &Args, const InputInfoList &Inputs); static const char *getDependencyFileName(const llvm::opt::ArgList &Args, @@ -109,7 +110,8 @@ using llvm::opt::ArgStringList; ClangAs(const ToolChain &TC) : Tool("clang::as", "clang integrated assembler", TC, RF_Full) {} - + void AddMIPSTargetArgs(const llvm::opt::ArgList &Args, + llvm::opt::ArgStringList &CmdArgs) const; bool hasGoodDiagnostics() const override { return true; } bool hasIntegratedAssembler() const override { return false; } bool hasIntegratedCPP() const override { return false; } @@ -223,16 +225,23 @@ namespace hexagon { } // end namespace hexagon. namespace arm { - StringRef getARMTargetCPU(const llvm::opt::ArgList &Args, - const llvm::Triple &Triple); + std::string getARMTargetCPU(const llvm::opt::ArgList &Args, + const llvm::Triple &Triple); + const StringRef getARMArch(const llvm::opt::ArgList &Args, + const llvm::Triple &Triple); const char* getARMCPUForMArch(const llvm::opt::ArgList &Args, const llvm::Triple &Triple); - const char* getLLVMArchSuffixForARM(StringRef CPU); + const char* getLLVMArchSuffixForARM(StringRef CPU, StringRef Arch); void appendEBLinkFlags(const llvm::opt::ArgList &Args, ArgStringList &CmdArgs, const llvm::Triple &Triple); } namespace mips { + typedef enum { + NanLegacy = 1, + Nan2008 = 2 + } NanEncoding; + NanEncoding getSupportedNanEncoding(StringRef &CPU); void getMipsCPUAndABI(const llvm::opt::ArgList &Args, const llvm::Triple &Triple, StringRef &CPUName, StringRef &ABIName); @@ -247,6 +256,22 @@ namespace ppc { bool hasPPCAbiArg(const llvm::opt::ArgList &Args, const char *Value); } + /// cloudabi -- Directly call GNU Binutils linker +namespace cloudabi { +class LLVM_LIBRARY_VISIBILITY Link : public GnuTool { +public: + Link(const ToolChain &TC) : GnuTool("cloudabi::Link", "linker", TC) {} + + bool hasIntegratedCPP() const override { return false; } + bool isLinkJob() const override { return true; } + + void ConstructJob(Compilation &C, const JobAction &JA, + const InputInfo &Output, const InputInfoList &Inputs, + const llvm::opt::ArgList &TCArgs, + const char *LinkingOutput) const override; +}; +} // end namespace cloudabi + namespace darwin { llvm::Triple::ArchType getArchTypeForMachOArchName(StringRef Str); void setTripleTypeForMachOArchName(llvm::Triple &T, StringRef Str); @@ -490,6 +515,33 @@ namespace gnutools { const char *LinkingOutput) const override; }; } + +namespace nacltools { + class LLVM_LIBRARY_VISIBILITY AssembleARM : public gnutools::Assemble { + public: + AssembleARM(const ToolChain &TC) : gnutools::Assemble(TC) {} + + void ConstructJob(Compilation &C, const JobAction &JA, + const InputInfo &Output, + const InputInfoList &Inputs, + const llvm::opt::ArgList &TCArgs, + const char *LinkingOutput) const override; + }; + class LLVM_LIBRARY_VISIBILITY Link : public Tool { + public: + Link(const ToolChain &TC) : Tool("NaCl::Link", "linker", TC) {} + + bool hasIntegratedCPP() const override { return false; } + bool isLinkJob() const override { return true; } + + void ConstructJob(Compilation &C, const JobAction &JA, + const InputInfo &Output, + const InputInfoList &Inputs, + const llvm::opt::ArgList &TCArgs, + const char *LinkingOutput) const override; + }; +} + /// minix -- Directly call GNU Binutils assembler and linker namespace minix { class LLVM_LIBRARY_VISIBILITY Assemble : public GnuTool { @@ -579,6 +631,10 @@ namespace dragonfly { /// Visual studio tools. namespace visualstudio { + VersionTuple getMSVCVersion(const Driver *D, const llvm::Triple &Triple, + const llvm::opt::ArgList &Args, + bool IsWindowsMSVC); + class LLVM_LIBRARY_VISIBILITY Link : public Tool { public: Link(const ToolChain &TC) : Tool("visualstudio::Link", "linker", TC, @@ -675,7 +731,7 @@ public: }; } -} // end namespace toolchains +} // end namespace tools } // end namespace driver } // end namespace clang |