[PATCH] D94844: [VFS] Add support to RedirectingFileSystem for mapping a virtual directory to one in the external FS.

Nathan Hawes via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 27 02:45:05 PST 2021


nathawes updated this revision to Diff 319505.
nathawes added a comment.

- Updated the yaml for the new kind of virtual directory (that maps to a directory in the external filesystem) to have a distinct value for its 'type' field ('directory-remap') to better distinguish it from the existing 'directory' type that behaves quite differently.
- Updated lookupPath to return a structure giving both the matched Entry and the ExternalRedirect path, rather than returning the matched Entry and setting the ExternalRedirect path via an out parameter. This makes it clearer where the ExternalRedirect path is computed vs used.
- Updated RedirectingFileSystem::dir_begin to respect the 'use-external-names' setting for DirectoryRemapEntry.
- Added unit tests covering directory iteration (dir_begin) with DirectoryRemapEntry support.
- Expanded on the documentation comments for RedirectingFileSystem to hopefully make the difference between 'directory' and 'directory-remap' entries clearer.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94844/new/

https://reviews.llvm.org/D94844

Files:
  clang/test/VFS/Inputs/vfsoverlay-directory-relative.yaml
  clang/test/VFS/Inputs/vfsoverlay-directory.yaml
  clang/test/VFS/directory.c
  lldb/source/Host/common/FileSystem.cpp
  llvm/include/llvm/Support/VirtualFileSystem.h
  llvm/lib/Support/VirtualFileSystem.cpp
  llvm/unittests/Support/VirtualFileSystemTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94844.319505.patch
Type: text/x-patch
Size: 43832 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210127/fe01f6c0/attachment-0001.bin>


More information about the cfe-commits mailing list