aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2011-11-21 00:01:05 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2011-11-21 00:01:05 +0000
commit5d4d9807a65291cbe6ab88d4a4f74cb7fff01bde (patch)
tree9899d39c189070358c61243b7b7ae3606fe23e7c /lib/Driver/Tools.cpp
parent82c34603263782f9621025cc0674d8b3834cd5e1 (diff)
Teach the driver about failure result files, which are compilation
output files that are valid regardless of whether the compilation succeeded or failed (but not if we crash). Add depfiles to the failure result file list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145018 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r--lib/Driver/Tools.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 906f2ae0db..161001ccdb 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -218,11 +218,13 @@ void Clang::AddPreprocessingOptions(Compilation &C,
DepFile = Output.getFilename();
} else if (Arg *MF = Args.getLastArg(options::OPT_MF)) {
DepFile = MF->getValue(Args);
+ C.addFailureResultFile(DepFile);
} else if (A->getOption().matches(options::OPT_M) ||
A->getOption().matches(options::OPT_MM)) {
DepFile = "-";
} else {
DepFile = darwin::CC1::getDependencyFileName(Args, Inputs);
+ C.addFailureResultFile(DepFile);
}
CmdArgs.push_back("-dependency-file");
CmdArgs.push_back(DepFile);