[PATCH] D54455: [vfs] add 'Status::copyWithNewSize'

Ilya Biryukov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 15 04:48:55 PST 2018


ilya-biryukov added a comment.
Herald added a subscriber: jkorous.

In https://reviews.llvm.org/D54455#1297306, @arphaman wrote:

> For this particular use case we would like to create a virtual file system that overrides file contents. So basically we are pretending that the file on disk has a completely different source text, which requires us to update the size in the `stat` to ensure that Clang doesn't think that the file has changed on disk when it will compare the size of the file's memory buffer and the size it has in the `stat` value.


Would be interesting to see why `InMemoryFileSystem` (possibly in a combination with `OverlayFileSystem`) does not work for that case, but nevermind, will take a closer look at the patch on my spare time to understand the use-case better.


Repository:
  rL LLVM

https://reviews.llvm.org/D54455





More information about the llvm-commits mailing list