diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-06-23 21:35:58 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-06-23 21:35:58 +0200 |
commit | e04365041f98fcdbc9f76349026fa0fa6c98b8e0 (patch) | |
tree | 6b889adcaddd141bf671975ecf060b2d2b9e9bea /src | |
parent | 17ef13f81050eb7086bd80e00a82c4c2cb6a3c9b (diff) |
Switch from arena_t to arena_t *
Diffstat (limited to 'src')
-rw-r--r-- | src/codegen.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/codegen.c b/src/codegen.c index 3bb3155..70f27db 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -20,7 +20,7 @@ /* A context structure we can pass to all the codegen functions just so they have easy access to everything */ struct cgctx { - arena_t a; + arena_t *a; scratch_t *s; LLVMContextRef ctx; LLVMModuleRef mod; @@ -43,7 +43,7 @@ codegen(const char *file, mpq_t *folds, scope_t *scps, type_t *types, char *triple = LLVMGetDefaultTargetTriple(); struct cgctx ctx; - ctx.a = NULL; + ctx.a = &(arena_t){0}; ctx.s = &(scratch_t){0}; ctx.namespace.p = NULL; ctx.ctx = LLVMContextCreate(); @@ -55,7 +55,7 @@ codegen(const char *file, mpq_t *folds, scope_t *scps, type_t *types, codegenast(ctx, folds, types, ast, aux, toks); - arena_free(&ctx.a); + arena_free(ctx.a); tmpfree(ctx.s); LLVMDisposeBuilder(ctx.bob); |