[cfe-commits] r114137 - in /cfe/trunk: include/clang/Driver/ToolChain.h lib/Driver/ToolChain.cpp lib/Driver/ToolChains.cpp lib/Driver/ToolChains.h

Daniel Dunbar daniel at zuster.org
Thu Sep 16 17:24:52 PDT 2010


Author: ddunbar
Date: Thu Sep 16 19:24:52 2010
New Revision: 114137

URL: http://llvm.org/viewvc/llvm-project?rev=114137&view=rev
Log:
Driver: Add a toolchain hook for whether the system has native LLVM support.

Modified:
    cfe/trunk/include/clang/Driver/ToolChain.h
    cfe/trunk/lib/Driver/ToolChain.cpp
    cfe/trunk/lib/Driver/ToolChains.cpp
    cfe/trunk/lib/Driver/ToolChains.h

Modified: cfe/trunk/include/clang/Driver/ToolChain.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/ToolChain.h?rev=114137&r1=114136&r2=114137&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/ToolChain.h (original)
+++ cfe/trunk/include/clang/Driver/ToolChain.h Thu Sep 16 19:24:52 2010
@@ -98,6 +98,10 @@
 
   // 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;

Modified: cfe/trunk/lib/Driver/ToolChain.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChain.cpp?rev=114137&r1=114136&r2=114137&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChain.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChain.cpp Thu Sep 16 19:24:52 2010
@@ -43,6 +43,10 @@
   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.

Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=114137&r1=114136&r2=114137&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Thu Sep 16 19:24:52 2010
@@ -59,6 +59,10 @@
   return Ty;
 }
 
+bool Darwin::HasNativeLLVMSupport() const {
+  return true;
+}
+
 // FIXME: Can we tablegen this?
 static const char *GetArmArchForMArch(llvm::StringRef Value) {
   if (Value == "armv6k")

Modified: cfe/trunk/lib/Driver/ToolChains.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.h?rev=114137&r1=114136&r2=114137&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.h (original)
+++ cfe/trunk/lib/Driver/ToolChains.h Thu Sep 16 19:24:52 2010
@@ -155,6 +155,8 @@
 
   virtual types::ID LookupTypeForExtension(const char *Ext) const;
 
+  virtual bool HasNativeLLVMSupport() const;
+
   virtual DerivedArgList *TranslateArgs(const DerivedArgList &Args,
                                         const char *BoundArch) const;
 





More information about the cfe-commits mailing list