Commit Graph

4 Commits

Author SHA1 Message Date
Daniel Dunbar ae4b77d99d cindex/Python: Fix cindex-{dump,includes} examples to just pass all args
directly to Index, instead of requiring the input file to be first. This makes
the examples behave more like 'clang'.

For example,
  ddunbar@giles:tmp$ echo '#include <string>' | python ~/llvm/tools/clang/bindings/python/examples/cindex/cindex-includes.py -- -x c++ - | wc -l
     114
  ddunbar@giles:tmp$ echo '#include <stdio.h>' | python ~/llvm/tools/clang/bindings/python/examples/cindex/cindex-includes.py -- -x c - | wc -l
      10

llvm-svn: 96107
2010-02-13 18:33:28 +00:00
Daniel Dunbar 43813bf023 cindex/Python: Add TranslationUnit.get_includes, patch by Andrew Sutton!
llvm-svn: 96106
2010-02-13 18:33:18 +00:00
Daniel Dunbar 288edb5bda cindex/Python: Turn off showing IDs by default, they are really slow to compute
pending a hash function. Also added a --max-depth argument, handy for timing and
limiting the volume of output.

llvm-svn: 94936
2010-01-31 00:41:15 +00:00
Daniel Dunbar 45dc842a0e cindex/Python: Add a simple example which dumps assorted information about a translation unit.
llvm-svn: 94934
2010-01-30 23:59:14 +00:00