Allow booleans to be assigned to a 1-bit bit field value

This commit is contained in:
gingerBill
2019-05-09 13:04:15 +01:00
parent a66612e8ae
commit 71a733e3b5
4 changed files with 28 additions and 9 deletions
+2 -2
View File
@@ -661,9 +661,9 @@ void ir_print_exact_value(irFileBuffer *f, irModule *m, ExactValue value, Type *
switch (value.kind) {
case ExactValue_Bool:
if (value.value_bool) {
ir_write_string(f, type == t_llvm_bool ? str_lit("true") : str_lit("1"));
ir_write_string(f, are_types_identical(type, t_llvm_bool) ? str_lit("true") : str_lit("1"));
} else {
ir_write_string(f, type == t_llvm_bool ? str_lit("false") : str_lit("0"));
ir_write_string(f, are_types_identical(type, t_llvm_bool) ? str_lit("false") : str_lit("0"));
}
break;
case ExactValue_String: {