Change union layout to store type info rather than an integer; ternary expression for types with constant condition

This commit is contained in:
Ginger Bill
2017-07-19 12:15:21 +01:00
parent 4db462a703
commit 6113164211
9 changed files with 222 additions and 85 deletions
+2 -1
View File
@@ -292,7 +292,8 @@ void ir_print_type(irFileBuffer *f, irModule *m, Type *t) {
ir_fprintf(f, "{[0 x <%lld x i8>], ", align);
ir_fprintf(f, "[%lld x i8], ", block_size);
ir_fprintf(f, "i%lld}", word_bits);
ir_print_type(f, m, t_type_info_ptr);
ir_fprintf(f, "}");
#else
i64 block_size = total_size - build_context.word_size;
ir_fprintf(f, "{[0 x <%lld x i8>], [%lld x i8], i%lld}", align, block_size, word_bits);