]> granicus.if.org Git - clang/commitdiff
Don't track depfiles as result files which need to be cleaned up on failure.
authorMatt Beaumont-Gay <matthewbg@google.com>
Mon, 14 Nov 2011 23:24:52 +0000 (23:24 +0000)
committerMatt Beaumont-Gay <matthewbg@google.com>
Mon, 14 Nov 2011 23:24:52 +0000 (23:24 +0000)
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.

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

lib/Driver/Tools.cpp
test/Driver/crash-cleanup.c

index 9faac7174ac3fe55d1a4411d1d9a7a68bebdd722..6a85fc00b3ac2af6c99ec7b1a869e78364fde6fb 100644 (file)
@@ -225,13 +225,11 @@ void Clang::AddPreprocessingOptions(Compilation &C,
       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);
index 218fcc64c7dac57fc0292abde30df60269e5e693..b994bd85a306a4a0e70b3b7d65c0c3dd201b4595 100644 (file)
@@ -4,6 +4,6 @@
 // REQUIRES: shell
 // REQUIRES: crash-recovery
 
-// XFAIL: darwin
+// XFAIL: *
 
 #pragma clang __debug crash