Minor change to byval for readonly parameters

This commit is contained in:
gingerBill
2023-02-03 15:07:44 +00:00
parent d26110da7f
commit de0a3e0ab9
4 changed files with 56 additions and 5 deletions

View File

@@ -495,11 +495,11 @@ gb_internal lbValue lb_map_get_proc_for_type(lbModule *m, Type *type) {
lb_add_proc_attribute_at_index(p, 1+0, "nonnull");
lb_add_proc_attribute_at_index(p, 1+0, "noalias");
// lb_add_proc_attribute_at_index(p, 1+0, "readonly");
lb_add_proc_attribute_at_index(p, 1+0, "readonly");
lb_add_proc_attribute_at_index(p, 1+2, "nonnull");
lb_add_proc_attribute_at_index(p, 1+2, "noalias");
// lb_add_proc_attribute_at_index(p, 1+2, "readonly");
lb_add_proc_attribute_at_index(p, 1+2, "readonly");
lbBlock *loop_block = lb_create_block(p, "loop");
lbBlock *hash_block = lb_create_block(p, "hash");
@@ -599,6 +599,8 @@ gb_internal lbValue lb_map_get_proc_for_type(lbModule *m, Type *type) {
LLVMBuildRet(p->builder, res.value);
}
gb_printf_err("%s\n", LLVMPrintValueToString(p->value));
return {p->value, p->type};
}