[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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user