<div dir="ltr"><div class="gmail_quote">On Thu, May 28, 2015 at 12:12 PM Maciej Poleski <<a href="mailto:poleski.maciej@gmail.com">poleski.maciej@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dnia czwartek, 28 maja 2015 09:32:04 piszesz:<br>
> ><br>
> > The general problem is that I have some file system abstraction in IDE<br>
> > (KDevelop - DocumentController) and want to provide custom VFS on top of<br>
> > this abstraction for Tooling (possibly ClangTool). This would make file<br>
> > accesses from Clang be consistent with IDE accesses.<br>
> ><br>
><br>
> And you're saying it's not possible to set that up by providing the<br>
> contents of the files in the tooling interfaces for overlay? Can you expand<br>
> on why?<br>
<br>
Using ClangTool::mapVirtualFile? It is possible but I'm a bit worried about performance in such a case. This would require loading all input files into memory. On big code bases this could be a problem.<br></blockquote><div><br></div><div>I'm doing this in one of the biggest C++ codebases of the world; I can assure you, this is not a performance problem:</div><div>1. the size of the text files is many orders of magnitudes smaller than the size of the produces AST</div><div>2. the time it takes to copy those files is dwarfed by the time it takes to parse them</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Best Regards<br>
Maciej Poleski<br>
</blockquote></div></div>