1#ifndef INCLUDED_OOFUNCTIONATTRIBUTES_h
2#define INCLUDED_OOFUNCTIONATTRIBUTES_h
6#define GCC_ATTR(x) __attribute__(x)
14#define __has_feature(x) (0)
17#ifndef __has_attribute
18#define __has_attribute(x) (0)
21#ifndef __has_extension
22#define __has_extension(x) (0)
26#define OOINLINE inline
28#define OOINLINE static inline
32#define ALWAYS_INLINE_FUNC GCC_ATTR((always_inline))
34#define ALWAYS_INLINE_FUNC
37#define PURE_FUNC GCC_ATTR((pure))
38#define CONST_FUNC GCC_ATTR((const))
39#define NONNULL_FUNC GCC_ATTR((nonnull))
40#define DEPRECATED_FUNC GCC_ATTR((deprecated))
41#define NO_RETURN_FUNC GCC_ATTR((noreturn))
42#define NO_INLINE_FUNC GCC_ATTR((noinline))
44#define INLINE_PURE_FUNC ALWAYS_INLINE_FUNC PURE_FUNC
45#define INLINE_CONST_FUNC ALWAYS_INLINE_FUNC CONST_FUNC
47#if __has_extension(attribute_deprecated_with_message)
48#define DEPRECATED_MSG(msg) __attribute__((deprecated(msg)))
50#define DEPRECATED_MSG(msg) DEPRECATED_FUNC
54#define DEPRECATED_METHOD(msg) DEPRECATED_MSG(msg)
57#define DEPRECATED_METHOD(msg)
61#define EXPECT(x) __builtin_expect((x), 1)
62#define EXPECT_NOT(x) __builtin_expect((x), 0)
65#define EXPECT_NOT(x) (x)
69#if __has_feature(attribute_ns_returns_retained)
70#define OO_RETURNS_RETAINED __attribute__((ns_returns_retained))
72#define OO_RETURNS_RETAINED
77#if __has_feature(attribute_ns_consumed)
78#define OO_NS_CONSUMED __attribute__((ns_consumed))
85#if __has_feature(__builtin_unreachable)
86#define OO_UNREACHABLE() __builtin_unreachable()
88#define OO_UNREACHABLE() \
104#if __has_attribute(format)
105#define OO_TAKES_FORMAT_STRING(stringIndex, firstToCheck) __attribute__((format(NSString, stringIndex, firstToCheck)))
107#define OO_TAKES_FORMAT_STRING(stringIndex, firstToCheck)
id OOConsumeReference(id OO_NS_CONSUMED value)
#define ALWAYS_INLINE_FUNC