mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-17 06:33:21 +00:00
Explicitly cast an expression to bool before handing it off to __builtin_expect.
Avoids surprises when someone uses LLVM_(UN)LIKELY with an integer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162877 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e160c53fbe
commit
4d69a8c8b2
@ -106,8 +106,8 @@
|
||||
#endif
|
||||
|
||||
#if (__GNUC__ >= 4)
|
||||
#define LLVM_LIKELY(EXPR) __builtin_expect((EXPR), true)
|
||||
#define LLVM_UNLIKELY(EXPR) __builtin_expect((EXPR), false)
|
||||
#define LLVM_LIKELY(EXPR) __builtin_expect((bool)(EXPR), true)
|
||||
#define LLVM_UNLIKELY(EXPR) __builtin_expect((bool)(EXPR), false)
|
||||
#else
|
||||
#define LLVM_LIKELY(EXPR) (EXPR)
|
||||
#define LLVM_UNLIKELY(EXPR) (EXPR)
|
||||
|
Loading…
x
Reference in New Issue
Block a user