diff options
| author | 2025-11-24 12:50:41 +0100 | |
|---|---|---|
| committer | 2025-11-24 12:51:38 +0100 | |
| commit | 9dab543399fd67085225e165d1e48deab7731180 (patch) | |
| tree | e8b374be81f541c00743116e94ab33f904150cd8 /c/builtin.c | |
| parent | 8ca8776f3ad526745d85adac942f0e2b6951c5c8 (diff) | |
c: create dummy unreachable block after trap
Reverts 9abe27f6712. This simplies expr codegen, otherwise
would manually have to check `fn->curblk != NULL` repeatedly.
Later passes will easily delete those unreachable blocks
Diffstat (limited to 'c/builtin.c')
| -rw-r--r-- | c/builtin.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/c/builtin.c b/c/builtin.c index 29a3191..9a8a12b 100644 --- a/c/builtin.c +++ b/c/builtin.c @@ -83,6 +83,7 @@ static union ref trap_comp(struct function *fn, struct expr *ex, bool discard) { puttrap(fn); + useblk(fn, newblk(fn)); /* unreachable block, but simplifies expr codegen */ return NOREF; } |