harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 05eaf97669316cbcee41a9a81e06797d36349d9d
parent 3899d4bd6f27663d8256cf48209dbe788bf241ce
Author: Drew DeVault <sir@cmpwn.com>
Date:   Sat, 14 Aug 2021 14:30:30 +0200

gen: break on missing subtype

I don't remember why this was done in vN, but it fixes toothbrush. This
might come back to bite us but we'll probably rewrite this code for the
match overhaul anyway.

Signed-off-by: Drew DeVault <sir@cmpwn.com>

Diffstat:
Msrc/gen.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gen.c b/src/gen.c @@ -1864,7 +1864,7 @@ gen_nested_match_tests(struct gen_context *ctx, struct gen_value object, struct qbe_value bsubtype = mklabel(ctx, &lsubtype, "subtype.%d"); test = tagged_select_subtype(subtype, _case->type); if (!test) { - abort(); // Invariant + break; } struct qbe_value id = constw(test->id);