PrintFunctionNames

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

PrintFunctionNames

Israel Cabrera-2
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? 
I have tried downloading the last version (from svn) and compiling, but after compiling I only get the libPrintFunctionNames.a (not the .so file), can someone help me to convert it to an so file, I have tried:
gcc -shared Release/PrintFunctionNames.o -o Release/PrintFunctionNames.so -lclangIndex -lclangFrontend -lclangDriver -lclangSema -lclangAnalysis -lclangAST -lclangParse -lclangLex -lclangBasic
but it generates a lot of errors.
I think that if maybe I got the so file I could get some more information (because the readme says that you need that file to load it to clang).

Also is the plugin a beta? 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

Thank you for your time.

May the source code be with you!!
Eng. Israel Cabrera
Programmer

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

Re: PrintFunctionNames

bruce.r.stephens
Israel Cabrera <[hidden email]>
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.

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