extern void Assert(
const char *file,
int line,
- const char *expression);
+ const char *expression) __attribute__((noinline));
+
+#if CONFIG_NO_PANIC_STRINGS
+#define Assert(file, line, ex) (Assert)("", line, "")
+#endif
+
__END_DECLS
#if MACH_ASSERT
#define assert(ex) \
- ((ex) ? (void)0 : Assert(__FILE__, __LINE__, # ex))
-#define assert_static(x) assert(x)
+ (__builtin_expect(!!((long)(ex)), 1L) ? (void)0 : Assert(__FILE__, __LINE__, # ex))
+#define assert_static(ex) _Static_assert((ex), #ex)
#define __assert_only
#else /* MACH_ASSERT */
#define assert(ex) ((void)0)
-#define assert_static(ex) do {} while (0)
+#define assert_static(ex) _Static_assert((ex), #ex)
#define __assert_only __unused