diff options
| author | Ted Kremenek <kremenek@apple.com> | 2010-12-08 23:43:14 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2010-12-08 23:43:14 +0000 |
| commit | bbedd062c9050a5ddd92398b10d3f9e73adfb1c1 (patch) | |
| tree | 5d32c3d4f6be85062431bc49bdd240d4e56d83e8 /clang/include/clang-c | |
| parent | e296ee830ae50463f014534b45ea8eb8f6554bb6 (diff) | |
| download | bcm5719-llvm-bbedd062c9050a5ddd92398b10d3f9e73adfb1c1.tar.gz bcm5719-llvm-bbedd062c9050a5ddd92398b10d3f9e73adfb1c1.zip | |
Add new libclang hooks for CXCursorSet, a
DenseMap-backed hashtable for doing client-side
management of CXCursors within a set.
llvm-svn: 121318
Diffstat (limited to 'clang/include/clang-c')
| -rw-r--r-- | clang/include/clang-c/Index.h | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h index d7a4b602bb5..0be4d4a02c1 100644 --- a/clang/include/clang-c/Index.h +++ b/clang/include/clang-c/Index.h @@ -1460,7 +1460,38 @@ CINDEX_LINKAGE enum CXLanguageKind { */ CINDEX_LINKAGE enum CXLanguageKind clang_getCursorLanguage(CXCursor cursor); - + +/** + * \brief A fast container representing a set of CXCursors. + */ +typedef struct CXCursorSetImpl *CXCursorSet; + +/** + * \brief Creates an empty CXCursorSet. + */ +CINDEX_LINKAGE CXCursorSet clang_createCXCursorSet(); + +/** + * \brief Disposes a CXCursorSet and releases its associated memory. + */ +CINDEX_LINKAGE void clang_disposeCXCursorSet(CXCursorSet cset); + +/** + * \brief Queries a CXCursorSet to see if it contains a specific CXCursor. + * + * \returns non-zero if the set contains the specified cursor. +*/ +CINDEX_LINKAGE unsigned clang_CXCursorSet_contains(CXCursorSet cset, + CXCursor cursor); + +/** + * \brief Inserts a CXCursor into a CXCursorSet. + * + * \returns zero if the CXCursor was already in the set, and non-zero otherwise. +*/ +CINDEX_LINKAGE unsigned clang_CXCursorSet_insert(CXCursorSet cset, + CXCursor cursor); + /** * \brief Determine the semantic parent of the given cursor. * |

