mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-28 16:21:48 -07:00
fix direct proc args debug info
This commit is contained in:
@@ -597,16 +597,7 @@ gb_internal void lb_begin_procedure_body(lbProcedure *p) {
|
||||
lbValue ptr = lb_address_from_load_or_generate_local(p, param);
|
||||
GB_ASSERT(LLVMIsAAllocaInst(ptr.value));
|
||||
lb_add_entity(p->module, e, ptr);
|
||||
|
||||
lbBlock *block = p->decl_block;
|
||||
if (original_value != value) {
|
||||
block = p->curr_block;
|
||||
}
|
||||
LLVMValueRef debug_storage_value = value;
|
||||
if (original_value != value && LLVMIsALoadInst(value)) {
|
||||
debug_storage_value = LLVMGetOperand(value, 0);
|
||||
}
|
||||
lb_add_debug_param_variable(p, debug_storage_value, e->type, e->token, param_index+1, block, arg_type->kind);
|
||||
lb_add_debug_param_variable(p, ptr.value, e->type, e->token, param_index+1, p->curr_block);
|
||||
}
|
||||
} else if (arg_type->kind == lbArg_Indirect) {
|
||||
if (e->token.string.len != 0 && !is_blank_ident(e->token.string)) {
|
||||
@@ -614,7 +605,7 @@ gb_internal void lb_begin_procedure_body(lbProcedure *p) {
|
||||
ptr.value = LLVMGetParam(p->value, param_offset+param_index);
|
||||
ptr.type = alloc_type_pointer(e->type);
|
||||
lb_add_entity(p->module, e, ptr);
|
||||
lb_add_debug_param_variable(p, ptr.value, e->type, e->token, param_index+1, p->decl_block, arg_type->kind);
|
||||
lb_add_debug_param_variable(p, ptr.value, e->type, e->token, param_index+1, p->decl_block);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user