[core] codegen/expr: Fix assertions not generated for -O0

This commit is contained in:
David Mak 2024-08-20 11:29:19 +08:00
parent e7c42f9472
commit f8bd639dbe
1 changed files with 1 additions and 1 deletions

View File

@ -2195,7 +2195,7 @@ pub fn gen_cmpop_expr_with_values<'ctx, G: CodeGenerator>(
gen_list_cmpop(generator, ctx)? gen_list_cmpop(generator, ctx)?
} else if [left_ty, right_ty].iter().any(|ty| matches!(&*ctx.unifier.get_ty_immutable(*ty), TypeEnum::TVar { .. })) { } else if [left_ty, right_ty].iter().any(|ty| matches!(&*ctx.unifier.get_ty_immutable(*ty), TypeEnum::TVar { .. })) {
if ctx.registry.llvm_options.opt_level != OptimizationLevel::None { if ctx.registry.llvm_options.opt_level == OptimizationLevel::None {
ctx.make_assert( ctx.make_assert(
generator, generator,
ctx.ctx.bool_type().const_all_ones(), ctx.ctx.bool_type().const_all_ones(),