[cfe-dev] Modifying an AST and Sema's dependency on an AST consumer

Daniel Dunbar daniel at zuster.org
Thu Dec 4 10:30:53 PST 2008


On Thu, Dec 4, 2008 at 10:14 AM, Lukasz Janyst <ljanyst at cern.ch> wrote:
> Ok, many thanks for your replies. For the prototype I'm building it's
> not a critical issue right now, but still it would be great to have it
> fixed.
>
> What about my other problem? I had only a very brief look at this part
> of the code but I can see that you have probably done that for
> performance reasons. I mean, Sema seems to have all the structures to
> determine when it's done with the class processing efficiently. My
> problem is that I need to push my TUs through CodeGen after Sema is
> long gone.

Given our current interfaces, I think the simplest approach to this
would be to add a something like a generic ASTStreamer class which
takes an AST and a consumer and streams the AST through the consumer.
This avoids the need for CodeGen or other consumers to be aware that
they are being called differently.

 - Daniel



More information about the cfe-dev mailing list