aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2025-03-12 08:51:00 -0700
committerGitHub <noreply@github.com>2025-03-12 08:51:00 -0700
commitf4d599cda90aa06d1e1a95474a0ee3a4053e77dd (patch)
tree6bc6898192fbc110540f036f1d4b0556bd563b6a /clang/lib/Frontend/CompilerInstance.cpp
parent2620742bf61e8ad5fdc6b245bee31ec341ef46b4 (diff)
downloadllvm-f4d599cda90aa06d1e1a95474a0ee3a4053e77dd.zip
llvm-f4d599cda90aa06d1e1a95474a0ee3a4053e77dd.tar.gz
llvm-f4d599cda90aa06d1e1a95474a0ee3a4053e77dd.tar.bz2
[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.
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp2
1 files changed, 0 insertions, 2 deletions
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);
}