[cfe-dev] Basic source-to-source transformation with Clang

Manuel Klimek klimek at google.com
Fri Jun 22 11:35:19 PDT 2012


On Fri, Jun 22, 2012 at 7:55 PM, John McCall <rjmccall at apple.com> wrote:

> On Jun 22, 2012, at 3:06 AM, Satya Prakash Prasad wrote:
> > Thanks John for the clarification.
> >
> > Can you please let me know how to then create clang instance for C++
> input file?
>
> I suggest looking at some of the example code to see how it initializes the
> CompilerInstance.  clang-interpreter is an example of this.
>
> Alternatively, you might be happier just running as a clang plugin, in
> which case you should look at the PrintFunctionNames example.
>

For source-2-source translation, there are more alternatives with different
trade-offs to consider:
http://clang.llvm.org/docs/Tooling.html

Cheers,
/Manuel


>
> John.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120622/7bf8d928/attachment.html>


More information about the cfe-dev mailing list