4 #ifndef _UTIL_ASSERT_LEVEL
5 #define _UTIL_ASSERT_LEVEL 1
15 static inline void __attribute__((always_inline))
16 do_assert(const char *file, int line, bool condition, int level)
18 void level_must_be_const();
20 if (!__builtin_constant_p(level))
21 level_must_be_const();
23 if (level <= _UTIL_ASSERT_LEVEL && __builtin_expect(!condition, 0))
24 assert_failure(file, line);
28 #define assertl(cond, level) (::Assert::do_assert(__FILE__, __LINE__, cond, level))
29 #define BUG() assertl(0, ::Assert::Always)