From 13afbf42d830dd43febbeb0855aa359ca9dbfbf9 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sun, 14 Oct 2012 19:50:53 +0000 Subject: [PATCH] Make sure temporary files are deleted when recovering from a crash when compiling modules. llvm-svn: 165911 --- clang/lib/Frontend/CompilerInstance.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index c50a65144467..a8cafdbfeff8 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(); }