[cfe-dev] Life span of AST data

Ilya Mirsky ilya.mirsky at gmail.com
Sun Sep 5 00:12:01 PDT 2010


Greetings,

I'm working on a src-2-src transformer, and I want it to be as modular as
possible.
Currently I'm doing the transformations by invoking Rewriter from within
ASTConsumer methods.
What I want is to have methods like: setFuncName, insertTextAfterCall etc,
which will be separated from the parsing process, and could be invoked
independantly. The problem is that all the data generated during the parsing
(Decl, Stmt, SourceLocation) is deleted after the parsing ends.

Is there a better way but doing a deep copy of the required data during the
parsing?


Thanks,
Ilya


-- 
Best Regards,
Ilya Mirsky
www.cs.bgu.ac.il/~mirskyil <http://www.cs.bgu.ac.il/%7Emirskyil>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100905/350999d6/attachment.html>


More information about the cfe-dev mailing list