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:

committed by
Jan Zielinski

parent
e3f54cb0c1
commit
8be51061ec
@@ -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); \
|
||||||
|
Reference in New Issue
Block a user