aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_opt.cpp
diff options
context:
space:
mode:
authorLaytan Laats <laytanlaats@hotmail.com>2024-07-24 02:43:53 +0200
committerLaytan Laats <laytanlaats@hotmail.com>2024-07-24 02:43:53 +0200
commitf6488383d799241ae31cd85706dd8289b475b24e (patch)
tree6f476a684815188d5bd06b4de7d50aca57b3e2c8 /src/llvm_backend_opt.cpp
parentfc2e31fcd03b2dfd0258d0546e4f023f9e099b27 (diff)
fix instrumentation features on LLVM versions with typed pointers
Fixes #3970
Diffstat (limited to 'src/llvm_backend_opt.cpp')
-rw-r--r--src/llvm_backend_opt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/llvm_backend_opt.cpp b/src/llvm_backend_opt.cpp
index e6ccc9a57..7fe1359b4 100644
--- a/src/llvm_backend_opt.cpp
+++ b/src/llvm_backend_opt.cpp
@@ -396,7 +396,7 @@ gb_internal LLVMValueRef lb_run_instrumentation_pass_insert_call(lbProcedure *p,
lbValue cc = lb_find_procedure_value_from_entity(m, entity);
LLVMValueRef args[3] = {};
- args[0] = p->value;
+ args[0] = LLVMConstPointerCast(p->value, lb_type(m, t_rawptr));
if (is_arch_wasm()) {
args[1] = LLVMConstPointerNull(lb_type(m, t_rawptr));