[cfe-dev] Modifying an AST and Sema's dependency on an AST consumer
Lukasz Janyst
ljanyst at cern.ch
Fri Dec 5 06:00:16 PST 2008
Or to make AST consumers dependent only on ASTs. Interface clarity vs
efficiency in the main use case, that's always a tough choice :)
Lukasz
On Thu, Dec 4, 2008 at 7:30 PM, Daniel Dunbar <daniel at zuster.org> wrote:
> 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