diff options
author | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2016-05-31 15:55:51 +0000 |
---|---|---|
committer | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2016-05-31 15:55:51 +0000 |
commit | d3c40bafeea1f5bf2f02b987f785c11d0262f0b7 (patch) | |
tree | 3a4e7f2a26c88e6771bc164e59cb1acbc5a94d3a /include/clang-c | |
parent | dafa8b914283a5d23890d4f76052dbef717e47e8 (diff) |
clang-c: Add the clang_getCursorVisibility() API
This patch adds an API for querying the visibility of the entity
referred to by a cursor.
Patch by Michael Wu <mwu@mozilla.com>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271292 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang-c')
-rw-r--r-- | include/clang-c/Index.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h index 790effea1d..dbcd0c8840 100644 --- a/include/clang-c/Index.h +++ b/include/clang-c/Index.h @@ -2516,6 +2516,32 @@ enum CXLinkageKind { */ CINDEX_LINKAGE enum CXLinkageKind clang_getCursorLinkage(CXCursor cursor); +enum CXVisibilityKind { + /** \brief This value indicates that no visibility information is available + * for a provided CXCursor. */ + CXVisibility_Invalid, + + /** \brief Symbol not seen by the linker. */ + CXVisibility_Hidden, + /** \brief Symbol seen by the linker but resolves to a symbol inside this object. */ + CXVisibility_Protected, + /** \brief Symbol seen by the linker and acts like a normal symbol. */ + CXVisibility_Default +}; + +/** + * \brief Describe the visibility of the entity referred to by a cursor. + * + * This returns the default visibility if not explicitly specified by + * a visibility attribute. The default visibility may be changed by + * commandline arguments. + * + * \param cursor The cursor to query. + * + * \returns The visibility of the cursor. + */ +CINDEX_LINKAGE enum CXVisibilityKind clang_getCursorVisibility(CXCursor cursor); + /** * \brief Determine the availability of the entity that this cursor refers to, * taking the current target platform into account. |