]> granicus.if.org Git - clang/commitdiff
Remove the ToolTriple logic in NetBSD, which was completely broken by
authorJoerg Sonnenberger <joerg@bec.de>
Thu, 26 Jan 2012 22:27:52 +0000 (22:27 +0000)
committerJoerg Sonnenberger <joerg@bec.de>
Thu, 26 Jan 2012 22:27:52 +0000 (22:27 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149087 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains.cpp
lib/Driver/Tools.cpp
lib/Driver/Tools.h

index e5ee8899ef7aab61afdf0d80c117ec1dbc262691..5737e17db146f126c129201b318744f7c9a7e73e 100644 (file)
@@ -1710,10 +1710,10 @@ Tool &NetBSD::SelectTool(const Compilation &C, const JobAction &JA,
       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);
index 367edfcd18a879965536d246ad383ee709fbfb92..e01b5f2a109049a99509fa61026ec8a169e06ea9 100644 (file)
@@ -4540,8 +4540,7 @@ void netbsd::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
 
   // 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 @@ void netbsd::Link::ConstructJob(Compilation &C, const JobAction &JA,
 
   // 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");
   }
index b304e9626afa5b08d5f1a0bb4590fd30ea34713b..fac524d26555a37f6ea6b1bf2510fb57ca0557f1 100644 (file)
@@ -396,12 +396,10 @@ namespace freebsd {
   /// 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 @@ namespace netbsd {
                               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; }