| ... | @@ -15506,13 +15506,6 @@ static IrInstruction *ir_analyze_container_field_ptr(IrAnalyze *ira, Buf *field_ | ... | @@ -15506,13 +15506,6 @@ static IrInstruction *ir_analyze_container_field_ptr(IrAnalyze *ira, Buf *field_ |
| 15506 | ConstExprValue *payload_val = union_val->data.x_union.payload; | 15506 | ConstExprValue *payload_val = union_val->data.x_union.payload; |
| 15507 | | 15507 | |
| 15508 | ZigType *field_type = field->type_entry; | 15508 | ZigType *field_type = field->type_entry; |
| 15509 | if (field_type->id == ZigTypeIdVoid) { | | |
| 15510 | assert(payload_val == nullptr); | | |
| 15511 | payload_val = create_const_vals(1); | | |
| 15512 | payload_val->special = ConstValSpecialStatic; | | |
| 15513 | payload_val->type = field_type; | | |
| 15514 | } | | |
| 15515 | | | |
| 15516 | ZigType *ptr_type = get_pointer_to_type_extra(ira->codegen, field_type, | 15509 | ZigType *ptr_type = get_pointer_to_type_extra(ira->codegen, field_type, |
| 15517 | is_const, is_volatile, PtrLenSingle, 0, 0, 0); | 15510 | is_const, is_volatile, PtrLenSingle, 0, 0, 0); |
| 15518 | | 15511 | |
| ... | @@ -18052,19 +18045,10 @@ static Error ir_make_type_info_value(IrAnalyze *ira, IrInstruction *source_instr | ... | @@ -18052,19 +18045,10 @@ static Error ir_make_type_info_value(IrAnalyze *ira, IrInstruction *source_instr |
| 18052 | case ZigTypeIdNull: | 18045 | case ZigTypeIdNull: |
| 18053 | case ZigTypeIdArgTuple: | 18046 | case ZigTypeIdArgTuple: |
| 18054 | case ZigTypeIdOpaque: | 18047 | case ZigTypeIdOpaque: |
| 18055 | *out = nullptr; | 18048 | result = create_const_vals(1); |
| 18056 | return ErrorNone; | 18049 | result->special = ConstValSpecialStatic; |
| 18057 | default: | 18050 | result->type = ira->codegen->builtin_types.entry_void; |
| 18058 | { | 18051 | 	break; |
| 18059 | // Lookup an available value in our cache. | | |
| 18060 | auto entry = ira->codegen->type_info_cache.maybe_get(type_entry); | | |
| 18061 | if (entry != nullptr) { | | |
| 18062 | *out = entry->value; | | |
| 18063 | return ErrorNone; | | |
| 18064 | } | | |
| 18065 | | | |
| 18066 | // Fallthrough if we don't find one. | | |
| 18067 | } | | |
| 18068 | case ZigTypeIdInt: | 18052 | case ZigTypeIdInt: |
| 18069 | { | 18053 | { |
| 18070 | result = create_const_vals(1); | 18054 | result = create_const_vals(1); |
| ... | @@ -18636,7 +18620,6 @@ static IrInstruction *ir_analyze_instruction_type_info(IrAnalyze *ira, | ... | @@ -18636,7 +18620,6 @@ static IrInstruction *ir_analyze_instruction_type_info(IrAnalyze *ira, |
| 18636 | out_val->data.x_union.payload = payload; | 18620 | out_val->data.x_union.payload = payload; |
| 18637 | | 18621 | |
| 18638 | if (payload != nullptr) { | 18622 | if (payload != nullptr) { |
| 18639 | assert(payload->type->id == ZigTypeIdStruct); | | |
| 18640 | payload->parent.id = ConstParentIdUnion; | 18623 | payload->parent.id = ConstParentIdUnion; |
| 18641 | payload->parent.data.p_union.union_val = out_val; | 18624 | payload->parent.data.p_union.union_val = out_val; |
| 18642 | } | 18625 | } |