[cfe-dev] RFC: A virtual file system for clang

Ben Langmuir blangmuir at apple.com
Wed Feb 12 14:04:56 PST 2014


Hi Rafael,

Sorry I missed this earlier,

On Feb 10, 2014, at 4:40 PM, Rafael Avila de Espindola <rafael.espindola at gmail.com> wrote:

> 
>> The idea is to abstract the view of the file system using an AbstractFileSystem class that mimics the llvm::sys::fs interface:
>> 
> 
> My only request is to add functionality as you go. llvm:sys:fs initially had a lot more functionality than what was used by llvm or clang and I am sure there still some left.

Makes sense. It would be really easy to go nuts and add way more than we’ll ever need.

> 
> Please also use the opportunity to modernize the API when possible (using ErrorOr for example).

I think keeping the interface as close to llvm::sys::fs as possible is really helpful for staging this in.  It makes it easier to see the correspondence between the real file system and the virtual one, and it makes updating clients easier.  If the intention is to modernize llvm::sys::fs as well, then I feel that’s orthogonal to what I want to accomplish.  Is the existing interface actually a pain point? It seems pretty easy to use to me.

Ben



More information about the cfe-dev mailing list