Change _LIBCPP_TYPE_VIS to use __type_visibility__(default) instead of __visibility__...
authorHoward Hinnant <hhinnant@apple.com>
Thu, 7 Mar 2013 19:25:03 +0000 (19:25 +0000)
committerHoward Hinnant <hhinnant@apple.com>
Thu, 7 Mar 2013 19:25:03 +0000 (19:25 +0000)
llvm-svn: 176639

libcxx/include/__config

index ce0858f..8e39ad6 100644 (file)
 #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
 #endif
 
 #ifndef _LIBCPP_EXCEPTION_ABI
-#define _LIBCPP_EXCEPTION_ABI __attribute__ ((__visibility__("default")))
+#define _LIBCPP_EXCEPTION_ABI _LIBCPP_TYPE_VIS
 #endif
 
 #ifndef _LIBCPP_CANTTHROW