[cfe-dev] libtool for some preprocessor work
David Come via cfe-dev
cfe-dev at lists.llvm.org
Thu Sep 7 06:26:47 PDT 2017
Hello,
Have a look at clang::PPCallbacks
(https://clang.llvm.org/doxygen/classclang_1_1PPCallbacks.html)
Have a look at pp-trace for an example how to use it.
Best,
David
On 07/09/2017 13:13, blubee blubeeme via cfe-dev wrote:
> Hello
>
> I am trying to create a visual map of some source code to be able to
> do source to source transformation.
>
> The first thing that I would like to do is be able to get a list of
> all the #include statements from the c source code.
>
> Once that's done, I would also need to be able to go through all the
> variables defined in the main source file and see if it's being
> defined in said file or being linked in from some of those header files.
>
> This should be enough to get me well under way with my project. I came
> across libclang because it's stable and it's also written in c; the
> language that I will be working with.
>
> My question; how can I get the list of include files from the main
> file, then searching for variables; if they are defined in an include
> file or are they local to the main file?
>
> Best,
> Owen
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170907/729aaed8/attachment.html>
More information about the cfe-dev
mailing list