From 66fa7a3b109be273af97d94e73072880bb11ea50 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 13 Feb 2015 16:07:32 +0100 Subject: Ah, Clang has some "type_visiblity" well-kept secret "[...] to allow users to control the visibility of a type for the purposes of RTTI [...]" (), so fits well for SAL_DLLPUBLIC_RTTI Change-Id: I6494e027c3af176591ffeb1d6a8965b7d40db1a9 --- include/sal/types.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/sal/types.h') diff --git a/include/sal/types.h b/include/sal/types.h index 8810695b2819..e2517ae17ca2 100644 --- a/include/sal/types.h +++ b/include/sal/types.h @@ -268,7 +268,11 @@ typedef void * sal_Handle; # define SAL_DLLPRIVATE __attribute__ ((visibility("hidden"))) # define SAL_DLLPUBLIC_TEMPLATE __attribute__ ((visibility("default"))) # if defined __clang__ -# define SAL_DLLPUBLIC_RTTI __attribute__ ((visibility("default"))) +# if __has_attribute(type_visibility) +# define SAL_DLLPUBLIC_RTTI __attribute__ ((type_visibility("default"))) +# else +# define SAL_DLLPUBLIC_RTTI __attribute__ ((visibility("default"))) +# endif # else # define SAL_DLLPUBLIC_RTTI # endif -- cgit