aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_debug.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-07-18 12:49:29 +0100
committergingerBill <bill@gingerbill.org>2022-07-18 12:49:29 +0100
commit6c7e5748a8ee80b01b99fe41192d4aac32651849 (patch)
tree41f8a0f243010e561e81a2f8f437b5ff0f7f873b /src/llvm_backend_debug.cpp
parent0b0c6da8b0a5f2d31760d579aceae1eb5e8d6671 (diff)
Integrate numerous debug fixes from #1877
Diffstat (limited to 'src/llvm_backend_debug.cpp')
-rw-r--r--src/llvm_backend_debug.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/llvm_backend_debug.cpp b/src/llvm_backend_debug.cpp
index 45a868581..207164c63 100644
--- a/src/llvm_backend_debug.cpp
+++ b/src/llvm_backend_debug.cpp
@@ -969,7 +969,7 @@ void lb_add_debug_local_variable(lbProcedure *p, LLVMValueRef ptr, Type *type, T
);
LLVMValueRef storage = ptr;
- LLVMBasicBlockRef block = p->decl_block->block;
+ LLVMBasicBlockRef block = p->curr_block->block;
LLVMMetadataRef llvm_debug_loc = lb_debug_location_from_token_pos(p, token.pos);
LLVMMetadataRef llvm_expr = LLVMDIBuilderCreateExpression(m->debug_builder, nullptr, 0);
lb_set_llvm_metadata(m, ptr, llvm_expr);