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/types.cpp | |
| parent | d22e5b697db24e943d2500e69cc98acda63434e3 (diff) | |
Fix Compiler panic with SIMD Vector debug information #481
Diffstat (limited to 'src/types.cpp')
| -rw-r--r-- | src/types.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/types.cpp b/src/types.cpp index ac78bb943..06aa211ab 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -3008,7 +3008,13 @@ gbString write_type_to_string(gbString str, Type *type) { break; case Type_Struct: { - str = gb_string_appendc(str, "struct"); + if (type->Struct.soa_elem != nullptr) { + str = gb_string_append_fmt(str, "#soa[%d]", cast(int)type->Struct.soa_count); + str = write_type_to_string(str, type->Struct.soa_elem); + break; + } + + str = gb_string_appendc(str, "struct"); if (type->Struct.is_packed) str = gb_string_appendc(str, " #packed"); if (type->Struct.is_raw_union) str = gb_string_appendc(str, " #raw_union"); str = gb_string_appendc(str, " {"); @@ -3179,10 +3185,8 @@ gbString write_type_to_string(gbString str, Type *type) { if (type->SimdVector.is_x86_mmx) { return "intrinsics.x86_mmx"; } else { - str = gb_string_appendc(str, "intrinsics.vector("); - str = gb_string_append_fmt(str, "%d, ", cast(int)type->SimdVector.count); + str = gb_string_append_fmt(str, "#vector[%d]", cast(int)type->SimdVector.count); str = write_type_to_string(str, type->SimdVector.elem); - str = gb_string_appendc(str, ")"); } break; } |