aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-12-14 18:36:06 +0000
committergingerBill <bill@gingerbill.org>2018-12-14 18:36:06 +0000
commitb7eebe5d004380dec34a185bca6e5e343589de69 (patch)
tree6e9b74c045c4c2d3880b25945291703a5f70eeac /src/ir.cpp
parent57d4333ed3a36778a034f144a6998587d61ed831 (diff)
Fix polymorphic record types with constant value parameters
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index e11d1a054..c2739b387 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -606,12 +606,14 @@ struct irDebugInfo {
} LexicalBlock;
struct {
+ Type * type;
String name;
i32 size;
i32 align;
irDebugEncoding encoding;
} BasicType;
struct {
+ Type * type;
irDebugEncoding tag;
irDebugInfo * base_type;
String name;
@@ -1766,6 +1768,7 @@ irDebugInfo *ir_add_debug_info_field_internal(irModule *module, String name, Typ
// "scope", if set, should be inserted into map prior to calling to ensure no cyclical dependency issues.
irDebugInfo *di = ir_alloc_debug_info(irDebugInfo_DerivedType);
+ // GB_ASSERT_MSG(name.len > 0, "%s", type_to_string(type));
di->DerivedType.name = name;
di->DerivedType.tag = irDebugBasicEncoding_member;
di->DerivedType.size = ir_debug_size_bits(type);
@@ -2350,9 +2353,9 @@ irDebugInfo *ir_add_debug_info_type(irModule *module, Type *type, Entity *e, irD
di->CompositeType.file = file;
di->CompositeType.pos = base->Union.node->UnionType.token.pos;
for_array(field_index, base->Union.variants) {
- array_add(&di->CompositeType.elements->DebugInfoArray.elements,
- ir_add_debug_info_field(module, di, nullptr, type, cast(i32)field_index,
- base->Union.variants[field_index], file));
+ // TODO(bill): Union pseudo-"fields"
+ // irDebugInfo *di = ir_add_debug_info_field(module, di, nullptr, type, cast(i32)field_index, base->Union.variants[field_index], file);
+ // array_add(&di->CompositeType.elements->DebugInfoArray.elements, di);
}
} else if (is_type_enum(type)) {
GB_ASSERT(base->kind == Type_Enum);