summaryrefslogtreecommitdiffstats
path: root/clang/bindings/python/examples
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-192-8/+6
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Portable Python script across Python versionSerge Guelton2018-12-181-1/+1
| | | | | | | | | | | In Python3, dict.items, dict.keys, dict.values, zip, map and filter no longer return lists, they create generator instead. The portability patch consists in forcing an extra `list` call if the result is actually used as a list. `map` are replaced by list comprehension and `filter` by filtered list comprehension. Differential Revision: https://reviews.llvm.org/D55197 llvm-svn: 349501
* cindex-dump.py: fix the --show-ids description stringAlp Toker2014-05-051-1/+1
| | | | | | It looks like this was botched back in r94936. llvm-svn: 207947
* Fix cindex-dump.py --show-idsAlp Toker2014-05-051-1/+1
| | | | | | | | | | | | | This option flag was incorrectly expecting an argument: $ cindex-dump.py --show-ids test.cpp cindex-dump.py: error: invalid number arguments With this change the feature correctly gets enabled by --show-ids. No tests. llvm-svn: 207946
* cindex/Python: Fix cindex-{dump,includes} examples to just pass all argsDaniel Dunbar2010-02-132-11/+5
| | | | | | | | | | | | | 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
* cindex/Python: Add TranslationUnit.get_includes, patch by Andrew Sutton!Daniel Dunbar2010-02-131-0/+62
| | | | llvm-svn: 96106
* cindex/Python: Turn off showing IDs by default, they are really slow to computeDaniel Dunbar2010-01-311-3/+20
| | | | | | | pending a hash function. Also added a --max-depth argument, handy for timing and limiting the volume of output. llvm-svn: 94936
* cindex/Python: Add a simple example which dumps assorted information about a ↵Daniel Dunbar2010-01-301-0/+72
translation unit. llvm-svn: 94934
OpenPOWER on IntegriCloud