util: Add unreachable() definition for clang compiler.

Without unreachable() definition clang throw return-type error
in many places in mesa code.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
This commit is contained in:
Krzysztof Raszkowski
2019-08-30 05:50:21 +00:00
committed by Jan Zielinski
parent e3f54cb0c1
commit 8be51061ec

View File

@@ -72,7 +72,7 @@
* Unreachable macro. Useful for suppressing "control reaches end of non-void * Unreachable macro. Useful for suppressing "control reaches end of non-void
* function" warnings. * function" warnings.
*/ */
#ifdef HAVE___BUILTIN_UNREACHABLE #if defined(HAVE___BUILTIN_UNREACHABLE) || __has_builtin(__builtin_unreachable)
#define unreachable(str) \ #define unreachable(str) \
do { \ do { \
assert(!str); \ assert(!str); \