ir.c
// Delete an instruction inside a linked list. It cannot be the first instruction.
Delete an instruction inside a linked list. It cannot be the first instruction.
Delete an instruction inside a linked list . It cannot be the first instruction .
Tac *delete_instruction(Tac *tac) {
    if (!tac->prev) panic("Attempt to delete the first instruction");
    if (tac->next && tac->next->label) panic("Deleting an instruction would obliterate the next label");
    tac->prev->next = tac->next;
    if (tac->next) tac->next->prev = tac->prev;
    tac->next->label = tac->label;
    return tac->next;
}
Tac * delete_instruction ( Tac * tac ) { if ( ! tac -> prev ) panic ( " " ) ; if ( tac -> next && tac -> next -> label ) panic ( " " ) ; tac -> prev -> next = tac -> next ; if ( tac -> next ) tac -> next -> prev = tac -> prev ; tac -> next -> label = tac -> label ; return tac -> next ; }
Delete an instruction inside a linked list.
Delete an instruction inside a linked list .