Change _LIBCPP_TYPE_VIS to use __type_visibility__(default) instead of __visibility__(default) when available. This change makes just the type_info visible so that types like vectors and strings can be used as exception objects across dylib boundaries even when hidden visibility is specified globally (at the command line), and yet this allows clients to hide the member functions of things like vector and string (with global visibility commands).

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176639 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant
2013-03-07 19:25:03 +00:00
parent 83eade6abb
commit 707f318787

View File

@@ -144,7 +144,11 @@
#endif
#ifndef _LIBCPP_TYPE_VIS
#define _LIBCPP_TYPE_VIS __attribute__ ((__visibility__("default")))
# if __has_attribute(type_visibility)
# define _LIBCPP_TYPE_VIS __attribute__ ((__type_visibility__("default")))
# else
# define _LIBCPP_TYPE_VIS __attribute__ ((__visibility__("default")))
# endif
#endif
#ifndef _LIBCPP_INLINE_VISIBILITY
@@ -152,7 +156,7 @@
#endif
#ifndef _LIBCPP_EXCEPTION_ABI
#define _LIBCPP_EXCEPTION_ABI __attribute__ ((__visibility__("default")))
#define _LIBCPP_EXCEPTION_ABI _LIBCPP_TYPE_VIS
#endif
#ifndef _LIBCPP_CANTTHROW