[llvm] [Support] Report EISDIR when opening a directory (PR #79880)

Hubert Tong via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 12 10:24:13 PST 2024


hubert-reinterpretcast wrote:

> I assume these other platforms should expect non-POSIX-defined behaviour so it shouldn't cause any collateral damage.

To be clear: There are likely other platforms that do allow "file" reading of a directory; however, the expectation of at least some tests in the LLVM monorepo project is that such reading of a directory is not allowed. A change in the Support library interface to provide a more consistent behaviour across platforms helps to avoid maintenance issues with these tests (or proliferation of directory checking code in the wider codebase).

Thus I think the statement should be that the "EISDIR" behaviour should be expected from the Support library because it is in a position to abstract away some of the differences between platforms.


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


More information about the llvm-commits mailing list