summaryrefslogtreecommitdiffstats
path: root/libcxx/docs/DesignDocs
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-01-04 23:56:00 +0000
committerEric Fiselier <eric@efcs.ca>2017-01-04 23:56:00 +0000
commite2f2d1edef9fda1c7533850cdcbeccf8083a677a (patch)
tree6b6eba7588043b2e108524c4183a4adf7c3f35fe /libcxx/docs/DesignDocs
parentece4758bf28b5be96ef0123ad79456a13e8518a1 (diff)
downloadbcm5719-llvm-e2f2d1edef9fda1c7533850cdcbeccf8083a677a.tar.gz
bcm5719-llvm-e2f2d1edef9fda1c7533850cdcbeccf8083a677a.zip
[NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS
The name _LIBCPP_TYPE_VIS_ONLY is no longer accurate because both _LIBCPP_TYPE_VIS and _LIBCPP_TYPE_VIS_ONLY expand to __attribute__((__type_visibility__)) with Clang. The only remaining difference is that _LIBCPP_TYPE_VIS_ONLY can be applied to templates whereas _LIBCPP_TYPE_VIS cannot (due to dllimport/dllexport not being allowed on templates). This patch renames _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS. llvm-svn: 291035
Diffstat (limited to 'libcxx/docs/DesignDocs')
-rw-r--r--libcxx/docs/DesignDocs/VisibilityMacros.rst13
1 files changed, 7 insertions, 6 deletions
diff --git a/libcxx/docs/DesignDocs/VisibilityMacros.rst b/libcxx/docs/DesignDocs/VisibilityMacros.rst
index 2ee07142d85..5eae9a769f8 100644
--- a/libcxx/docs/DesignDocs/VisibilityMacros.rst
+++ b/libcxx/docs/DesignDocs/VisibilityMacros.rst
@@ -49,13 +49,13 @@ Visibility Macros
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.
+**_LIBCPP_TEMPLATE_ONLY**
+ The same as `_LIBCPP_TYPE_VIS` except that it may be applied to class
+ templates.
**Windows Behavior**: DLLs do not support dllimport/export on class templates.
The macro has an empty definition on this platform.
- Note: This macro should be renamed `_LIBCPP_TEMPLATE_TYPE_VIS`.
**_LIBCPP_ENUM_VIS**
Mark the typeinfo of an enum as having default visibility. This attribute
@@ -74,14 +74,15 @@ Visibility Macros
a `_LIBCPP_EXTERN_TEMPLATE` declaration as being exported by the libc++ library.
This attribute must be specified on all extern class template declarations.
- This macro is used to override the `_LIBCPP_TYPE_VIS_ONLY` attribute
+ This macro is used to override the `_LIBCPP_TEMPLATE_VIS` attribute
specified on the primary template and to export the member functions produced
by the explicit instantiation in the dylib.
**GCC Behavior**: GCC ignores visibility attributes applied the type in
extern template declarations and applying an attribute results in a warning.
- However since `_LIBCPP_TYPE_VIS_ONLY` is the same as `_LIBCPP_TYPE_VIS` the
- visibility is already correct. The macro has an empty definition with GCC.
+ However since `_LIBCPP_TEMPLATE_VIS` is the same as
+ `__attribute__((visibility("default"))` the visibility is already correct.
+ The macro has an empty definition with GCC.
**Windows Behavior**: `extern template` and `dllexport` are fundamentally
incompatible *on a template class* on Windows; the former suppresses
OpenPOWER on IntegriCloud