Don't null the def pointer when freeing a temp.

It makes debugging more difficult.
This commit is contained in:
Bill Currie 2012-11-19 11:02:31 +09:00
parent 3cffeb7b66
commit e70b59b925
2 changed files with 3 additions and 3 deletions

View file

@ -178,10 +178,8 @@ use_tempop (operand_t *op, expr_t *expr)
op = op->o.alias;
if (!op || op->op_type != op_temp)
return;
if (--op->o.tempop.users == 0) {
if (--op->o.tempop.users == 0)
free_temp_def (op->o.tempop.def);
op->o.tempop.def = 0;
}
if (op->o.tempop.users <= -1)
bug (expr, "temp users went negative: %s", operand_string (op));
}

View file

@ -184,6 +184,8 @@ print_operand (operand_t *op)
break;
case op_temp:
printf ("tmp (%s) %p", pr_type_name[op->type], op);
if (op->o.tempop.def)
printf (" %s", op->o.tempop.def->name);
break;
case op_pointer:
printf ("ptr (%s)[%d]",