aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend.cpp
diff options
context:
space:
mode:
authorA1029384756 <hayden.gray104@gmail.com>2025-10-07 22:58:50 -0400
committerA1029384756 <hayden.gray104@gmail.com>2025-10-07 22:58:50 -0400
commitb55cf5f8f4510e09f090c9bf7e47e3b66b139de5 (patch)
treeb68486d1dc7ce64d8ba047b1b4a159d6c3a227d5 /src/llvm_backend.cpp
parent9ed125bcf65745c44c424ea4c86de7bb389c256b (diff)
llvm 14 fixed
Diffstat (limited to 'src/llvm_backend.cpp')
-rw-r--r--src/llvm_backend.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp
index ab0811085..1e8280a2e 100644
--- a/src/llvm_backend.cpp
+++ b/src/llvm_backend.cpp
@@ -2041,7 +2041,8 @@ gb_internal void lb_create_startup_runtime_generate_body(lbModule *m, lbProcedur
lb_end_procedure_body(dummy);
LLVMValueRef context_ptr = lb_find_or_generate_context_ptr(p).addr.value;
- LLVMBuildCall2(p->builder, raw_dummy_type, dummy->value, &context_ptr, 1, "");
+ LLVMValueRef cast_ctx = LLVMBuildBitCast(p->builder, context_ptr, LLVMPointerType(LLVMInt8TypeInContext(m->ctx), 0), "");
+ LLVMBuildCall2(p->builder, raw_dummy_type, dummy->value, &cast_ctx, 1, "");
} else {
lb_init_global_var(m, p, e, init_expr, var);
}