Go to the documentation of this file. 28 #if defined __GNUC__ && defined __GNUC_MINOR__ 30 #define __GNUC_PREREQ(maj, min) \ 31 ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) 34 #define __GNUC_PREREQ(maj, min) 0 39 #ifndef __CLANG_PREREQ 40 #if defined __clang__ && defined __clang_major__ && defined __clang_minor__ 42 #define __CLANG_PREREQ(maj, min) \ 43 ((__clang_major__ << 16) + __clang_minor__ >= ((maj) << 16) + (min)) 46 #define __CLANG_PREREQ(maj, min) 0 50 #if defined(__has_builtin) 51 #define FOLLY_HAS_BUILTIN(...) __has_builtin(__VA_ARGS__) 53 #define FOLLY_HAS_BUILTIN(...) 0 56 #if defined(__has_feature) 57 #define FOLLY_HAS_FEATURE(...) __has_feature(__VA_ARGS__) 59 #define FOLLY_HAS_FEATURE(...) 0 74 #if FOLLY_HAS_FEATURE(address_sanitizer) || __SANITIZE_ADDRESS__ 75 #define FOLLY_SANITIZE_ADDRESS 1 81 #ifdef FOLLY_SANITIZE_ADDRESS 82 #if defined(__clang__) 83 #if __has_attribute(__no_sanitize__) 84 #define FOLLY_DISABLE_ADDRESS_SANITIZER \ 85 __attribute__((__no_sanitize__("address"), __noinline__)) 86 #elif __has_attribute(__no_address_safety_analysis__) 87 #define FOLLY_DISABLE_ADDRESS_SANITIZER \ 88 __attribute__((__no_address_safety_analysis__, __noinline__)) 89 #elif __has_attribute(__no_sanitize_address__) 90 #define FOLLY_DISABLE_ADDRESS_SANITIZER \ 91 __attribute__((__no_sanitize_address__, __noinline__)) 93 #elif defined(__GNUC__) 94 #define FOLLY_DISABLE_ADDRESS_SANITIZER \ 95 __attribute__((__no_address_safety_analysis__, __noinline__)) 98 #ifndef FOLLY_DISABLE_ADDRESS_SANITIZER 99 #define FOLLY_DISABLE_ADDRESS_SANITIZER 104 #if FOLLY_HAS_FEATURE(thread_sanitizer) || __SANITIZE_THREAD__ 105 #define FOLLY_SANITIZE_THREAD 1 112 #if defined(FOLLY_SANITIZE_ADDRESS) || defined(FOLLY_SANITIZE_THREAD) 113 #define FOLLY_SANITIZE 1 117 #define FOLLY_DISABLE_UNDEFINED_BEHAVIOR_SANITIZER(...) \ 118 __attribute__((no_sanitize(__VA_ARGS__))) 120 #define FOLLY_DISABLE_UNDEFINED_BEHAVIOR_SANITIZER(...) 121 #endif // FOLLY_SANITIZE 126 #if defined(__GNUC__) 127 #if __GNUC_PREREQ(4, 9) 128 #define FOLLY_EXPORT [[gnu::visibility("default")]] 130 #define FOLLY_EXPORT __attribute__((__visibility__("default"))) 138 #define FOLLY_NOINLINE __declspec(noinline) 139 #elif defined(__clang__) || defined(__GNUC__) 140 #define FOLLY_NOINLINE __attribute__((__noinline__)) 142 #define FOLLY_NOINLINE 147 #define FOLLY_ALWAYS_INLINE __forceinline 148 #elif defined(__clang__) || defined(__GNUC__) 149 #define FOLLY_ALWAYS_INLINE inline __attribute__((__always_inline__)) 151 #define FOLLY_ALWAYS_INLINE inline 156 #define FOLLY_ATTR_VISIBILITY_HIDDEN 157 #elif defined(__clang__) || defined(__GNUC__) 158 #define FOLLY_ATTR_VISIBILITY_HIDDEN __attribute__((__visibility__("hidden"))) 160 #define FOLLY_ATTR_VISIBILITY_HIDDEN 164 #if FOLLY_HAVE_WEAK_SYMBOLS 165 #define FOLLY_ATTR_WEAK __attribute__((__weak__)) 167 #define FOLLY_ATTR_WEAK 171 #ifndef FOLLY_MICROSOFT_ABI_VER 173 #define FOLLY_MICROSOFT_ABI_VER _MSC_VER