diff options
| author | gingerBill <bill@gingerbill.org> | 2017-10-15 11:21:48 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2017-10-15 11:21:48 +0100 |
| commit | e05fe1837de55741a009f7e35ee4ba6a0e13a1e6 (patch) | |
| tree | 81b689065be9ad7c8e2ae56228f95fbf556549f4 /src/ir_print.cpp | |
| parent | 94762b56f6b07156097846c2c927f120288f065d (diff) | |
Fix minimal dependency generation for polymorphic structs (related to issue #121)
Diffstat (limited to 'src/ir_print.cpp')
| -rw-r--r-- | src/ir_print.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp index a8f053bbd..df1843af1 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -356,8 +356,9 @@ void ir_print_type(irFileBuffer *f, irModule *m, Type *t) { ir_print_encoded_local(f, *found); } else { // TODO(bill): Is this correct behaviour?! + GB_ASSERT_MSG(found != nullptr, "%.*s %p", LIT(t->Named.name), t->Named.type_name); + // gb_printf_err("%.*s %p\n", LIT(t->Named.name), t->Named.type_name); ir_print_type(f, m, base_type(t)); - // GB_ASSERT_MSG(found != nullptr, "%.*s %p", LIT(t->Named.name), t->Named.type_name); } break; } @@ -1795,6 +1796,7 @@ void ir_print_proc(irFileBuffer *f, irModule *m, irProcedure *proc) { void ir_print_type_name(irFileBuffer *f, irModule *m, irValue *v) { GB_ASSERT(v->kind == irValue_TypeName); Type *t = base_type(v->TypeName.type); + ir_print_encoded_local(f, v->TypeName.name); ir_write_string(f, str_lit(" = type ")); |