[Libreoffice-commits] core.git: include/sal

Stephan Bergmann sbergman at redhat.com
Fri Feb 13 07:09:43 PST 2015


 include/sal/types.h |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 66fa7a3b109be273af97d94e73072880bb11ea50
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Feb 13 16:07:32 2015 +0100

    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

diff --git a/include/sal/types.h b/include/sal/types.h
index 8810695..e2517ae 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


More information about the Libreoffice-commits mailing list