projects
/
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 f5f099bb594443f25233b195e04bd148eefeeab6..55dd80c870b3c6b1c9c0262bf9b23cc93118a260 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); \