[cfe-commits] r149087 - in /cfe/trunk/lib/Driver: ToolChains.cpp Tools.cpp Tools.h

Joerg Sonnenberger joerg at bec.de
Thu Jan 26 14:27:52 PST 2012


Author: joerg
Date: Thu Jan 26 16:27:52 2012
New Revision: 149087

URL: http://llvm.org/viewvc/llvm-project?rev=149087&view=rev
Log:
Remove the ToolTriple logic in NetBSD, which was completely broken by
the recent refactoring. All interesting NetBSD release have a GNU as
version on i386 that supports --32, so don't bother with the conditional
setting of it.

Modified:
    cfe/trunk/lib/Driver/ToolChains.cpp
    cfe/trunk/lib/Driver/Tools.cpp
    cfe/trunk/lib/Driver/Tools.h

Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=149087&r1=149086&r2=149087&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Thu Jan 26 16:27:52 2012
@@ -1710,10 +1710,10 @@
       if (UseIntegratedAs)
         T = new tools::ClangAs(*this);
       else
-        T = new tools::netbsd::Assemble(*this, getTriple());
+        T = new tools::netbsd::Assemble(*this);
       break;
     case Action::LinkJobClass:
-      T = new tools::netbsd::Link(*this, getTriple());
+      T = new tools::netbsd::Link(*this);
       break;
     default:
       T = &Generic_GCC::SelectTool(C, JA, Inputs);

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=149087&r1=149086&r2=149087&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Jan 26 16:27:52 2012
@@ -4540,8 +4540,7 @@
 
   // When building 32-bit code on NetBSD/amd64, we have to explicitly
   // instruct as in the base system to assemble 32-bit code.
-  if (ToolTriple.getArch() == llvm::Triple::x86_64 &&
-      getToolChain().getArch() == llvm::Triple::x86)
+  if (getToolChain().getArch() == llvm::Triple::x86)
     CmdArgs.push_back("--32");
 
 
@@ -4594,8 +4593,7 @@
 
   // When building 32-bit code on NetBSD/amd64, we have to explicitly
   // instruct ld in the base system to link 32-bit code.
-  if (ToolTriple.getArch() == llvm::Triple::x86_64 &&
-      getToolChain().getArch() == llvm::Triple::x86) {
+  if (getToolChain().getArch() == llvm::Triple::x86) {
     CmdArgs.push_back("-m");
     CmdArgs.push_back("elf_i386");
   }

Modified: cfe/trunk/lib/Driver/Tools.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.h?rev=149087&r1=149086&r2=149087&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.h (original)
+++ cfe/trunk/lib/Driver/Tools.h Thu Jan 26 16:27:52 2012
@@ -396,12 +396,10 @@
   /// netbsd -- Directly call GNU Binutils assembler and linker
 namespace netbsd {
   class LLVM_LIBRARY_VISIBILITY Assemble : public Tool  {
-  private:
-    const llvm::Triple ToolTriple;
 
   public:
-    Assemble(const ToolChain &TC, const llvm::Triple &ToolTriple)
-      : Tool("netbsd::Assemble", "assembler", TC), ToolTriple(ToolTriple) {}
+    Assemble(const ToolChain &TC)
+      : Tool("netbsd::Assemble", "assembler", TC) {}
 
     virtual bool hasIntegratedCPP() const { return false; }
 
@@ -412,12 +410,10 @@
                               const char *LinkingOutput) const;
   };
   class LLVM_LIBRARY_VISIBILITY Link : public Tool  {
-  private:
-    const llvm::Triple ToolTriple;
 
   public:
-    Link(const ToolChain &TC, const llvm::Triple &ToolTriple)
-      : Tool("netbsd::Link", "linker", TC), ToolTriple(ToolTriple) {}
+    Link(const ToolChain &TC)
+      : Tool("netbsd::Link", "linker", TC) {}
 
     virtual bool hasIntegratedCPP() const { return false; }
 





More information about the cfe-commits mailing list