Files
Sean Perry a68f35b965 [AIX][SystemZ][Support] Check if file is dir on open instead of read (#214815)
See
https://github.ibm.com/compiler/llvm-project/commit/678f19f08296fec299438130cf5943714c590b7e
for the original change.

This original change would run fstat() on the file at every read(). In
the non-error situation that is a lot of redundant checking. Moving the
fstat() check to openNativeFileForRead() will reduce the checks to a
minimum and still produce the same error if someone tries to open a
directory.

(cherry picked from commit 9c7ba7b1d12ed3f395a2317c525a98e5bfcf28e9)
2026-08-11 09:31:22 +02:00
..
…
…

llvm/lib/Support/Unix README
===========================

This directory provides implementations of the lib/System classes that
are common to two or more variants of UNIX. For example, the directory
structure underneath this directory could look like this:

Unix           - only code that is truly generic to all UNIX platforms
  Posix        - code that is specific to Posix variants of UNIX
  SUS          - code that is specific to the Single Unix Specification
  SysV         - code that is specific to System V variants of UNIX

As a rule, only those directories actually needing to be created should be
created. Also, further subdirectories could be created to reflect versions of
the various standards. For example, under SUS there could be v1, v2, and v3
subdirectories to reflect the three major versions of SUS.