projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ca88aa
)
util: Implement unreachable for MSVC using __assume
author
Ian Romanick
<ian.d.romanick@intel.com>
Wed, 22 Oct 2014 23:41:41 +0000
(16:41 -0700)
committer
Ian Romanick
<ian.d.romanick@intel.com>
Wed, 5 Nov 2014 17:36:04 +0000
(09:36 -0800)
Based on the description of __assume at:
http://msdn.microsoft.com/en-us/library/1b3fsfxw.aspx
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/util/macros.h
patch
|
blob
|
history
diff --git
a/src/util/macros.h
b/src/util/macros.h
index ff37a7d63e6dce4ab660524d114703f5cd4965ff..da5daff9bf8283e6796f85420dc1b170c95a3e24 100644
(file)
--- a/
src/util/macros.h
+++ b/
src/util/macros.h
@@
-69,6
+69,12
@@
do { \
assert(!str); \
__builtin_unreachable(); \
} while (0)
+#elif _MSC_VER >= 1200
+#define unreachable(str) \
+do { \
+ assert(!str); \
+ __assume(0); \
+} while (0)
#endif
#ifndef unreachable