aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-10-29 22:16:43 +0000
committergingerBill <bill@gingerbill.org>2018-10-29 22:16:43 +0000
commit5aa591d8845d8803d9a59502e99bc666bead9a3f (patch)
tree2806e288b161eeefd76bfbf081f03632d1f339bf /src
parentefe91b1f91f2cca2478ceaeb99f3b3cae3291d98 (diff)
Fix debug info issue
Diffstat (limited to 'src')
-rw-r--r--src/ir.cpp5
-rw-r--r--src/types.cpp2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 040b4a1b0..039b89954 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -2270,7 +2270,8 @@ irDebugInfo *ir_add_debug_info_type(irModule *module, Type *type, Entity *e, irD
return di;
}
- if (is_type_struct(type) || is_type_union(type) || is_type_enum(type) || is_type_tuple(type)) {
+ if (is_type_struct(type) ||
+ is_type_union(type) || is_type_enum(type) || is_type_tuple(type)) {
if (type->kind == Type_Named) {
// NOTE(lachsinc): Named named's should always be handled prior as typedefs.
GB_ASSERT(type->Named.base->kind != Type_Named);
@@ -2450,7 +2451,7 @@ 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);
}
- GB_PANIC("Unreachable");
+ GB_PANIC("Unreachable %s", type_to_string(type));
return nullptr;
}
diff --git a/src/types.cpp b/src/types.cpp
index f8ed17063..beb94caac 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -912,7 +912,7 @@ Type *base_complex_elem_type(Type *t) {
bool is_type_struct(Type *t) {
t = base_type(t);
- return (t->kind == Type_Struct && !t->Struct.is_raw_union);
+ return t->kind == Type_Struct;
}
bool is_type_union(Type *t) {
t = base_type(t);