mirror of https://github.com/PCSX2/pcsx2.git
Use __builtin_unreachable where possible for non-msvc
This commit is contained in:
parent
7568f6f2ec
commit
f542c7232e
|
@ -54,14 +54,14 @@ extern "C" unsigned __int64 __xgetbv(int);
|
|||
# ifdef _MSC_VER
|
||||
# define jASSUME(exp) (__assume(exp))
|
||||
# else
|
||||
# define jASSUME(exp) ((void) sizeof(exp))
|
||||
# define jASSUME(exp) do { if(!(exp)) __builtin_unreachable(); } while(0)
|
||||
# endif
|
||||
# else
|
||||
# define jBREAKPOINT() __debugbreak();
|
||||
# ifdef wxASSERT
|
||||
# define jASSUME(exp) wxASSERT(exp)
|
||||
# else
|
||||
# define jASSUME(exp) do { if(exp) ; else jBREAKPOINT(); } while(0);
|
||||
# define jASSUME(exp) do { if(!(exp)) jBREAKPOINT(); } while(0)
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -204,7 +204,7 @@ using namespace std;
|
|||
#include "assert.h"
|
||||
#define __forceinline __inline__ __attribute__((always_inline,unused))
|
||||
// #define __forceinline __inline__ __attribute__((__always_inline__,__gnu_inline__))
|
||||
#define __assume(c) if (!(c)) __builtin_unreachable()
|
||||
#define __assume(c) do { if (!(c)) __builtin_unreachable(); } while(0)
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue