[cfe-dev] RFC: A virtual file system for clang
Rafael EspĂndola
rafael.espindola at gmail.com
Thu Feb 13 04:53:56 PST 2014
> Current plan is to expose functions to get the VFS description file,
> which Clang can parse and build the VFS accordingly.
>
> Nevertheless, I think we can provide both interfaces, if we freeze the
> 'Status' data structure in libclang, or if we declare that those
> functions are exempt from libclang ABI stability. But in that case
> one can probably just use the C++ API directly, so I don't see the
> function-based interface as important.
OK, that is a relief :-)
I was truly afraid we would end up putting part of the current file
API on stone because of the libclang abi stability.
I took a quick look at the API last night. An observation is that 99%
of the users want the simplest version of any api (exists returning
false on error, create_directory that hides if the directory already
existed or not, etc). Unfortunately, quiet a few end up using the more
complex apis.
So what I would suggest for the virtual fs is to start with only the
simple ones. If you do have a use that needs the more general case,
adding that predicate with a longer name is probably a good thing so
that it doesn't get used accidentally.
Is that OK?
Cheers,
Rafael
More information about the cfe-dev
mailing list