diff options
| author | gingerBill <bill@gingerbill.org> | 2019-11-19 23:24:49 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-11-19 23:24:49 +0000 |
| commit | 0839dccfdc6d754cbce1041a03d16b588cfbef95 (patch) | |
| tree | 0b60d580b7b59c9b120bc41bfabd30e8bacaa726 /src/ir.cpp | |
| parent | d22e5b697db24e943d2500e69cc98acda63434e3 (diff) | |
Fix Compiler panic with SIMD Vector debug information #481
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index c28af446c..86e618187 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -2684,6 +2684,19 @@ irDebugInfo *ir_add_debug_info_type(irModule *module, Type *type, Entity *e, irD return ir_add_debug_info_type_bit_set(module, type, e, scope); } + if (is_type_simd_vector(type)) { + irDebugInfo *di = ir_alloc_debug_info(irDebugInfo_CompositeType); + di->CompositeType.size = ir_debug_size_bits(type); + di->CompositeType.align = ir_debug_align_bits(type); + di->CompositeType.tag = irDebugBasicEncoding_array_type; + di->CompositeType.array_count = (i32)type->SimdVector.count; + + map_set(&module->debug_info, hash_type(type), di); + di->CompositeType.base_type = ir_add_debug_info_type(module, type->SimdVector.elem, e, scope, file); + GB_ASSERT(base->kind != Type_Named); + return di; + } + GB_PANIC("Unreachable %s", type_to_string(type)); return nullptr; } |