[cfe-commits] r144590 - in /cfe/trunk: lib/Driver/Tools.cpp test/Driver/crash-cleanup.c

Eli Friedman eli.friedman at gmail.com
Mon Nov 14 15:50:18 PST 2011


On Mon, Nov 14, 2011 at 3:24 PM, Matt Beaumont-Gay <matthewbg at google.com> wrote:
> Author: matthewbg
> Date: Mon Nov 14 17:24:52 2011
> New Revision: 144590
>
> URL: http://llvm.org/viewvc/llvm-project?rev=144590&view=rev
> Log:
> Don't track depfiles as result files which need to be cleaned up on failure.
>
> This is a partial revert of r143846. While cleaning up after a crash is
> probably a good idea, we were also deleting .d files if the compilation failed
> due to invalid input, which is not the desired behavior. The test is XFAIL'd
> until the cleanup code can be reworked to do the right thing.

We can't, in general, compute the dependencies for an invalid C file:
since it isn't valid, we can't be sure what files it is supposed to be
referencing.  I mean, we could prefer to generate an empty .d file in
the general case, to satisfy quirky build systems...

-Eli

> Modified:
>    cfe/trunk/lib/Driver/Tools.cpp
>    cfe/trunk/test/Driver/crash-cleanup.c
>
> Modified: cfe/trunk/lib/Driver/Tools.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=144590&r1=144589&r2=144590&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Driver/Tools.cpp (original)
> +++ cfe/trunk/lib/Driver/Tools.cpp Mon Nov 14 17:24:52 2011
> @@ -225,13 +225,11 @@
>       DepFile = Output.getFilename();
>     } else if (Arg *MF = Args.getLastArg(options::OPT_MF)) {
>       DepFile = MF->getValue(Args);
> -      C.addResultFile(DepFile);
>     } else if (A->getOption().matches(options::OPT_M) ||
>                A->getOption().matches(options::OPT_MM)) {
>       DepFile = "-";
>     } else {
>       DepFile = darwin::CC1::getDependencyFileName(Args, Inputs);
> -      C.addResultFile(DepFile);
>     }
>     CmdArgs.push_back("-dependency-file");
>     CmdArgs.push_back(DepFile);
>
> Modified: cfe/trunk/test/Driver/crash-cleanup.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/crash-cleanup.c?rev=144590&r1=144589&r2=144590&view=diff
> ==============================================================================
> --- cfe/trunk/test/Driver/crash-cleanup.c (original)
> +++ cfe/trunk/test/Driver/crash-cleanup.c Mon Nov 14 17:24:52 2011
> @@ -4,6 +4,6 @@
>  // REQUIRES: shell
>  // REQUIRES: crash-recovery
>
> -// XFAIL: darwin
> +// XFAIL: *
>
>  #pragma clang __debug crash
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>




More information about the cfe-commits mailing list