eugenis created this revision. eugenis added reviewers: EricWF, mclow.lists. eugenis added a subscriber: cfe-commits. eugenis set the repository for this revision to rL LLVM.
Use __attribute__((internal_linkage)) instead of always_inline and visibility("hidden") when it is available. Repository: rL LLVM http://reviews.llvm.org/D14411 Files: include/__config Index: include/__config =================================================================== --- include/__config +++ include/__config @@ -233,15 +233,23 @@ #endif #ifndef _LIBCPP_INLINE_VISIBILITY +#if __has_attribute(internal_linkage) +#define _LIBCPP_INLINE_VISIBILITY __attribute__ ((internal_linkage)) +#else #define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__visibility__("hidden"), __always_inline__)) #endif +#endif #ifndef _LIBCPP_EXCEPTION_ABI #define _LIBCPP_EXCEPTION_ABI __attribute__ ((__visibility__("default"))) #endif #ifndef _LIBCPP_ALWAYS_INLINE -#define _LIBCPP_ALWAYS_INLINE __attribute__ ((__visibility__("hidden"), __always_inline__)) +#if __has_attribute(internal_linkage) +#define _LIBCPP_ALWAYS_INLINE __attribute__ ((internal_linkage)) +#else +#define _LIBCPP_ALWAYS_INLINE __attribute__ ((__visibility__("hidden"), __always_inline__)) +#endif #endif #if defined(__clang__)
Index: include/__config =================================================================== --- include/__config +++ include/__config @@ -233,15 +233,23 @@ #endif #ifndef _LIBCPP_INLINE_VISIBILITY +#if __has_attribute(internal_linkage) +#define _LIBCPP_INLINE_VISIBILITY __attribute__ ((internal_linkage)) +#else #define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__visibility__("hidden"), __always_inline__)) #endif +#endif #ifndef _LIBCPP_EXCEPTION_ABI #define _LIBCPP_EXCEPTION_ABI __attribute__ ((__visibility__("default"))) #endif #ifndef _LIBCPP_ALWAYS_INLINE -#define _LIBCPP_ALWAYS_INLINE __attribute__ ((__visibility__("hidden"), __always_inline__)) +#if __has_attribute(internal_linkage) +#define _LIBCPP_ALWAYS_INLINE __attribute__ ((internal_linkage)) +#else +#define _LIBCPP_ALWAYS_INLINE __attribute__ ((__visibility__("hidden"), __always_inline__)) +#endif #endif #if defined(__clang__)
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits