Fix ir bug; allow formatting options for arrays & et al.
This commit is contained in:
1 parent
5595daf5a3
commit
8677c81da7
3 files changed
+31
-44
No files matched your search
@@ -2710,8 +2710,8 @@ irValue *ir_emit_conv(irProcedure *proc, irValue *value, Type *t) {
|
||||
if (is_type_integer(src) && is_type_integer(dst)) {
|
||||
GB_ASSERT(src->kind == Type_Basic &&
|
||||
dst->kind == Type_Basic);
|
||||
i64 sz = type_size_of(proc->module->allocator, src);
|
||||
i64 dz = type_size_of(proc->module->allocator, dst);
|
||||
i64 sz = type_size_of(proc->module->allocator, default_type(src));
|
||||
i64 dz = type_size_of(proc->module->allocator, default_type(dst));
|
||||
irConvKind kind = irConv_trunc;
|
||||
|
||||
if (dz < sz) {
|
||||
|
||||
+1
-1
@@ -1763,7 +1763,7 @@ i64 type_size_of_internal(gbAllocator allocator, Type *t, TypePath *path) {
|
||||
} break;
|
||||
|
||||
case Type_Basic: {
|
||||
GB_ASSERT(is_type_typed(t));
|
||||
GB_ASSERT_MSG(is_type_typed(t), "%s", type_to_string(t));
|
||||
BasicKind kind = t->Basic.kind;
|
||||
i64 size = t->Basic.size;
|
||||
if (size > 0) {
|
||||
|
||||
Reference in new issue
Block a user