[qfcc] Use available functions for dealloc use/def

I had written those use/def sets before creating the functions, and it
turns out I had goofed slightly with the def chaining.
This commit is contained in:
Bill Currie 2023-05-19 19:41:34 +09:00
parent 0c116b8ff0
commit 4b3b6d516a

View file

@ -2537,8 +2537,7 @@ search_for_super_dealloc (sblock_t *sblock)
for (statement_t *st = sblock->statements; st; st = st->next) { for (statement_t *st = sblock->statements; st; st = st->next) {
if (statement_is_return (st)) { if (statement_is_return (st)) {
op = pseudo_operand (super_dealloc, st->expr); op = pseudo_operand (super_dealloc, st->expr);
op->next = st->use; statement_add_use (st, op);
st->use = op;
continue; continue;
} }
if (!statement_is_call (st)) { if (!statement_is_call (st)) {
@ -2559,8 +2558,7 @@ search_for_super_dealloc (sblock_t *sblock)
selector_t *sel = get_selector (st->expr->e.branch.args); selector_t *sel = get_selector (st->expr->e.branch.args);
if (sel && strcmp (sel->name, "dealloc") == 0) { if (sel && strcmp (sel->name, "dealloc") == 0) {
op = pseudo_operand (super_dealloc, st->expr); op = pseudo_operand (super_dealloc, st->expr);
op->next = st->use; statement_add_def (st, op);
st->def = op;
super_dealloc_found++; super_dealloc_found++;
} }
} }