summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKrzysztof Raszkowski <[email protected]>2019-08-30 05:50:21 +0000
committerJan Zielinski <[email protected]>2019-08-30 05:50:21 +0000
commit8be51061eca39a766f5304198dc6f42296232b22 (patch)
tree3f5a452ced04bd69130d9e491a6aef5591666b6f /src
parente3f54cb0c1845de20d63ca88006b6fcbe19ab9ea (diff)
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 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/util/macros.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/macros.h b/src/util/macros.h
index f5f099bb594..55dd80c870b 100644
--- a/src/util/macros.h
+++ b/src/util/macros.h
@@ -72,7 +72,7 @@
* Unreachable macro. Useful for suppressing "control reaches end of non-void
* function" warnings.
*/
-#ifdef HAVE___BUILTIN_UNREACHABLE
+#if defined(HAVE___BUILTIN_UNREACHABLE) || __has_builtin(__builtin_unreachable)
#define unreachable(str) \
do { \
assert(!str); \