[llvm] [Support] Handle delete_pending case for Windows fs::status (PR #90655)

Jeremy Day via llvm-commits llvm-commits at lists.llvm.org
Thu May 9 12:44:14 PDT 2024


================
@@ -786,8 +796,28 @@ std::error_code status(const Twine &path, file_status &result, bool Follow) {
   DWORD Flags = FILE_FLAG_BACKUP_SEMANTICS;
   if (!Follow) {
     DWORD attr = ::GetFileAttributesW(path_utf16.begin());
----------------
z2oh wrote:

I've moved the check into `llvm::mapWindowsError()`, I agree it's a cleaner fit there! Thank you for the suggestion.

With this, I've moved the declaration for `RtlGetLastNtStatus` to the `_WIN32` section of `ErrorHandling.cpp`, which required the windows header to be included there.

https://github.com/llvm/llvm-project/pull/90655


More information about the llvm-commits mailing list