[PATCH] D37474: [PCH] Allow VFS to be used for tests that generate PCH files

Cameron via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 6 07:50:38 PDT 2017


cameron314 added a comment.

I'll change the overlay to only allow access to the PCH.

I agree that it would be nice to only read the PCH using real filesystem APIs in order to be symmetrical, but this seems non-trivial. It also feels like a step in the wrong direction -- ideally the VFS would hold the PCH too instead of putting it on disk, in my opinion.

I'm not sure adding a remapped file buffer would work, since it's unclear to me exactly at which point the PCH is written relative to the multiple places it's read. Additionally, there's code that  does directory traversal in the current VFS to find a PCH when given a directory name instead of a file name; this only works if the VFS is aware of the PCH, or if the code is rewritten to use the underlying file system.


https://reviews.llvm.org/D37474





More information about the cfe-commits mailing list