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

Daniel Dunbar daniel at zuster.org
Thu Mar 19 00:55:14 PDT 2009


Author: ddunbar
Date: Thu Mar 19 02:55:12 2009
New Revision: 67293

URL: http://llvm.org/viewvc/llvm-project?rev=67293&view=rev
Log:
Driver: Claim -arch options when pipelining, and claim arguments that
are forwarded to GCC.
 - The later is unfortunate, as it prevents us from generally warning
   about anything interesting on platforms that use a generic
   toolchain. However, we can't do much better without significantly
   complicating things, and generally we should have proper tool chain
   definitions.

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

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

==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Thu Mar 19 02:55:12 2009
@@ -328,6 +328,7 @@
       // FIXME: We need to handle canonicalization of the specified
       // arch?
 
+      A->claim();
       if (ArchNames.insert(Name))
         Archs.push_back(Name);
     }
@@ -374,7 +375,7 @@
         << types::getTypeName(Act->getType());
 
     ActionList Inputs;
-    for (unsigned i = 0, e = Archs.size(); i != e; ++i )
+    for (unsigned i = 0, e = Archs.size(); i != e; ++i)
       Inputs.push_back(new BindArchAction(Act, Archs[i]));
 
     // Lipo if necessary, We do it this way because we need to set the

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

==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Mar 19 02:55:12 2009
@@ -354,8 +354,13 @@
   for (ArgList::const_iterator 
          it = Args.begin(), ie = Args.end(); it != ie; ++it) {
     Arg *A = *it;
-    if (A->getOption().hasForwardToGCC())
+    if (A->getOption().hasForwardToGCC()) {
+      // It is unfortunate that we have to claim here, as this means
+      // we will basically never report anything interesting for
+      // platforms using a generic gcc.
+      A->claim();
       A->render(Args, CmdArgs);
+    }
   }
   
   RenderExtraToolArgs(CmdArgs);





More information about the cfe-commits mailing list