util: Add ATTRIBUTE_RETURNS_NONNULL.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Matt Turner
2016-05-13 13:17:02 -07:00
parent 40c6d54e76
commit 377ab2f2d7
3 changed files with 14 additions and 0 deletions

View File

@@ -154,6 +154,12 @@ do { \
#define ATTRIBUTE_PURE
#endif
#ifdef HAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL
#define ATTRIBUTE_RETURNS_NONNULL __attribute__((__returns_nonnull__))
#else
#define ATTRIBUTE_RETURNS_NONNULL
#endif
#ifdef __cplusplus
/**
* Macro function that evaluates to true if T is a trivially