Make sure temporary files are deleted when recovering from a crash when compiling modules.

llvm-svn: 165911
This commit is contained in:
Benjamin Kramer 2012-10-14 19:50:53 +00:00
parent 3c717b459b
commit 13afbf42d8
1 changed files with 1 additions and 0 deletions

View File

@ -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();
}