From 39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 20 Feb 2011 13:06:31 +0000 Subject: Vendor import of clang trunk r126079: http://llvm.org/svn/llvm-project/cfe/trunk@126079 --- lib/Driver/ToolChains.h | 52 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 48 insertions(+), 4 deletions(-) (limited to 'lib/Driver/ToolChains.h') diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h index d1f1556..0e3645c 100644 --- a/lib/Driver/ToolChains.h +++ b/lib/Driver/ToolChains.h @@ -155,6 +155,8 @@ public: virtual types::ID LookupTypeForExtension(const char *Ext) const; + virtual bool HasNativeLLVMSupport() const; + virtual DerivedArgList *TranslateArgs(const DerivedArgList &Args, const char *BoundArch) const; @@ -174,6 +176,18 @@ public: getTriple().getArch() == llvm::Triple::x86_64); #endif } + virtual bool IsStrictAliasingDefault() const { +#ifdef DISABLE_DEFAULT_STRICT_ALIASING + return false; +#else + return ToolChain::IsStrictAliasingDefault(); +#endif + } + + virtual bool IsObjCDefaultSynthPropertiesDefault() const { + return false; + } + virtual bool IsObjCNonFragileABIDefault() const { // Non-fragile ABI is default for everything but i386. return getTriple().getArch() != llvm::Triple::x86; @@ -221,6 +235,12 @@ public: virtual void AddLinkRuntimeLibArgs(const ArgList &Args, ArgStringList &CmdArgs) const; + virtual void AddCXXStdlibLibArgs(const ArgList &Args, + ArgStringList &CmdArgs) const; + + virtual void AddCCKextLibArgs(const ArgList &Args, + ArgStringList &CmdArgs) const; + /// } }; @@ -258,6 +278,18 @@ public: virtual const char *GetDefaultRelocationModel() const { return "pic"; } }; +class LLVM_LIBRARY_VISIBILITY Generic_ELF : public Generic_GCC { + public: + Generic_ELF(const HostInfo &Host, const llvm::Triple& Triple) + : Generic_GCC(Host, Triple) {} + + virtual bool IsIntegratedAssemblerDefault() const { + // Default integrated assembler to on for x86. + return (getTriple().getArch() == llvm::Triple::x86 || + getTriple().getArch() == llvm::Triple::x86_64); + } +}; + class LLVM_LIBRARY_VISIBILITY AuroraUX : public Generic_GCC { public: AuroraUX(const HostInfo &Host, const llvm::Triple& Triple); @@ -265,20 +297,27 @@ public: virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; }; -class LLVM_LIBRARY_VISIBILITY OpenBSD : public Generic_GCC { +class LLVM_LIBRARY_VISIBILITY OpenBSD : public Generic_ELF { public: OpenBSD(const HostInfo &Host, const llvm::Triple& Triple); virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; }; -class LLVM_LIBRARY_VISIBILITY FreeBSD : public Generic_GCC { +class LLVM_LIBRARY_VISIBILITY FreeBSD : public Generic_ELF { public: FreeBSD(const HostInfo &Host, const llvm::Triple& Triple); virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; }; +class LLVM_LIBRARY_VISIBILITY NetBSD : public Generic_ELF { +public: + NetBSD(const HostInfo &Host, const llvm::Triple& Triple); + + virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; +}; + class LLVM_LIBRARY_VISIBILITY Minix : public Generic_GCC { public: Minix(const HostInfo &Host, const llvm::Triple& Triple); @@ -286,18 +325,23 @@ public: virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; }; -class LLVM_LIBRARY_VISIBILITY DragonFly : public Generic_GCC { +class LLVM_LIBRARY_VISIBILITY DragonFly : public Generic_ELF { public: DragonFly(const HostInfo &Host, const llvm::Triple& Triple); virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; }; -class LLVM_LIBRARY_VISIBILITY Linux : public Generic_GCC { +class LLVM_LIBRARY_VISIBILITY Linux : public Generic_ELF { public: Linux(const HostInfo &Host, const llvm::Triple& Triple); + virtual bool HasNativeLLVMSupport() const; + virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; + + std::string Linker; + std::vector ExtraOpts; }; -- cgit v1.1