[PATCH] D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 3 03:48:37 PST 2018


ilya-biryukov added a comment.

In D54995#1316437 <https://reviews.llvm.org/D54995#1316437>, @yvvan wrote:

> Ok, no global option.
>  Why not placing your VolatileFSProvider in clang so that libclang could you it too?


Would be happy to, will need to figure out what to do with PCH and PCM files first. However if we do this on clang level, I believe we should remove the `isVolatile` flag from the VFS interfaces in the first place.
It would be nice to not loose out on the opportunity to avoid fully loading the PCH files, but that obviously requires passing some flags into the VFS implementation or various hacks (matching on filenames/extensions?) to find out which files are PCHs. 
I actually don't know which approach to choose: on one hand, I'd really want to get rid of the isVolatile flag, on the other hand I'd really want to avoid loading large binary files into memory and that requires passing the flags.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54995/new/

https://reviews.llvm.org/D54995





More information about the cfe-commits mailing list