summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/Indexing.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Make 'LangOptions' in CompilerInvocation a heap-allocated, reference counted ↵Ted Kremenek2011-11-171-1/+1
| | | | | | | | | | | | | | | | | object. I discovered that llvm::RefCountedBase<T> has a bug where the reference count is copied in the copy constructor, which means that there were cases when the CompilerInvocation objects created by ASTUnit were actually leaked. When I fixed that bug locally, it showed that a whole bunch of code assumed that the LangOptions object that was part of CompilerInvocation was still alive. By making it heap-allocated and reference counted, we can keep it around after the CompilerInvocation object goes away. As part of this change, change CompilerInvocation:getLangOptions() to return a pointer, acting as another clue that this object may outlive the CompilerInvocation object. This commit doesn't fix the CompilerInvocation leak itself. That will come when I commit the fix to llvm::RefCountedBase<T> to mainline LLVM. llvm-svn: 144930
* [libclang] Introduce a new function to apply the indexing callbacks on an ↵Argyrios Kyrtzidis2011-11-151-10/+171
| | | | | | | | existing CXTranslationUnit, mainly to be used for indexing a PCH. llvm-svn: 144623
* [libclang] Slight changes to the indexing API and bigger internal changes ↵Argyrios Kyrtzidis2011-11-141-20/+30
| | | | | | for it. llvm-svn: 144577
* [libclang] Further simplify the indexing API.Argyrios Kyrtzidis2011-11-121-52/+36
| | | | | | | That stuff can be added later on if we need them. Also add some const goodness. llvm-svn: 144446
* [libclang] Simplify the indexing API.Argyrios Kyrtzidis2011-11-111-2/+52
| | | | | | | | Cut down the number of callbacks to more generic ones. Clients can check an enum to find out what kind of declaration it is and they can call functions to get more specific information than the generic provided info. llvm-svn: 144343
* Use LIBCLANG_NOTHREADS instead of CINDEXTEST_NOTHREADS inside libclang,Argyrios Kyrtzidis2011-10-291-1/+1
| | | | | | so the c-index-test one can be enabled without affecting libclang. llvm-svn: 143288
* [libclang] Introduce a new high level API for indexing clients that assumesArgyrios Kyrtzidis2011-10-171-0/+479
more of the work involved in indexing a translation unit and simplifies client implementations. Only C/ObjC for now, C++ (and comments) to come. llvm-svn: 142233
OpenPOWER on IntegriCloud