@@ -391,7 +391,7 @@ typedef __char32_t char32_t;
391
391
# define _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
392
392
# define _LIBCPP_TEMPLATE_VIS
393
393
# define _LIBCPP_TEMPLATE_DATA_VIS
394
- # define _LIBCPP_TYPE_VISIBILITY_DEFAULT
394
+ # define _LIBCPP_NAMESPACE_VISIBILITY
395
395
396
396
# else
397
397
@@ -419,17 +419,16 @@ typedef __char32_t char32_t;
419
419
# define _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
420
420
# endif
421
421
422
- // GCC doesn't support the type_visibility attribute, so we have to keep the visibility attribute on templates
423
- # if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) && !__has_attribute(__type_visibility__)
424
- # define _LIBCPP_TEMPLATE_VIS __attribute__ ((__visibility__(" default" )))
425
- # else
426
- # define _LIBCPP_TEMPLATE_VIS
427
- # endif
422
+ // This is kept to avoid a huge library-wide diff in the first step.
423
+ // TODO: Remove this in a follow-up patch
424
+ # define _LIBCPP_TEMPLATE_VIS
428
425
429
426
# if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) && __has_attribute(__type_visibility__)
430
- # define _LIBCPP_TYPE_VISIBILITY_DEFAULT __attribute__ ((__type_visibility__(" default" )))
427
+ # define _LIBCPP_NAMESPACE_VISIBILITY __attribute__ ((__type_visibility__(" default" )))
428
+ # elif !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
429
+ # define _LIBCPP_NAMESPACE_VISIBILITY __attribute__ ((__visibility__(" default" )))
431
430
# else
432
- # define _LIBCPP_TYPE_VISIBILITY_DEFAULT
431
+ # define _LIBCPP_NAMESPACE_VISIBILITY
433
432
# endif
434
433
435
434
# endif // defined(_LIBCPP_OBJECT_FORMAT_COFF)
@@ -588,7 +587,7 @@ typedef __char32_t char32_t;
588
587
// If it's not clear whether using the unversioned namespace is the correct thing to do, it's not. The versioned
589
588
// namespace (_LIBCPP_BEGIN_NAMESPACE_STD) should almost always be used.
590
589
# define _LIBCPP_BEGIN_UNVERSIONED_NAMESPACE_STD \
591
- _LIBCPP_PUSH_EXTENSION_DIAGNOSTICS namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std {
590
+ _LIBCPP_PUSH_EXTENSION_DIAGNOSTICS namespace _LIBCPP_NAMESPACE_VISIBILITY std {
592
591
593
592
# define _LIBCPP_END_UNVERSIONED_NAMESPACE_STD } _LIBCPP_POP_EXTENSION_DIAGNOSTICS
594
593
0 commit comments