From f4d599cda90aa06d1e1a95474a0ee3a4053e77dd Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 12 Mar 2025 08:51:00 -0700 Subject: [Support] Do not remove lock file on failure (#130834) Clients of `LockFileManager` call `unsafeRemoveLockFile()` whenever `tryLock()` fails. However looking at the code, there are no scenarios where this actually does something useful. This PR removes such calls. --- clang/lib/Frontend/CompilerInstance.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'clang/lib/Frontend/CompilerInstance.cpp') diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index e9e9668..44f4f48 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -1491,8 +1491,6 @@ static bool compileModuleAndReadASTBehindLock( // related errors. Diags.Report(ModuleNameLoc, diag::remark_module_lock_failure) << Module->Name << toString(std::move(Err)); - // Clear out any potential leftover. - Lock.unsafeRemoveLockFile(); return compileModuleAndReadASTImpl(ImportingInstance, ImportLoc, ModuleNameLoc, Module, ModuleFileName); } -- cgit v1.1