[cfe-dev] Converting a Clang tool that uses Libooling to a Clang plugin

Sandeep K Chaudhary babbusandy2006 at gmail.com
Tue Jul 15 12:26:24 PDT 2014


Can someone please provide some inputs?

Thanks,
Sandeep.

On Mon, Jul 14, 2014 at 11:07 PM, Sandeep K Chaudhary
<babbusandy2006 at gmail.com> wrote:
> Hi Guys,
>
> I have written a tool that uses Clang Libtooling, and performs some
> instrumentation on the source code. It basically inspects all the
> global defs in the AST and inserts the instrumentation code. The
> original source files are over-written with the help of 'Rewriter'
> class.
>
> The tool reads the list of functions to instrument from an input file,
> and also generates a couple of header files with the required
> definitions for the instrumentation calls. It opens two o/p file
> streams to write to the header files.
>
> I wish to convert this tool to a Clang plugin so that I can use
> command line options during the build process. This way, I won't have
> to run the tool separately before building.
>
> Can someone please let me know how easy/difficult is it going to be? I
> hope that it is possible.
>
> Thanks and regards,
> Sandeep.



-- 
Thanks and regards,
Sandeep K Chaudhary.



More information about the cfe-dev mailing list