[cfe-dev] Transferring typers between ASTContexts
Olaf Krzikalla
Olaf.Krzikalla at tu-dresden.de
Wed May 26 05:32:05 PDT 2010
Hi @clang,
is there an easy way to reuse types (given by Type*) from a particular
ASTContext in a different ASTContext?
What I have here are multiple configuration files written in C++. I
don't want to preserve the complete ASTContext for each file during the
entire runtime of the program. I just need a way to represent types in a
manner so that I can rebuild the actual Type pointer later in a
different ASTContext (I have only simple types here not dependent on any
expressions and yes, I know, that this constraint simplifies my problem
quite a lot). Holding types on my own doesn't work due to the private
constructors of a lot of types (which I don't like BTW).
So one way could be to create and use a separate (dummy) ASTContext. Or
I utilize the PCH stream but I'm completely unsure how to proceed then
and if this is a feasible solution at all.
Best regards
Olaf Krzikalla
More information about the cfe-dev
mailing list