[cfe-dev] libtool for some preprocessor work

blubee blubeeme via cfe-dev cfe-dev at lists.llvm.org
Sat Sep 9 07:45:49 PDT 2017


Hello David

Thank you for the reference. I just had a chance to look at it, seems
great!

Best,
Owen

On Thu, Sep 7, 2017, 21:24 David Come via cfe-dev <cfe-dev at lists.llvm.org>
wrote:

> 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 listcfe-dev at lists.llvm.orghttp://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
> _______________________________________________
> 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/20170909/566fba8c/attachment.html>


More information about the cfe-dev mailing list