Skip to content

Commit 3253b17

Browse files
committed
[Support] Do not remove lock file on failure (llvm#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. (cherry picked from commit f4d599c)
1 parent 325cd27 commit 3253b17

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

clang/lib/Frontend/CompilerInstance.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1642,8 +1642,6 @@ static bool compileModuleAndReadASTBehindLock(
16421642
// related errors.
16431643
Diags.Report(ModuleNameLoc, diag::remark_module_lock_failure)
16441644
<< Module->Name << toString(std::move(Err));
1645-
// Clear out any potential leftover.
1646-
Lock.unsafeRemoveLockFile();
16471645
return compileModuleAndReadASTImpl(ImportingInstance, ImportLoc,
16481646
ModuleNameLoc, Module, ModuleFileName);
16491647
}

0 commit comments

Comments
 (0)