[cfe-dev] Keeping AST data for includes
Vladimir Kirillov
proger at uaoug.org.ua
Tue Nov 2 10:33:18 PDT 2010
Hi Douglas!
On 08:26 Tue 02 Nov, Douglas Gregor wrote:
> 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.
Yes, I am aware of that.
However I thought about some declaration cache, which can be referenced
if the same SourceLocation is hit while the same preprocessor state
conditions are met.. Is it possible atm?
More information about the cfe-dev
mailing list