Questions about using Clang for source to source transformation.

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

Questions about using Clang for source to source transformation.

mywayin2sky

Hello,

I'm working in a project involving source to source transformation of some arbitrary c code , I'm looking forward to using Clang
my main problem is where to start , I can find approx. no documentation on topic

Any existing source to source sample codes based on clang that can be of help as a starting point ?

I want to know the Clang APIs for building a AST and rewriting codes from the AST.

 

Thanks.

 


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

Re: Questions about using Clang for source to source transformation.

Jean-Daniel Dupas-2
<base href="x-msg://65/">
Le 6 mai 2010 à 12:33, mywayin2sky a écrit :

Hello,

I'm working in a project involving source to source transformation of some arbitrary c code , I'm looking forward to using Clang
my main problem is where to start , I can find approx. no documentation on topic

Any existing source to source sample codes based on clang that can be of help as a starting point ?
I want to know the Clang APIs for building a AST and rewriting codes from the AST.
 

Actually, the best source to source transformer example is the ObjC Rewriter (see lib/FrontEnd/RewriteObjC.cpp).


-- Jean-Daniel





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

Re: Questions about using Clang for source to source transformation.

Jia Liu
In reply to this post by mywayin2sky
hi mywayin2sky
      llvm/tools/clang/examples/ and llvm/tools/clang/include/clang-c/ maybe helpful.
      wpa is a tool display Call-Graph.
Liu


2010/5/6 mywayin2sky <[hidden email]>

Hello,

I'm working in a project involving source to source transformation of some arbitrary c code , I'm looking forward to using Clang
my main problem is where to start , I can find approx. no documentation on topic

Any existing source to source sample codes based on clang that can be of help as a starting point ?

I want to know the Clang APIs for building a AST and rewriting codes from the AST.

 

Thanks.

 


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



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