[cfe-dev] examples of using clang's VFS layer
Benjamin Kramer via cfe-dev
cfe-dev at lists.llvm.org
Mon Jul 18 03:06:32 PDT 2016
There are currently very few implementations of the VFS around and
virtually no docs, only some examples in the code base. For your
problem I see a couple of options:
- If you know what files will be used you can load them eagerly into
an InMemoryFileSystem. There are some examples of doing this in Clang.
- If you have a fuse implementation you can use RedirectingFileSystem
(the YAML thing). Eventually I want to decouple this from YAML but
it's not a high priority.
- You can still implement your own VFS. This doesn't tie you to fuse
and allows lazy loading. However it will require code changes when
Clang changes.
Combinations of the approaches are possible by using file system overlays.
On Thu, Jun 30, 2016 at 9:49 PM, Maurizio Vitale via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
> Is there any published paper/tech report/talk about how virtual file systems
> are intended to be used in CLANG?
>
> As far as I understand it, presently there're a number of implementations in
> the code base including one that gets a mapping virtual->physical from a
> json file. Assuming one wanted to take unmodified files from some server
> that caches the version control system, is the intention to point some of
> the mappings to a fuse file system that handle caching/communication w/ the
> VCS?
>
> Or are people writing their own implementation of the abstract file system
> that does whatever they need and merge it with any new clang release they're
> interested in?
>
> Thanks,
>
> Maurizio
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
More information about the cfe-dev
mailing list