[cfe-dev] PrintFunctionNames

Bruce Stephens bruce.r.stephens at gmail.com
Fri Jun 25 03:26:49 PDT 2010


Israel Cabrera <issurfer-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org>
writes:

> Hello, I looked in the history of the mailing list and found out that
> there is still no solution (at least posted) about that clang is
> unable to find the plugin. Has anyone make it work? 

<http://article.gmane.org/gmane.comp.compilers.clang.devel/8277>

If you build using CMake then it'll all just work.

[...]

> Also is the plugin a beta?

It's an example of a plugin.  I'm not sure whether the plugin mechanism
is the recommended way to do this kind of thing.

> I want to get access to the AST that clang generates, is this the
> right way to go? (plugin), is there another way? like only using LLVM

There's an -emit-ast argument to the front end, and in
tools/c-index-test example code reading it.  There's also a -bootcon
flag (search for BoostCon in the source) and that has access to the AST.
There's the clang-interpreter which could presumably be modified without
too much hassle.

I've no idea which would be the recommended way.




More information about the cfe-dev mailing list