| ... | @@ -7004,6 +7004,8 @@ static void do_code_gen(CodeGen *g) { | ... | @@ -7004,6 +7004,8 @@ static void do_code_gen(CodeGen *g) { |
| 7004 | ZigType *ptr_type = instruction->base.value.type; | 7004 | ZigType *ptr_type = instruction->base.value.type; |
| 7005 | assert(ptr_type->id == ZigTypeIdPointer); | 7005 | assert(ptr_type->id == ZigTypeIdPointer); |
| 7006 | ZigType *child_type = ptr_type->data.pointer.child_type; | 7006 | ZigType *child_type = ptr_type->data.pointer.child_type; |
| | 7007 | if (type_resolve(g, child_type, ResolveStatusSizeKnown)) |
| | 7008 | zig_unreachable(); |
| 7007 | if (!type_has_bits(child_type)) | 7009 | if (!type_has_bits(child_type)) |
| 7008 | continue; | 7010 | continue; |
| 7009 | if (instruction->base.ref_count == 0) | 7011 | if (instruction->base.ref_count == 0) |
| ... | @@ -7015,6 +7017,8 @@ static void do_code_gen(CodeGen *g) { | ... | @@ -7015,6 +7017,8 @@ static void do_code_gen(CodeGen *g) { |
| 7015 | continue; | 7017 | continue; |
| 7016 | } | 7018 | } |
| 7017 | } | 7019 | } |
| | 7020 | if (type_resolve(g, child_type, ResolveStatusLLVMFull)) |
| | 7021 | zig_unreachable(); |
| 7018 | instruction->base.llvm_value = build_alloca(g, child_type, instruction->name_hint, | 7022 | instruction->base.llvm_value = build_alloca(g, child_type, instruction->name_hint, |
| 7019 | get_ptr_align(g, ptr_type)); | 7023 | get_ptr_align(g, ptr_type)); |
| 7020 | } | 7024 | } |