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