util: remove now unused debug_assert

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17403>
This commit is contained in:
Marek Olšák 2022-07-07 13:30:44 -04:00 committed by Marge Bot
parent c9ca8abe4f
commit b8397991c8
2 changed files with 0 additions and 38 deletions

View File

@ -327,16 +327,6 @@ debug_get_flags_option(const char *name,
}
void
_debug_assert_fail(const char *expr, const char *file, unsigned line,
const char *function)
{
_debug_printf("%s:%u:%s: Assertion `%s' failed.\n",
file, line, function, expr);
os_abort();
}
const char *
debug_dump_enum(const struct debug_named_value *names,
unsigned long value)

View File

@ -204,34 +204,6 @@ debug_get_num_option(const char *name, long dfault);
void
debug_get_version_option(const char *name, unsigned *major, unsigned *minor);
#ifdef _MSC_VER
__declspec(noreturn)
#endif
void _debug_assert_fail(const char *expr,
const char *file,
unsigned line,
const char *function)
#if defined(__GNUC__) && !defined(DEBUG)
__attribute__((noreturn))
#endif
;
/**
* Assert macro
*
* Do not expect that the assert call terminates -- errors must be handled
* regardless of assert behavior.
*
* For non debug builds the assert macro will expand to a no-op, so do not
* call functions with side effects in the assert expression.
*/
#ifndef NDEBUG
#define debug_assert(expr) ((expr) ? (void)0 : _debug_assert_fail(#expr, __FILE__, __LINE__, __FUNCTION__))
#else
#define debug_assert(expr) (void)(0 && (expr))
#endif
/**
* Output the current function name.