Add LIKELY as suggested by Philippe.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14191
This commit is contained in:
Florian Krohm 2014-07-25 08:38:02 +00:00
parent 9a5cacfa97
commit dbeb165518
2 changed files with 3 additions and 3 deletions

View File

@ -77,7 +77,7 @@ extern void ML_(am_assert_fail) ( const HChar* expr,
const HChar* fn );
#define aspacem_assert(expr) \
((void) ((expr) ? 0 : \
((void) (LIKELY(expr) ? 0 : \
(ML_(am_assert_fail)(#expr, \
__FILE__, __LINE__, \
__PRETTY_FUNCTION__))))

View File

@ -35,11 +35,11 @@
/* ---------------------------------------------------------------------
Assert machinery for use in this file. VG_(assert) cannot be called
Assert machinery for use in this file. vg_assert cannot be called
here due to cyclic dependencies.
------------------------------------------------------------------ */
#define libcbase_assert(expr) \
((void) ((expr) ? 0 : \
((void) (LIKELY(expr) ? 0 : \
(ML_(libcbase_assert_fail)(#expr, \
__FILE__, __LINE__, \
__PRETTY_FUNCTION__))))