| ... | @@ -25915,6 +25915,11 @@ static ZigType *type_info_to_type(IrAnalyze *ira, IrInst *source_instr, ZigTypeI | ... | @@ -25915,6 +25915,11 @@ static ZigType *type_info_to_type(IrAnalyze *ira, IrInst *source_instr, ZigTypeI |
| 25915 | { | 25915 | { |
| 25916 | return ira->codegen->invalid_inst_gen->value->type; | 25916 | return ira->codegen->invalid_inst_gen->value->type; |
| 25917 | } | 25917 | } |
| | 25918 | if (sentinel != nullptr && (size_enum_index == BuiltinPtrSizeOne || size_enum_index == BuiltinPtrSizeC)) { |
| | 25919 | ir_add_error(ira, source_instr, |
| | 25920 | buf_sprintf("sentinels are only allowed on slices and unknown-length pointers")); |
| | 25921 | return ira->codegen->invalid_inst_gen->value->type; |
| | 25922 | } |
| 25918 | BigInt *bi = get_const_field_lit_int(ira, source_instr->source_node, payload, "alignment", 3); | 25923 | BigInt *bi = get_const_field_lit_int(ira, source_instr->source_node, payload, "alignment", 3); |
| 25919 | if (bi == nullptr) | 25924 | if (bi == nullptr) |
| 25920 | return ira->codegen->invalid_inst_gen->value->type; | 25925 | return ira->codegen->invalid_inst_gen->value->type; |
| ... | @@ -25948,7 +25953,7 @@ static ZigType *type_info_to_type(IrAnalyze *ira, IrInst *source_instr, ZigTypeI | ... | @@ -25948,7 +25953,7 @@ static ZigType *type_info_to_type(IrAnalyze *ira, IrInst *source_instr, ZigTypeI |
| 25948 | 0, // host_int_bytes | 25953 | 0, // host_int_bytes |
| 25949 | is_allowzero, | 25954 | is_allowzero, |
| 25950 | VECTOR_INDEX_NONE, nullptr, sentinel); | 25955 | VECTOR_INDEX_NONE, nullptr, sentinel); |
| 25951 | if (size_enum_index != 2) | 25956 | if (size_enum_index != BuiltinPtrSizeSlice) |
| 25952 | return ptr_type; | 25957 | return ptr_type; |
| 25953 | return get_slice_type(ira->codegen, ptr_type); | 25958 | return get_slice_type(ira->codegen, ptr_type); |
| 25954 | } | 25959 | } |