mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-17 04:06:08 +00:00

This is available on most platforms (Linux/Mac/Win/BSD) with no extra syscalls. On other platforms (e.g. Solaris) we stat() if this information is requested. This will allow switching clang's VFS to efficiently expose (path, type) when traversing a directory. Currently it exposes an entire Status, but does so by calling fs::status() on all platforms. Almost all callers only need the path, and all callers only need (path, type). Patch by sammccall (Sam McCall) Differential Revision: https://reviews.llvm.org/D51918 llvm-svn: 342089
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.