mirror of
https://github.com/ziglang/zig.git
synced 2026-02-15 22:09:49 +00:00
IR: implement ir_print for maybe type
This commit is contained in:
parent
2f8dd46174
commit
6c8b919d17
@ -105,11 +105,19 @@ static void ir_print_const_value(IrPrint *irp, TypeTableEntry *type_entry, Const
|
||||
fprintf(irp->f, "null");
|
||||
break;
|
||||
}
|
||||
case TypeTableEntryIdMaybe:
|
||||
{
|
||||
if (const_val->data.x_maybe) {
|
||||
ir_print_const_value(irp, type_entry->data.maybe.child_type, const_val->data.x_maybe);
|
||||
} else {
|
||||
fprintf(irp->f, "null");
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TypeTableEntryIdVar:
|
||||
case TypeTableEntryIdFloat:
|
||||
case TypeTableEntryIdStruct:
|
||||
case TypeTableEntryIdUndefLit:
|
||||
case TypeTableEntryIdMaybe:
|
||||
case TypeTableEntryIdErrorUnion:
|
||||
case TypeTableEntryIdPureError:
|
||||
case TypeTableEntryIdEnum:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user