| author | |
| committer | |
| log | c4ee37f5067e7dd2c017df1fd6c57c1fad92cf85 |
| tree | 296bbdc9529662abe24ae39ac1800399a64b488b |
| parent | 0148f39df929cc00c1b2231acce41c22f74f9969 |
2 files changed, 4 insertions(+), 0 deletions(-)
src/analyze.cpp+1| ... | ... | @@ -253,6 +253,7 @@ bool type_has_zero_bits_known(TypeTableEntry *type_entry) { |
| 253 | 253 | |
| 254 | 254 | |
| 255 | 255 | uint64_t type_size(CodeGen *g, TypeTableEntry *type_entry) { |
| 256 | assert(type_is_complete(type_entry)); | |
| 256 | 257 | if (type_has_bits(type_entry)) { |
| 257 | 258 | return LLVMStoreSizeOfType(g->target_data_ref, type_entry->type_ref); |
| 258 | 259 | } else { |
src/ir.cpp+3| ... | ... | @@ -9904,6 +9904,9 @@ static TypeTableEntry *ir_analyze_instruction_size_of(IrAnalyze *ira, |
| 9904 | 9904 | IrInstruction *type_value = size_of_instruction->type_value->other; |
| 9905 | 9905 | TypeTableEntry *type_entry = ir_resolve_type(ira, type_value); |
| 9906 | 9906 | TypeTableEntry *canon_type_entry = get_underlying_type(type_entry); |
| 9907 | ||
| 9908 | ensure_complete_type(ira->codegen, type_entry); | |
| 9909 | ||
| 9907 | 9910 | switch (canon_type_entry->id) { |
| 9908 | 9911 | case TypeTableEntryIdInvalid: |
| 9909 | 9912 | return ira->codegen->builtin_types.entry_invalid; |