[cfe-dev] Python/CIndex include file support

Andrew Sutton andrew.n.sutton at gmail.com
Mon Feb 1 07:38:27 PST 2010


Attached is a patch that implements include file traversal support for the
Python binding's TranslationUnit class (plus a test case and a small example
program).

The new TranslationUnit.includes property returns a sequence of tuples
containing the including file (or None for the "inclusion" of the TU source
file), the included file, the source location and the include depth.
Basically, it returns an attributed edge list (graph).

I also wrote a small example utility that dumps the include graph as a
Graphviz dot file.

Andrew Sutton
andrew.n.sutton at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100201/861be79a/attachment.html>


More information about the cfe-dev mailing list