[cfe-dev] Cloning Clang Stmts, declarations and other AST objects

moataz ragab mtzrgb at gmail.com
Tue May 12 08:33:55 PDT 2009


Hi,

I would like to implement a set of transformations on Clang AST one after
the other. Therefore I want to modify the AST by adding or removing nodes
from it.
For example, I would like to do first loop-unrolling on the inner loop and
add the unrolled copies in the AST and then make other transformations on
the AST.

My question: is there a way to clone the stmts in the body of the loop and
just go in and modify these copies and add them to the AST.


Best regards,
Moataz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090512/f861a2c5/attachment.html>


More information about the cfe-dev mailing list