util/Compiler.h: remove unused macros
This commit is contained in:
parent
42f6a0441c
commit
18c3c2118d
|
@ -51,72 +51,22 @@
|
||||||
|
|
||||||
/* GCC 4.x */
|
/* GCC 4.x */
|
||||||
|
|
||||||
#define gcc_const __attribute__((const))
|
|
||||||
#define gcc_may_alias __attribute__((may_alias))
|
|
||||||
#define gcc_malloc __attribute__((malloc))
|
#define gcc_malloc __attribute__((malloc))
|
||||||
#define gcc_packed __attribute__((packed))
|
|
||||||
#define gcc_printf(a,b) __attribute__((format(printf, a, b)))
|
#define gcc_printf(a,b) __attribute__((format(printf, a, b)))
|
||||||
#define gcc_pure __attribute__((pure))
|
#define gcc_pure __attribute__((pure))
|
||||||
#define gcc_sentinel __attribute__((sentinel))
|
|
||||||
|
|
||||||
#define gcc_nonnull(...) __attribute__((nonnull(__VA_ARGS__)))
|
|
||||||
#define gcc_nonnull_all __attribute__((nonnull))
|
|
||||||
#define gcc_returns_nonnull __attribute__((returns_nonnull))
|
|
||||||
#define gcc_returns_twice __attribute__((returns_twice))
|
|
||||||
|
|
||||||
#define gcc_likely(x) __builtin_expect (!!(x), 1)
|
|
||||||
#define gcc_unlikely(x) __builtin_expect (!!(x), 0)
|
|
||||||
|
|
||||||
#define gcc_visibility_hidden __attribute__((visibility("hidden")))
|
|
||||||
#define gcc_visibility_default __attribute__((visibility("default")))
|
#define gcc_visibility_default __attribute__((visibility("default")))
|
||||||
|
|
||||||
#define gcc_noinline __attribute__((noinline))
|
|
||||||
#define gcc_always_inline __attribute__((always_inline))
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
/* generic C compiler */
|
/* generic C compiler */
|
||||||
|
|
||||||
#define gcc_const
|
|
||||||
#define gcc_may_alias
|
|
||||||
#define gcc_malloc
|
#define gcc_malloc
|
||||||
#define gcc_packed
|
|
||||||
#define gcc_printf(a,b)
|
#define gcc_printf(a,b)
|
||||||
#define gcc_pure
|
#define gcc_pure
|
||||||
#define gcc_sentinel
|
|
||||||
|
|
||||||
#define gcc_nonnull(...)
|
|
||||||
#define gcc_nonnull_all
|
|
||||||
#define gcc_returns_nonnull
|
|
||||||
#define gcc_returns_twice
|
|
||||||
|
|
||||||
#define gcc_likely(x) (x)
|
|
||||||
#define gcc_unlikely(x) (x)
|
|
||||||
|
|
||||||
#define gcc_visibility_hidden
|
|
||||||
#define gcc_visibility_default
|
#define gcc_visibility_default
|
||||||
|
|
||||||
#define gcc_noinline
|
|
||||||
#define gcc_always_inline inline
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if CLANG_OR_GCC_VERSION(4,3)
|
|
||||||
|
|
||||||
#define gcc_hot __attribute__((hot))
|
|
||||||
#define gcc_cold __attribute__((cold))
|
|
||||||
|
|
||||||
#else /* ! GCC_UNUSED >= 40300 */
|
|
||||||
|
|
||||||
#define gcc_hot
|
|
||||||
#define gcc_cold
|
|
||||||
|
|
||||||
#endif /* ! GCC_UNUSED >= 40300 */
|
|
||||||
|
|
||||||
#if GCC_CHECK_VERSION(4,6)
|
|
||||||
#define gcc_flatten __attribute__((flatten))
|
|
||||||
#else
|
|
||||||
#define gcc_flatten
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if GCC_CHECK_VERSION(7,0)
|
#if GCC_CHECK_VERSION(7,0)
|
||||||
|
@ -138,11 +88,6 @@
|
||||||
#define gcc_restrict
|
#define gcc_restrict
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __has_feature
|
|
||||||
// define dummy macro for non-clang compilers
|
|
||||||
#define __has_feature(x) 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__GNUC__) || defined(__clang__)
|
#if defined(__GNUC__) || defined(__clang__)
|
||||||
#define gcc_unreachable() __builtin_unreachable()
|
#define gcc_unreachable() __builtin_unreachable()
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue