From ca71373da1140149500b529d57b9196711929063 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 29 Oct 2018 16:41:30 -0400 Subject: [PATCH] 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 --- src/ir.cpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/ir.cpp b/src/ir.cpp index 83ad9c020..5f2679158 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -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 &&