projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e3f54cb
)
util: Add unreachable() definition for clang compiler.
author
Krzysztof Raszkowski
<krzysztof.raszkowski@intel.com>
Fri, 30 Aug 2019 05:50:21 +0000
(
05:50
+0000)
committer
Jan Zielinski
<jan.zielinski@intel.com>
Fri, 30 Aug 2019 05:50:21 +0000
(
05:50
+0000)
Without unreachable() definition clang throw return-type error
in many places in mesa code.
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
src/util/macros.h
patch
|
blob
|
history
diff --git
a/src/util/macros.h
b/src/util/macros.h
index
f5f099b
..
55dd80c
100644
(file)
--- 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.
*/
-#if
def HAVE___BUILTIN_UNREACHABLE
+#if
defined(HAVE___BUILTIN_UNREACHABLE) || __has_builtin(__builtin_unreachable)
#define unreachable(str) \
do { \
assert(!str); \