diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-02-13 16:07:32 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-02-13 16:07:32 +0100 |
commit | 66fa7a3b109be273af97d94e73072880bb11ea50 (patch) | |
tree | 00dbf5af54ccd1f5bb532d94d01779034901a0c9 /include | |
parent | 7ad758a53a7cef0ed7b39182d45a64be427b1394 (diff) |
Ah, Clang has some "type_visiblity" well-kept secret
"[...] to allow users to control the visibility of a type for the purposes of
RTTI [...]"
(<http://llvm.org/viewvc/llvm-project?view=revision&revision=175587>), so fits
well for SAL_DLLPUBLIC_RTTI
Change-Id: I6494e027c3af176591ffeb1d6a8965b7d40db1a9
Diffstat (limited to 'include')
-rw-r--r-- | include/sal/types.h | 6 |
1 files changed, 5 insertions, 1 deletions
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 |