[Lldb-commits] [PATCH] D53532: [FileSpec] Add VFS support to FileSpec convenience methods.

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 25 11:33:21 PDT 2018

JDevlieghere added a comment.

While I don't disagree with the proposed approach, it needs to be highlighted that extracting all file system operations would be very intrusive.

- Almost all logic in FileSpec deals with the filesystem. You can't even resolve a path without it. How do you imagine this would work?
- This will significantly increase the verbosity of working with FileSpec. Depending on the solution to the previous bullet point, you might have to do something like `FileSpec spec(path);FS.Resolve(spec);FS.Exists(spec)`.

Additionally, if we make the FileSystem a member of the debugger, we'd have to pass it everywhere we pass a FileSpec. I'm not convinced that's something we want. We could put the FileSpec and the FileSystem in a wrapper object but then we're essentially where we are today. Furthermore, for the reproducers, we need the FileSystem to live above the debugger because of the shared module cache. I can't really imagine a scenario where we'd need two debuggers with a different VFS.


More information about the lldb-commits mailing list