[cfe-dev] system file dependencies for a part of the code using libtooling

Deepak Rajendrakumaran deepak3 at vt.edu
Thu Jan 29 15:16:49 PST 2015


Hello,

I have been trying to find the system file dependencies for a part of the
code within a single c file. A sample scenario will be-

-There are 3 functions in file f1.c- func1(), func2() and func3()
-the file f1.c had a number of system header files included
-I use clang to take func2() from f1.c and move it to a new file f2.c
-To do this I need  to understand which all system headers present in f1.c
are being used by func2() so that I can add these also to f2.c


I have looked at all functions which I could use from the clang API and I
cannot see any way I can get this information. Does anyone know of any
functionality which will help achieve this??


Regards,
Deepak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150129/f04bb391/attachment.html>


More information about the cfe-dev mailing list