File tree 1 file changed +6
-3
lines changed 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -11401,8 +11401,12 @@ static void copy_const_val(ZigValue *dest, ZigValue *src) {
11401
11401
dest->data.x_struct.fields = alloc_const_vals_ptrs(dest->type->data.structure.src_field_count);
11402
11402
for (size_t i = 0; i < dest->type->data.structure.src_field_count; i += 1) {
11403
11403
copy_const_val(dest->data.x_struct.fields[i], src->data.x_struct.fields[i]);
11404
- }
11405
- }
11404
+ dest->data.x_struct.fields[i]->parent.id = ConstParentIdStruct;
11405
+ dest->data.x_struct.fields[i]->parent.data.p_struct.struct_val = dest;
11406
+ dest->data.x_struct.fields[i]->parent.data.p_struct.field_index = i;
11407
+ }
11408
+ }
11409
+ dest->parent.id = ConstParentIdNone;
11406
11410
}
11407
11411
11408
11412
static bool eval_const_expr_implicit_cast(IrAnalyze *ira, IrInstruction *source_instr,
@@ -17672,7 +17676,6 @@ static IrInstruction *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCallSrc *c
17672
17676
17673
17677
IrInstruction *new_instruction = ir_const(ira, &call_instruction->base, result->type);
17674
17678
copy_const_val(new_instruction->value, result);
17675
- new_instruction->value->type = return_type;
17676
17679
return ir_finish_anal(ira, new_instruction);
17677
17680
}
17678
17681
You can’t perform that action at this time.
0 commit comments