| ... | ... | @@ -25264,12 +25264,12 @@ static Error ir_make_type_info_decls(IrAnalyze *ira, IrInst* source_instr, ZigVa |
| 25264 | 25264 | 0, 0, 0, false); |
| 25265 | 25265 | fn_decl_fields[5]->type = get_optional_type(ira->codegen, get_slice_type(ira->codegen, u8_ptr)); |
| 25266 | 25266 | if (fn_node->is_extern && fn_node->lib_name != nullptr && buf_len(fn_node->lib_name) > 0) { |
| 25267 | | fn_decl_fields[5]->data.x_optional = ira->codegen->pass1_arena->create<ZigValue>(); |
| 25267 | ZigValue *slice_val = ira->codegen->pass1_arena->create<ZigValue>(); |
| 25268 | 25268 | ZigValue *lib_name = create_const_str_lit(ira->codegen, fn_node->lib_name)->data.x_ptr.data.ref.pointee; |
| 25269 | | init_const_slice(ira->codegen, fn_decl_fields[5]->data.x_optional, lib_name, 0, |
| 25270 | | buf_len(fn_node->lib_name), true); |
| 25269 | init_const_slice(ira->codegen, slice_val, lib_name, 0, buf_len(fn_node->lib_name), true); |
| 25270 | set_optional_payload(fn_decl_fields[5], slice_val); |
| 25271 | 25271 | } else { |
| 25272 | | fn_decl_fields[5]->data.x_optional = nullptr; |
| 25272 | set_optional_payload(fn_decl_fields[5], nullptr); |
| 25273 | 25273 | } |
| 25274 | 25274 | // return_type: type |
| 25275 | 25275 | ensure_field_index(fn_decl_val->type, "return_type", 6); |
| ... | ... | @@ -25549,8 +25549,12 @@ static Error ir_make_type_info_value(IrAnalyze *ira, IrInst* source_instr, ZigTy |
| 25549 | 25549 | fields[1]->data.x_type = type_entry->data.array.child_type; |
| 25550 | 25550 | // sentinel: anytype |
| 25551 | 25551 | fields[2]->special = ConstValSpecialStatic; |
| 25552 | | fields[2]->type = get_optional_type(ira->codegen, type_entry->data.array.child_type); |
| 25553 | | fields[2]->data.x_optional = type_entry->data.array.sentinel; |
| 25552 | if (type_entry->data.array.child_type != nullptr) { |
| 25553 | fields[2]->type = get_optional_type(ira->codegen, type_entry->data.array.child_type); |
| 25554 | set_optional_payload(fields[2], type_entry->data.array.sentinel); |
| 25555 | } else { |
| 25556 | fields[2]->type = ira->codegen->builtin_types.entry_null; |
| 25557 | } |
| 25554 | 25558 | break; |
| 25555 | 25559 | } |
| 25556 | 25560 | case ZigTypeIdVector: { |