Rewriting back-annotated code

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Rewriting back-annotated code

Simone Corbetta
Hi all, I am new in using CLang. My problem is the following: I have an input source code and I have to rewrite the code with some additional function calls in specific points. How can I do that?

Thanks in advance for your help.


--
Simone Corbetta, Ph.D. Student

Dipartimento di Elettronica e Informazione
Politecnico di Milano
Milano, ITALY


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Rewriting back-annotated code

Douglas Gregor

On Jul 7, 2010, at 11:51 PM, Simone Corbetta wrote:

> Hi all, I am new in using CLang. My problem is the following: I have an input source code and I have to rewrite the code with some additional function calls in specific points. How can I do that?


Take a look at the Rewriter library in Clang, and in particular the Objective-C rewriter (in lib/Rewrite/RewriteObjC.cpp), for an example of how to perform this kind of transformation. The Objective-C rewrite translates many Objective-C constructs into function calls.

        - Doug
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev