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

Daniel Dunbar daniel at zuster.org
Thu Jan 21 18:04:52 PST 2010


Author: ddunbar
Date: Thu Jan 21 20:04:52 2010
New Revision: 94138

URL: http://llvm.org/viewvc/llvm-project?rev=94138&view=rev
Log:
Driver/Darwin/ld: Eliminate AddDarwinSubArch, our linker invocation is going to
diverge from gcc anyway.

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

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=94138&r1=94137&r2=94138&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Jan 21 20:04:52 2010
@@ -1925,13 +1925,6 @@
   }
 }
 
-void darwin::DarwinTool::AddDarwinSubArch(const ArgList &Args,
-                                          ArgStringList &CmdArgs) const {
-  // Derived from darwin_subarch spec, not sure what the distinction
-  // exists for but at least for this chain it is the same.
-  AddDarwinArch(Args, CmdArgs);
-}
-
 void darwin::Link::AddLinkArgs(const ArgList &Args,
                                ArgStringList &CmdArgs) const {
   const Driver &D = getToolChain().getDriver();
@@ -1946,11 +1939,10 @@
   }
 
   if (!Args.hasArg(options::OPT_dynamiclib)) {
-    if (Args.hasArg(options::OPT_force__cpusubtype__ALL)) {
-      AddDarwinArch(Args, CmdArgs);
-      CmdArgs.push_back("-force_cpusubtype_ALL");
-    } else
-      AddDarwinSubArch(Args, CmdArgs);
+    AddDarwinArch(Args, CmdArgs);
+
+    // FIXME: Why do this only on this path?
+    CmdArgs.push_back("-force_cpusubtype_ALL");
 
     Args.AddLastArg(CmdArgs, options::OPT_bundle);
     Args.AddAllArgs(CmdArgs, options::OPT_bundle__loader);
@@ -1984,11 +1976,7 @@
     Args.AddAllArgsTranslated(CmdArgs, options::OPT_current__version,
                               "-dylib_current_version");
 
-    if (Args.hasArg(options::OPT_force__cpusubtype__ALL)) {
-      AddDarwinArch(Args, CmdArgs);
-      // NOTE: We don't add -force_cpusubtype_ALL on this path. Ok.
-    } else
-      AddDarwinSubArch(Args, CmdArgs);
+    AddDarwinArch(Args, CmdArgs);
 
     Args.AddAllArgsTranslated(CmdArgs, options::OPT_install__name,
                               "-dylib_install_name");

Modified: cfe/trunk/lib/Driver/Tools.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.h?rev=94138&r1=94137&r2=94138&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/Tools.h (original)
+++ cfe/trunk/lib/Driver/Tools.h Thu Jan 21 20:04:52 2010
@@ -130,7 +130,6 @@
   class VISIBILITY_HIDDEN DarwinTool : public Tool {
   protected:
     void AddDarwinArch(const ArgList &Args, ArgStringList &CmdArgs) const;
-    void AddDarwinSubArch(const ArgList &Args, ArgStringList &CmdArgs) const;
 
     const toolchains::Darwin &getDarwinToolChain() const {
       return reinterpret_cast<const toolchains::Darwin&>(getToolChain());





More information about the cfe-commits mailing list