[PATCH] D54277: Extend VFS with function to get external path.

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 14 12:40:10 PST 2018


JDevlieghere updated this revision to Diff 174083.
JDevlieghere added a comment.
Herald added a subscriber: hiraditya.

I've added an interface `ExternalFileSystem` (I'm open to a better name)  which has a slightly different meaning than before as will become clear later.

There's currently two implementations of this interface:

- The real filesystem.
- The redirecting filesystem.

The implementation for both is trivial. For the real file system it's a no-op. For the redirecting file system it does the translation. It's different from the previous patch in that it follows only one level of indirection. If a RedirectingFileSystem is backed by an in-memory file system it still works, you just get the translated path.

I strongly believe the interface is better than exposing the RedirectingFileSystem because it (1) hides more abstraction and (2) allows me to transparently switch between the two in LLDB.


https://reviews.llvm.org/D54277

Files:
  llvm/include/llvm/Support/VirtualFileSystem.h
  llvm/lib/Support/VirtualFileSystem.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54277.174083.patch
Type: text/x-patch
Size: 4701 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181114/ac95378c/attachment.bin>


More information about the llvm-commits mailing list