<br><br><div class="gmail_quote">On Fri, Sep 7, 2012 at 8:45 AM, Sebastian Redl <span dir="ltr"><<a href="mailto:sebastian.redl@getdesigned.at" target="_blank">sebastian.redl@getdesigned.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 06.09.2012 05:03, Richard Smith wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
There is some documentation for PCH and the bitcode format it uses:<br>
<br>
<a href="http://clang.llvm.org/docs/PCHInternals.html" target="_blank">http://clang.llvm.org/docs/<u></u>PCHInternals.html</a><br>
<a href="http://llvm.org/docs/BitCodeFormat.html" target="_blank">http://llvm.org/docs/<u></u>BitCodeFormat.html</a><br>
<br>
I don't think we have any documentation for PCH chaining.<br>
<br>
</blockquote></div>
Well, that's grave neglect on my part. I need to rectify this eventually.<br>
<br>
For the short term, PCH chaining is pretty simple in idea, if not in implementation. Load an existing PCH file, parse some additional code, and save the diff between the AST loaded from the PCH and the AST after parsing as another PCH file that references the first. Now you have two chained PCH files. Load the second, and it will automatically load the first and then apply the diff.<br>

This is easy for new AST nodes, but pretty hard for AST mutation. Luckily, this is very rare.<span class="HOEnZb"><font color="#888888"><br>
<br>
Sebastian</font></span></blockquote><div><br></div><div>Thanks for the explanation. But what problem does this feature intend to solve? What are use-cases for this?</div><div><br></div><div>-- </div><div>Regards,</div><div>
Alex </div></div>