| ... | ... | @@ -522,7 +522,6 @@ TypeTableEntry *get_maybe_type(CodeGen *g, TypeTableEntry *child_type) { |
| 522 | 522 | |
| 523 | 523 | TypeTableEntry *entry = new_type_table_entry(TypeTableEntryIdOptional); |
| 524 | 524 | assert(child_type->type_ref || child_type->zero_bits); |
| 525 | | assert(child_type->di_type); |
| 526 | 525 | entry->is_copyable = type_is_copyable(g, child_type); |
| 527 | 526 | |
| 528 | 527 | buf_resize(&entry->name, 0); |
| ... | ... | @@ -532,12 +531,14 @@ TypeTableEntry *get_maybe_type(CodeGen *g, TypeTableEntry *child_type) { |
| 532 | 531 | entry->type_ref = LLVMInt1Type(); |
| 533 | 532 | entry->di_type = g->builtin_types.entry_bool->di_type; |
| 534 | 533 | } else if (type_is_codegen_pointer(child_type)) { |
| 534 | assert(child_type->di_type); |
| 535 | 535 | // this is an optimization but also is necessary for calling C |
| 536 | 536 | // functions where all pointers are maybe pointers |
| 537 | 537 | // function types are technically pointers |
| 538 | 538 | entry->type_ref = child_type->type_ref; |
| 539 | 539 | entry->di_type = child_type->di_type; |
| 540 | 540 | } else { |
| 541 | assert(child_type->di_type); |
| 541 | 542 | // create a struct with a boolean whether this is the null value |
| 542 | 543 | LLVMTypeRef elem_types[] = { |
| 543 | 544 | child_type->type_ref, |