aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-06-11 21:24:33 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-06-11 21:24:33 +0200
commit0efd0f573157a70d3b936ab6e758da6a2806fa27 (patch)
treebcf8037baae157fba476d75c3f53c799078b14d9 /src
parent6d4f167b97306e0fb1691b9da653ec28e7094bc1 (diff)
Add some unreachables in places
Diffstat (limited to 'src')
-rw-r--r--src/codegen.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/codegen.c b/src/codegen.c
index ec7a3ef..fd9b0d2 100644
--- a/src/codegen.c
+++ b/src/codegen.c
@@ -27,8 +27,10 @@ codegen(struct ast ast, struct lexemes toks)
err("codegen: Expected constant declaration");
size_t expr = ast.kids[i].rhs;
- if (ast.kinds[expr] != ASTFN)
+ if (ast.kinds[expr] != ASTFN) {
assert(!"not implemented");
+ __builtin_unreachable();
+ }
size_t proto = ast.kids[expr].lhs, body = ast.kids[expr].rhs;
@@ -91,6 +93,7 @@ codegenstmt(LLVMBuilderRef builder, struct ast ast, struct lexemes toks,
}
assert(!"unreachable");
+ __builtin_unreachable();
}
size_t
@@ -108,4 +111,5 @@ codegenexpr(LLVMBuilderRef builder, struct ast ast, struct lexemes toks,
}
assert(!"unreachable");
+ __builtin_unreachable();
}