remove another implicit cast to const pointer

* remove implicit cast from *T to ?*const T
 * remove implicit cast from T to ?*const T when T is a struct/union
master
Andrew Kelley 2018-10-29 16:41:30 -04:00
parent 0921a93c1c
commit ca71373da1
No known key found for this signature in database
GPG Key ID: 4E7CD66038A4D47C
1 changed files with 0 additions and 13 deletions

View File

@ -10517,19 +10517,6 @@ static IrInstruction *ir_analyze_cast(IrAnalyze *ira, IrInstruction *source_inst
} else {
return ira->codegen->invalid_instruction;
}
} else if (wanted_child_type->id == ZigTypeIdPointer &&
wanted_child_type->data.pointer.is_const &&
(actual_type->id == ZigTypeIdPointer || is_container(actual_type)))
{
IrInstruction *cast1 = ir_analyze_cast(ira, source_instr, wanted_child_type, value);
if (type_is_invalid(cast1->value.type))
return ira->codegen->invalid_instruction;
IrInstruction *cast2 = ir_analyze_cast(ira, source_instr, wanted_type, cast1);
if (type_is_invalid(cast2->value.type))
return ira->codegen->invalid_instruction;
return cast2;
} else if (
wanted_child_type->id == ZigTypeIdPointer &&
wanted_child_type->data.pointer.ptr_len == PtrLenUnknown &&