[cfe-dev] Macro history (de-)serialization implementation, need help figuring out some things

Alexander Kornienko alexfh at google.com
Fri Sep 7 04:40:49 PDT 2012


On Fri, Sep 7, 2012 at 8:45 AM, Sebastian Redl <
sebastian.redl at getdesigned.at> wrote:

> On 06.09.2012 05:03, Richard Smith wrote:
>
>> There is some documentation for PCH and the bitcode format it uses:
>>
>> http://clang.llvm.org/docs/**PCHInternals.html<http://clang.llvm.org/docs/PCHInternals.html>
>> http://llvm.org/docs/**BitCodeFormat.html<http://llvm.org/docs/BitCodeFormat.html>
>>
>> I don't think we have any documentation for PCH chaining.
>>
>>  Well, that's grave neglect on my part. I need to rectify this eventually.
>
> 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.
> This is easy for new AST nodes, but pretty hard for AST mutation. Luckily,
> this is very rare.
>
> Sebastian


Thanks for the explanation. But what problem does this feature intend to
solve? What are use-cases for this?

-- 
Regards,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120907/d8a92b21/attachment.html>


More information about the cfe-dev mailing list