From b027b1d60fbceb3483464d4df9813d1d6b10c4fa Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 3 Jun 2018 21:09:08 +0100 Subject: Fix min type info for polymorphic procedures and named types --- src/ir.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'src/ir.cpp') diff --git a/src/ir.cpp b/src/ir.cpp index 74b4a5908..aec5a5e36 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -3592,7 +3592,6 @@ gb_global i32 ir_global_type_info_member_names_index = 0; gb_global i32 ir_global_type_info_member_offsets_index = 0; gb_global i32 ir_global_type_info_member_usings_index = 0; -#if 1 isize ir_type_info_count(CheckerInfo *info) { return info->minimum_dependency_type_info_set.entries.count+1; } @@ -3610,16 +3609,6 @@ isize ir_type_info_index(CheckerInfo *info, Type *type, bool err_on_not_found=tr } return -1; } -#else -isize ir_type_info_count(CheckerInfo *info) { - return info->type_info_types.count; -} - -isize ir_type_info_index(CheckerInfo *info, Type *type) { - isize index = type_info_index(info, type); - return index; -} -#endif irValue *ir_type_info(irProcedure *proc, Type *type) { CheckerInfo *info = proc->module->info; @@ -6205,7 +6194,7 @@ void ir_build_constant_value_decl(irProcedure *proc, AstNodeValueDecl *vd) { if (e->kind == Entity_TypeName) { bool polymorphic_struct = false; if (e->type != nullptr && e->kind == Entity_TypeName) { - Type *bt = base_type(e->type); + Type *bt = base_type(e->type); if (bt->kind == Type_Struct) { polymorphic_struct = bt->Struct.is_polymorphic; } -- cgit v1.2.3