[cfe-commits] r57863 - in /cfe/trunk/Driver: CacheTokens.cpp clang.cpp clang.h

Cédric Venet cedric.venet at laposte.net
Tue Oct 21 09:24:18 PDT 2008


Ted Kremenek a écrit :
> Author: kremenek
> Date: Mon Oct 20 19:54:44 2008
> New Revision: 57863
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=57863&view=rev
> Log:
> Added the start of a prototype implementation of PCH based on token caching.
> 

I only use precompiled header with visual studio. VS requirement for 
precompiled headers is that they must be included first and always in 
the same order (so I usually use one stdafx.h file to group them all). 
This seems like a minimal requirement for PCH and your solution need to 
follow it too (since the token are cached after been preprocessed isn't 
it?). Then, why not simply serialize the AST at the end of the 
precompiled headers and reload it when needed? it would allow to save 
parse and sema time instead of just file reading, lex and preprocessing 
(Do you have some figure on what take most of the time? I would have 
said sema, at least for C++, but perhaps readings the files is the more 
time consuming task).
Perhaps the reponse is simply that AST serialization is still broken, 
then ignore me :)

regards,

Cédric



More information about the cfe-commits mailing list