Instead of a cryptic 'Assertion "ctx->ref == 0" failed' we report
'isl_ctx freed, but some objects still reference it'.
Signed-off-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
{
if (!ctx)
return;
- isl_assert(ctx, ctx->ref == 0, return);
+ if (ctx->ref != 0)
+ isl_die(ctx, isl_error_invalid,
+ "isl_ctx freed, but some objects still reference it",
+ return);
+
isl_hash_table_clear(&ctx->id_table);
isl_blk_clear_cache(ctx);
isl_int_clear(ctx->zero);