aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/FrontendAction.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-10-14 19:21:21 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-10-14 19:21:21 +0000
commitac447fce02d119fb70f0aab885d836dea43e7f26 (patch)
tree90b7b75b78a364b78fd066ec5587bed1c2d0dd5b /lib/Frontend/FrontendAction.cpp
parent10be5bad483cfe66bb5eb5ff948c03c4628ce774 (diff)
Delete temporary output files when an error occurs during PCH reading.
This reduces the spam make test leaves behind in /tmp. The assert isn't particularly useful because it's not run with -disable-free (the default when using the clang driver) but should cover all -cc1 tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165910 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/FrontendAction.cpp')
-rw-r--r--lib/Frontend/FrontendAction.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Frontend/FrontendAction.cpp b/lib/Frontend/FrontendAction.cpp
index ca8511247a..c8e41def8e 100644
--- a/lib/Frontend/FrontendAction.cpp
+++ b/lib/Frontend/FrontendAction.cpp
@@ -316,6 +316,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
if (HasBegunSourceFile)
CI.getDiagnosticClient().EndSourceFile();
+ CI.clearOutputFiles(/*EraseFiles=*/true);
setCurrentInput(FrontendInputFile());
setCompilerInstance(0);
return false;