aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2021-04-17 14:43:56 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2021-03-10 22:42:45 +0100
commit929b10d66002e85202f446ed7e0ad8ec4c01f637 (patch)
treea894453c272eb0b9eb27833dc111afa9f4717ce5
parent2cd6d34e815a7442b0b113f395504131b3a92e77 (diff)
downloadsparse-929b10d66002e85202f446ed7e0ad8ec4c01f637.tar.gz
no needs to use MARK_CURRENT_DELETED() for multi-jumps
MARK_CURRENT_DELETED() was added for the case(s) where an element must be removed from the list but the address of the other elements must not be changed. In this case of effectively removing the element from it list, the element is 'marked' as deleted in the list and the list walking macros will later take this in account. However, this is never needed for multi-jumps. So, use the usual DELETE_CURRENT_PTR() for them. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r--simplify.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/simplify.c b/simplify.c
index 9e3514d8..30d053f7 100644
--- a/simplify.c
+++ b/simplify.c
@@ -2651,7 +2651,7 @@ static int simplify_cgoto(struct instruction *insn)
continue;
remove_bb_from_list(&jmp->target->parents, bb, 1);
remove_bb_from_list(&bb->children, jmp->target, 1);
- MARK_CURRENT_DELETED(jmp);
+ DELETE_CURRENT_PTR(jmp);
} END_FOR_EACH_PTR(jmp);
kill_use(&insn->src);
insn->opcode = OP_BR;