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

Rafael Espíndola rafael.espindola at gmail.com
Thu Feb 13 08:42:59 PST 2014


>> * Remove getBufferForFile. It can just be implemented with
>> getBufferForOpenFile, no?
>
> By remove, do you mean make it non-virtual?  If so, I’m fine with that.  I don’t want to remove it, since the path-based getBuffer functions are commonly used.

Yes, sorry. Just make it non-virtual. It is a useful convenience.

>> btw, getBufferForOpenFile is a case where returning error_code is
>> probably the best we can do right now. ErrorOR<OwningPtr<..> >
>> effectively requires move semantics.
>> * Can status be implemented with openFileForRead + statusOfOpenFile?
>>
>
> Status has to work on directories and other things we cannot open.  You can go the other way and just have path-based APIs, but the FIleManager uses open-file operations because it should be faster to open and then stat on a file descriptor than it is to stat a path and then open that path.  I think we really want to keep both versions.

Ah, OK. I forgot about directories. Yes, lets keep both.

Cheers,
Rafael




More information about the cfe-dev mailing list