]> granicus.if.org Git - clang/commitdiff
Driver: Add a toolchain hook for whether the system has native LLVM support.
authorDaniel Dunbar <daniel@zuster.org>
Fri, 17 Sep 2010 00:24:52 +0000 (00:24 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 17 Sep 2010 00:24:52 +0000 (00:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114137 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/ToolChain.h
lib/Driver/ToolChain.cpp
lib/Driver/ToolChains.cpp
lib/Driver/ToolChains.h

index a9de09c9d5e0608b26a1d617cabb6122fde1f595..eed1cd6b3c76157222598918242619f069f8e1d0 100644 (file)
@@ -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;
index 337ea4e8f94b1666fdf7c02f8e1a54b41ba9e02a..e9a612c4cd70f2eb85a00e7f20e7f9ea9440ab8b 100644 (file)
@@ -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.
index 471c47dd2b50a84e9f0c971e47a5b00248262b40..f5b45595fda43ab051ceef798c6373a93d775e63 100644 (file)
@@ -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")
index d1f15565e6c608d2858f0e34d7d4e0afbfb1e305..587bf60de8f5a69ed317654abe3e7a46f51322bd 100644 (file)
@@ -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;