summaryrefslogtreecommitdiffstats
path: root/clang/include/clang-c
diff options
context:
space:
mode:
authorEhsan Akhgari <ehsan.akhgari@gmail.com>2016-05-31 15:55:51 +0000
committerEhsan Akhgari <ehsan.akhgari@gmail.com>2016-05-31 15:55:51 +0000
commitb743de7fb9dcd66815d66dc52874ee25c7c8f8cc (patch)
tree4e218b0f0a4bc109d7168277c04d7fcbd239f9c1 /clang/include/clang-c
parent3a562e6f703a0eaeee7db3674baf7876ed954f91 (diff)
downloadbcm5719-llvm-b743de7fb9dcd66815d66dc52874ee25c7c8f8cc.tar.gz
bcm5719-llvm-b743de7fb9dcd66815d66dc52874ee25c7c8f8cc.zip
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>. llvm-svn: 271292
Diffstat (limited to 'clang/include/clang-c')
-rw-r--r--clang/include/clang-c/Index.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h
index 790effea1d7..dbcd0c8840f 100644
--- a/clang/include/clang-c/Index.h
+++ b/clang/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.
OpenPOWER on IntegriCloud