Skip to content

Commit 513eac5

Browse files
authored
Merge pull request #8838 from z2oh/z2oh/handle-delete_pending-when-stating-index-unit
Handle new `delete_pending` error code when stating index unit files
2 parents 587aa5d + dd2cc94 commit 513eac5

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
@@ -245,7 +245,7 @@ std::optional<bool> IndexUnitWriter::isUnitUpToDateForOutputFile(
245245

246246
llvm::sys::fs::file_status UnitStat;
247247
if (std::error_code EC = llvm::sys::fs::status(UnitPath.c_str(), UnitStat)) {
248-
if (EC != llvm::errc::no_such_file_or_directory) {
248+
if (EC != llvm::errc::no_such_file_or_directory && EC != llvm::errc::delete_pending) {
249249
llvm::raw_string_ostream Err(Error);
250250
Err << "could not access path '" << UnitPath
251251
<< "': " << EC.message();
@@ -259,7 +259,7 @@ std::optional<bool> IndexUnitWriter::isUnitUpToDateForOutputFile(
259259

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

0 commit comments

Comments
 (0)