Fix ir_print.cpp for typeid constants

This commit is contained in:
gingerBill
2020-12-17 17:36:59 +00:00
parent 720f2c7c61
commit 3558848da8
2 changed files with 15 additions and 2 deletions
+5
View File
@@ -787,6 +787,11 @@ void ir_print_exact_value(irFileBuffer *f, irModule *m, ExactValue value, Type *
}
switch (value.kind) {
case ExactValue_Typeid:
GB_ASSERT(is_type_typeid(type));
ir_write_u64(f, ir_typeid_as_integer(m, value.value_typeid));
break;
case ExactValue_Bool:
if (value.value_bool) {
ir_write_string(f, are_types_identical(type, t_llvm_bool) ? str_lit("true") : str_lit("1"));