diff options
| author | Baitinq <[email protected]> | 2025-06-06 00:30:22 +0200 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2025-06-06 00:30:22 +0200 |
| commit | abc13761fc76de30203b72e13aa8fa0764a673b8 (patch) | |
| tree | b88d091261d60d5468576686abad518899bc1883 /src/bootstrap/codegen.src | |
| parent | Feature: Support declaring type aliases (diff) | |
| download | interpreter-abc13761fc76de30203b72e13aa8fa0764a673b8.tar.gz interpreter-abc13761fc76de30203b72e13aa8fa0764a673b8.tar.bz2 interpreter-abc13761fc76de30203b72e13aa8fa0764a673b8.zip | |
Bootstrap: Codegen: Create bindings for llvm types
Diffstat (limited to 'src/bootstrap/codegen.src')
| -rw-r--r-- | src/bootstrap/codegen.src | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bootstrap/codegen.src b/src/bootstrap/codegen.src index 5a08369..f9ab478 100644 --- a/src/bootstrap/codegen.src +++ b/src/bootstrap/codegen.src @@ -1,9 +1,9 @@ import "llvm.src"; let codegen = struct { - llvm_module: *void, - llvm_context: *void, - builder: *void, + llvm_module: LLVMModuleRef, + llvm_context: LLVMContextRef, + builder: LLVMBuilderRef, arena: *arena, }; @@ -71,7 +71,7 @@ let codegen_compile = (c: *codegen) => i64 { /* Generate code */ let triple = LLVMGetDefaultTargetTriple(); - let target_ref = cast(**void, arena_alloc((*c).arena, sizeof(**void))); + let target_ref = cast(*LLVMTargetRef, arena_alloc((*c).arena, sizeof(*LLVMTargetRef))); let message = cast(**i8, null); let result = LLVMGetTargetFromTriple(triple, target_ref, message); if result != 0 { |