[PATCH] D51918: [Support] sys::fs::directory_entry includes the file_type.
Sam McCall via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 11 02:47:26 PDT 2018
sammccall created this revision.
sammccall added a reviewer: bkramer.
Herald added subscribers: llvm-commits, fedor.sergeev.
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).
Repository:
rL LLVM
https://reviews.llvm.org/D51918
Files:
include/llvm/Support/FileSystem.h
lib/Support/Path.cpp
lib/Support/Unix/Path.inc
lib/Support/Windows/Path.inc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51918.164828.patch
Type: text/x-patch
Size: 7499 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180911/83e68f26/attachment.bin>
More information about the llvm-commits
mailing list