Integrate numerous debug fixes from #1877

This commit is contained in:
gingerBill
2022-07-18 12:49:29 +01:00
parent 0b0c6da8b0
commit 6c7e5748a8
5 changed files with 49 additions and 35 deletions

View File

@@ -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);