summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-10-14 19:50:53 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-10-14 19:50:53 +0000
commit13afbf42d830dd43febbeb0855aa359ca9dbfbf9 (patch)
treef921ae7f24a3ee864ec2f5f611df16db207da6ca /clang/lib/Frontend/CompilerInstance.cpp
parent3c717b459b047987fd43566cb1d38971934b21aa (diff)
downloadbcm5719-llvm-13afbf42d830dd43febbeb0855aa359ca9dbfbf9.tar.gz
bcm5719-llvm-13afbf42d830dd43febbeb0855aa359ca9dbfbf9.zip
Make sure temporary files are deleted when recovering from a crash when compiling modules.
llvm-svn: 165911
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index c50a6514446..a8cafdbfeff 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -837,6 +837,7 @@ static void compileModule(CompilerInstance &ImportingInstance,
// FIXME: Even though we're executing under crash protection, it would still
// be nice to do this with RemoveFileOnSignal when we can. However, that
// doesn't make sense for all clients, so clean this up manually.
+ Instance.clearOutputFiles(/*EraseFiles=*/true);
if (!TempModuleMapFileName.empty())
llvm::sys::Path(TempModuleMapFileName).eraseFromDisk();
}
OpenPOWER on IntegriCloud