diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-01-04 23:56:00 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-01-04 23:56:00 +0000 |
commit | c3589a8305a317cfa0757bc5f4136a7b93684d23 (patch) | |
tree | be6a82654e827471bcb96d00f1169f9a0c5bbbf3 /docs | |
parent | 2d2247d0dada42d4a39f72675b06082f7a88bb02 (diff) |
[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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291035 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r-- | docs/DesignDocs/VisibilityMacros.rst | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/docs/DesignDocs/VisibilityMacros.rst b/docs/DesignDocs/VisibilityMacros.rst index 2ee07142d..5eae9a769 100644 --- a/docs/DesignDocs/VisibilityMacros.rst +++ b/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 |