From e04365041f98fcdbc9f76349026fa0fa6c98b8e0 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 23 Jun 2024 21:35:58 +0200 Subject: Switch from arena_t to arena_t * --- src/codegen.c | 6 +++--- 1 file 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); -- cgit v1.2.3