[Lldb-commits] [PATCH] D54135: Add convenience method in FileSystem to check if a path/filespec is a directory.
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 6 08:34:55 PST 2018
JDevlieghere added a comment.
In https://reviews.llvm.org/D54135#1288254, @krytarowski wrote:
> Why? We already put a lot of effort into reusing code from LLVM.
This is still using code from LLVM, the `FileSystem` class is just an abstraction in between:
1. It uses LLVM's virtual file system. The VFS is stateful and the FileSystem class maintains this state. If you don't specify a virtual file system it uses the "real" file system (the default).
2. It has convenience methods for FileSpecs, so that you don't have to convert them at every call site. These functions used to be methods in the FileSpec class, something we wanted to get rid of for a while because conceptually the latter is just a "smart path".
I started doing all this work to support reproducers in LLDB. We'll need a bunch of files that won't live at their original location and the VFS makes it possible to deal with that transparently.
More information about the lldb-commits