Skip to content

Commit b2bf63b

Browse files
authored
Merge pull request #8848 from z2oh/cherrypick-handle-delete_pending-when-stating-index-unit
[🍒 stable/20230725] Handle new `delete_pending` error code when stating index unit files
2 parents 7f3b1bc + 0c5c644 commit b2bf63b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/Index/IndexUnitWriter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ std::optional<bool> IndexUnitWriter::isUnitUpToDateForOutputFile(
242242

243243
llvm::sys::fs::file_status UnitStat;
244244
if (std::error_code EC = llvm::sys::fs::status(UnitPath.c_str(), UnitStat)) {
245-
if (EC != llvm::errc::no_such_file_or_directory) {
245+
if (EC != llvm::errc::no_such_file_or_directory && EC != llvm::errc::delete_pending) {
246246
llvm::raw_string_ostream Err(Error);
247247
Err << "could not access path '" << UnitPath
248248
<< "': " << EC.message();
@@ -256,7 +256,7 @@ std::optional<bool> IndexUnitWriter::isUnitUpToDateForOutputFile(
256256

257257
llvm::sys::fs::file_status CompareStat;
258258
if (std::error_code EC = llvm::sys::fs::status(*TimeCompareFilePath, CompareStat)) {
259-
if (EC != llvm::errc::no_such_file_or_directory) {
259+
if (EC != llvm::errc::no_such_file_or_directory && EC != llvm::errc::delete_pending) {
260260
llvm::raw_string_ostream Err(Error);
261261
Err << "could not access path '" << *TimeCompareFilePath
262262
<< "': " << EC.message();

0 commit comments

Comments
 (0)