diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-10-29 16:41:30 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-10-29 16:41:30 -0400 |
| commit | ca71373da1140149500b529d57b9196711929063 (patch) | |
| tree | 74599ec895d5d8d89ae290cf15f1ee86011026d7 /src | |
| parent | 0921a93c1cc0d66371f8689cf7a823cea8ecdb04 (diff) | |
| download | zig-ca71373da1140149500b529d57b9196711929063.tar.gz zig-ca71373da1140149500b529d57b9196711929063.zip | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/ir.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 83ad9c020d..5f26791584 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 && |
