aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_debug.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-09-07 23:47:33 +0100
committergingerBill <bill@gingerbill.org>2022-09-07 23:47:33 +0100
commit268fb22bca8fa81713c1439ff1ce8aed54df8cf0 (patch)
treed939eb78d85207ab1f89b0cbd16d768ddd2a2d64 /src/llvm_backend_debug.cpp
parent37e23a19b516befeb8e4f6df5b506ac93dbe81bf (diff)
Use `llvm.dbg.declare` for procedure parameters rather than `llvm.dbg.value`
Diffstat (limited to 'src/llvm_backend_debug.cpp')
-rw-r--r--src/llvm_backend_debug.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/llvm_backend_debug.cpp b/src/llvm_backend_debug.cpp
index 29e074473..ea7322297 100644
--- a/src/llvm_backend_debug.cpp
+++ b/src/llvm_backend_debug.cpp
@@ -1042,7 +1042,8 @@ void lb_add_debug_param_variable(lbProcedure *p, LLVMValueRef ptr, Type *type, T
// NOTE(bill, 2022-02-01): For parameter values, you must insert them at the end of the decl block
// The reason is that if the parameter is at index 0 and a pointer, there is not such things as an
// instruction "before" it.
- LLVMDIBuilderInsertDbgValueAtEnd(m->debug_builder, storage, var_info, llvm_expr, llvm_debug_loc, block->block);
+ LLVMDIBuilderInsertDeclareAtEnd(m->debug_builder, storage, var_info, llvm_expr, llvm_debug_loc, block->block);
+ // LLVMDIBuilderInsertDbgValueAtEnd(m->debug_builder, storage, var_info, llvm_expr, llvm_debug_loc, block->block);
}