| ... | @@ -25062,12 +25062,12 @@ static Error ir_make_type_info_decls(IrAnalyze *ira, IrInst* source_instr, ZigVa | ... | @@ -25062,12 +25062,12 @@ static Error ir_make_type_info_decls(IrAnalyze *ira, IrInst* source_instr, ZigVa |
| 25062 | 0, 0, 0, false); | 25062 | 0, 0, 0, false); |
| 25063 | fn_decl_fields[5]->type = get_optional_type(ira->codegen, get_slice_type(ira->codegen, u8_ptr)); | 25063 | fn_decl_fields[5]->type = get_optional_type(ira->codegen, get_slice_type(ira->codegen, u8_ptr)); |
| 25064 | if (fn_node->is_extern && fn_node->lib_name != nullptr && buf_len(fn_node->lib_name) > 0) { | 25064 | if (fn_node->is_extern && fn_node->lib_name != nullptr && buf_len(fn_node->lib_name) > 0) { |
| 25065 | fn_decl_fields[5]->data.x_optional = ira->codegen->pass1_arena->create<ZigValue>(); | 25065 | ZigValue *slice_val = ira->codegen->pass1_arena->create<ZigValue>(); |
| 25066 | ZigValue *lib_name = create_const_str_lit(ira->codegen, fn_node->lib_name)->data.x_ptr.data.ref.pointee; | 25066 | ZigValue *lib_name = create_const_str_lit(ira->codegen, fn_node->lib_name)->data.x_ptr.data.ref.pointee; |
| 25067 | init_const_slice(ira->codegen, fn_decl_fields[5]->data.x_optional, lib_name, 0, | 25067 | init_const_slice(ira->codegen, slice_val, lib_name, 0, buf_len(fn_node->lib_name), true); |
| 25068 | buf_len(fn_node->lib_name), true); | 25068 | set_optional_payload(fn_decl_fields[5], slice_val); |
| 25069 | } else { | 25069 | } else { |
| 25070 | fn_decl_fields[5]->data.x_optional = nullptr; | 25070 | set_optional_payload(fn_decl_fields[5], nullptr); |
| 25071 | } | 25071 | } |
| 25072 | // return_type: type | 25072 | // return_type: type |
| 25073 | ensure_field_index(fn_decl_val->type, "return_type", 6); | 25073 | ensure_field_index(fn_decl_val->type, "return_type", 6); |
| ... | @@ -25347,8 +25347,12 @@ static Error ir_make_type_info_value(IrAnalyze *ira, IrInst* source_instr, ZigTy | ... | @@ -25347,8 +25347,12 @@ static Error ir_make_type_info_value(IrAnalyze *ira, IrInst* source_instr, ZigTy |
| 25347 | fields[1]->data.x_type = type_entry->data.array.child_type; | 25347 | fields[1]->data.x_type = type_entry->data.array.child_type; |
| 25348 | // sentinel: anytype | 25348 | // sentinel: anytype |
| 25349 | fields[2]->special = ConstValSpecialStatic; | 25349 | fields[2]->special = ConstValSpecialStatic; |
| 25350 | fields[2]->type = get_optional_type(ira->codegen, type_entry->data.array.child_type); | 25350 | if (type_entry->data.array.child_type != nullptr) { |
| 25351 | fields[2]->data.x_optional = type_entry->data.array.sentinel; | 25351 | fields[2]->type = get_optional_type(ira->codegen, type_entry->data.array.child_type); |
| | 25352 | set_optional_payload(fields[2], type_entry->data.array.sentinel); |
| | 25353 | } else { |
| | 25354 | fields[2]->type = ira->codegen->builtin_types.entry_null; |
| | 25355 | } |
| 25352 | break; | 25356 | break; |
| 25353 | } | 25357 | } |
| 25354 | case ZigTypeIdVector: { | 25358 | case ZigTypeIdVector: { |