Files
clang-p2996/llvm/include/llvm/Support/WindowsError.h
Jeremy Day cb7690af09 [Support] Handle delete_pending case for Windows fs::status (#90655)
If a delete is pending on the file queried for status, a misleading
`permission_denied` error code will be returned (this is the correct
mapping of the error set by GetFileAttributesW). By querying the
underlying NTSTATUS code via ntdll's RtlGetLastNtStatus, this case can
be disambiguated. If this underlying error code indicates a pending
delete, fs::status will return a new `pending_delete` error code to be
handled by callers

Fixes #89137
2024-06-03 10:22:44 -07:00

20 lines
580 B
C++

//===-- WindowsError.h - Support for mapping windows errors to posix-------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_SUPPORT_WINDOWSERROR_H
#define LLVM_SUPPORT_WINDOWSERROR_H
#include <system_error>
namespace llvm {
std::error_code mapLastWindowsError();
std::error_code mapWindowsError(unsigned EV);
}
#endif