[cfe-dev] Keeping AST data for includes

Douglas Gregor dgregor at apple.com
Tue Nov 2 08:26:49 PDT 2010


On Nov 2, 2010, at 6:52 AM, Vladimir Kirillov wrote:

> Hello, cfe-dev!
> 
> While processing big source code trees with ASTFrontendAction and custom
> ASTConsumer, same include files are getting hit and parsed all over and
> over again.
> Is there any technique (except precompiled header) to prevent such
> actions? Like keeping header-related AST data and referencing it within
> next files' AST?


That's what precompiled headers do. 

If you want each header to have an independent, stored AST, then you're in trouble, since every #include can affect every #include that follows it, and the dependencies between those #includes are very fine-grained.

	- Doug



More information about the cfe-dev mailing list