mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
util: Implement unreachable for MSVC using __assume
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>
This commit is contained in:
parent
1ca88aa582
commit
6f3b8bb747
1 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue