[llvm] [Support][FileSystem] Prefer `status` with `file_t` parameter. NFC. (PR #157581)
Steven Wu via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 8 18:50:23 PDT 2025
cachemeifyoucan wrote:
> Preferring the handle version of the API is reasonable, but if this is purely for documentation purposes, I think that we should change the guard instead of changing which variant is under the guard. `#if defined(_WIN32) || defined(DOXYGEN)` should allow indexing. The original version is clearer in intention: the FD version is "universal" since everything on Unix has a file descriptor. Windows almost always would prefer the file handle variant, and so with this change, the code is more confusing, why does windows only have the file descriptor version?
It is actually only windows has the explicit file descriptor version. Everywhere else is file handle version because it is just the same type (I hope that won't introduce ambiguity in the code).
https://github.com/llvm/llvm-project/pull/157581
More information about the llvm-commits
mailing list