On Wed, Jun 19, 2013 at 10:19 AM, Charles Davis <[email protected]> wrote: > > On Jun 19, 2013, at 9:09 AM, Reid Kleckner wrote: > >> Author: rnk >> Date: Wed Jun 19 10:09:06 2013 >> New Revision: 184308 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=184308&view=rev >> Log: >> [Driver] Don't forward source file input args to gcc >> >> gcc's inputs are already added by the InputInfoList passed to >> Action::ConstructJob. >> >> Fixes a regression from r183989. This was manifesting when targetting >> mingw as an extra input argument to gcc when assembling. It presumably >> affects other situations where clang calls gcc. >> >> Prior to r183989, forwardToGCC() was returning false because the INPUT >> option defined in OptParser.td had the DriverOption flag set on it. >> LLVM's Option library does not set this flag for INPUT. >> >> Reviewers: espindola >> >> Differential Revision: http://llvm-reviews.chandlerc.com/D999 >> >> Modified: >> cfe/trunk/lib/Driver/Tools.cpp >> cfe/trunk/test/Driver/no-integrated-as-win.c >> >> Modified: cfe/trunk/lib/Driver/Tools.cpp >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=184308&r1=184307&r2=184308&view=diff >> ============================================================================== >> --- cfe/trunk/lib/Driver/Tools.cpp (original) >> +++ cfe/trunk/lib/Driver/Tools.cpp Wed Jun 19 10:09:06 2013 >> @@ -225,7 +225,10 @@ static void addProfileRT(const ToolChain >> } >> >> static bool forwardToGCC(const Option &O) { >> - return !O.hasFlag(options::NoForward) && >> + // Don't forward inputs from the original command line. They are added >> from >> + // InputInfoList. >> + return !O.getKind() == Option::InputClass && > Did you mean: > > return O.getKind() != Option::InputClass && > ^ > > ? Am I the only one who noticed this? How are the tests even passing with > this? And why didn't Clang warn on this for you? (Want me to file a bug?)
Richard Trieu recently implemented -Wlogical-not-parentheses (r183688), which I believe would catch this. _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
