dynamorio/core/ir/instrlist.c
/* removes "inst" from the instrlist_t it currently belongs to */
removes "inst" from the instrlist_t it currently belongs to
removes " inst " from the instrlist_t it currently belongs to
void
instrlist_remove(instrlist_t *ilist, instr_t *inst)
{
    if (instr_get_prev(inst))
        instr_set_next(instr_get_prev(inst), instr_get_next(inst));
    else
        ilist->first = instr_get_next(inst);
    if (instr_get_next(inst))
        instr_set_prev(instr_get_next(inst), instr_get_prev(inst));
    else
        ilist->last = instr_get_prev(inst);
    instr_set_prev(inst, NULL);
    instr_set_next(inst, NULL);
}
void instrlist_remove ( instrlist_t * ilist , instr_t * inst ) { if ( instr_get_prev ( inst ) ) instr_set_next ( instr_get_prev ( inst ) , instr_get_next ( inst ) ) ; else ilist -> first = instr_get_next ( inst ) ; if ( instr_get_next ( inst ) ) instr_set_prev ( instr_get_next ( inst ) , instr_get_prev ( inst ) ) ; else ilist -> last = instr_get_prev ( inst ) ; instr_set_prev ( inst , NULL ) ; instr_set_next ( inst , NULL ) ; }
removes "inst" from the instrlist_t it currently belongs to
removes " inst " from the instrlist_t it currently belongs to