[PATCH] D25208: [libc++] Make _LIBCPP_TYPE_VIS export members
Shoaib Meenai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 5 15:11:08 PST 2016
smeenai updated this revision to Diff 80334.
smeenai added a comment.
Rebasing
https://reviews.llvm.org/D25208
Files:
docs/DesignDocs/VisibilityMacros.rst
include/__config
Index: include/__config
===================================================================
--- include/__config
+++ include/__config
@@ -563,18 +563,22 @@
#ifndef _LIBCPP_TYPE_VIS
# if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
-# if __has_attribute(__type_visibility__)
-# define _LIBCPP_TYPE_VIS __attribute__ ((__type_visibility__("default")))
-# else
-# define _LIBCPP_TYPE_VIS __attribute__ ((__visibility__("default")))
-# endif
+# define _LIBCPP_TYPE_VIS __attribute__ ((__visibility__("default")))
# else
# define _LIBCPP_TYPE_VIS
# endif
#endif
#ifndef _LIBCPP_TYPE_VIS_ONLY
-# define _LIBCPP_TYPE_VIS_ONLY _LIBCPP_TYPE_VIS
+# if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
+# if __has_attribute(__type_visibility__)
+# define _LIBCPP_TYPE_VIS_ONLY __attribute__ ((__type_visibility__("default")))
+# else
+# define _LIBCPP_TYPE_VIS_ONLY __attribute__ ((__visibility__("default")))
+# endif
+# else
+# define _LIBCPP_TYPE_VIS_ONLY
+# endif
#endif
#ifndef _LIBCPP_FUNC_VIS_ONLY
Index: docs/DesignDocs/VisibilityMacros.rst
===================================================================
--- docs/DesignDocs/VisibilityMacros.rst
+++ docs/DesignDocs/VisibilityMacros.rst
@@ -41,17 +41,17 @@
A synonym for `_LIBCPP_INLINE_VISIBILITY`
**_LIBCPP_TYPE_VIS**
+ Mark a type's typeinfo, vtable and members as having default visibility.
+ This attribute cannot be used on class templates.
+
+**_LIBCPP_TYPE_VIS_ONLY**
Mark a type's typeinfo and vtable as having default visibility.
- `_LIBCPP_TYPE_VIS`. This macro has no effect on the visibility of the
- type's member functions. This attribute cannot be used on class templates.
+ This macro has no effect on the visibility of the type's member functions.
**GCC Behavior**: GCC does not support Clang's `type_visibility(...)`
attribute. With GCC the `visibility(...)` attribute is used and member
functions are affected.
-**_LIBCPP_TYPE_VIS_ONLY**
- The same as `_LIBCPP_TYPE_VIS` except that it may be applied to templates.
-
**Windows Behavior**: DLLs do not support dllimport/export on class templates.
The macro has an empty definition on this platform.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25208.80334.patch
Type: text/x-patch
Size: 2227 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161205/a486dc9a/attachment.bin>
More information about the cfe-commits
mailing list