[llvm] Avoid calling `GetFileAttributesW` in Windows' `fs::access` when checking for existence (PR #83495)
Alexandre Ganea via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 12 10:15:27 PDT 2024
aganea wrote:
Regardless I think it would still be valuable if we returned `errc::no_such_file_or_directory` on failure, when calling `access` with `AccessMode::Exists`, and not some other Windows error code, ie:
```
if (Attributes == INVALID_FILE_ATTRIBUTES) {
if (Mode == AccessMode::Exists)
return errc::no_such_file_or_directory;
...
```
https://github.com/llvm/llvm-project/pull/83495
More information about the llvm-commits
mailing list