diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-09-17 00:24:52 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-09-17 00:24:52 +0000 |
commit | b993f5d93b994b9b0aac6aebae669621744bbed7 (patch) | |
tree | 4b80a97cee4e3757497155dcfbb37ab658c929bf | |
parent | 069ea646616e4ece684e1dec652640f644f0d40a (diff) |
Driver: Add a toolchain hook for whether the system has native LLVM support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114137 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Driver/ToolChain.h | 4 | ||||
-rw-r--r-- | lib/Driver/ToolChain.cpp | 4 | ||||
-rw-r--r-- | lib/Driver/ToolChains.cpp | 4 | ||||
-rw-r--r-- | lib/Driver/ToolChains.h | 2 |
4 files changed, 14 insertions, 0 deletions
diff --git a/include/clang/Driver/ToolChain.h b/include/clang/Driver/ToolChain.h index a9de09c9d5..eed1cd6b3c 100644 --- a/include/clang/Driver/ToolChain.h +++ b/include/clang/Driver/ToolChain.h @@ -98,6 +98,10 @@ public: // Platform defaults information + /// HasNativeLTOLinker - Check whether the linker and related tools have + /// native LLVM support. + virtual bool HasNativeLLVMSupport() const; + /// LookupTypeForExtension - Return the default language type to use for the /// given extension. virtual types::ID LookupTypeForExtension(const char *Ext) const; diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp index 337ea4e8f9..e9a612c4cd 100644 --- a/lib/Driver/ToolChain.cpp +++ b/lib/Driver/ToolChain.cpp @@ -43,6 +43,10 @@ types::ID ToolChain::LookupTypeForExtension(const char *Ext) const { return types::lookupTypeForExtension(Ext); } +bool ToolChain::HasNativeLLVMSupport() const { + return false; +} + /// getARMTargetCPU - Get the (LLVM) name of the ARM cpu we are targetting. // // FIXME: tblgen this. diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 471c47dd2b..f5b45595fd 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -59,6 +59,10 @@ types::ID Darwin::LookupTypeForExtension(const char *Ext) const { return Ty; } +bool Darwin::HasNativeLLVMSupport() const { + return true; +} + // FIXME: Can we tablegen this? static const char *GetArmArchForMArch(llvm::StringRef Value) { if (Value == "armv6k") diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h index d1f15565e6..587bf60de8 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; |