aboutsummaryrefslogtreecommitdiff
path: root/src/ir_print.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir_print.cpp')
-rw-r--r--src/ir_print.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp
index 6de585ec6f..25eb01365f 100644
--- a/src/ir_print.cpp
+++ b/src/ir_print.cpp
@@ -280,6 +280,8 @@ static const char* ir_instruction_type_str(IrInstruction* instruction) {
return "BitOffsetOf";
case IrInstructionIdTypeInfo:
return "TypeInfo";
+ case IrInstructionIdType:
+ return "Type";
case IrInstructionIdHasField:
return "HasField";
case IrInstructionIdTypeId:
@@ -1627,6 +1629,12 @@ static void ir_print_type_info(IrPrint *irp, IrInstructionTypeInfo *instruction)
fprintf(irp->f, ")");
}
+static void ir_print_type(IrPrint *irp, IrInstructionType *instruction) {
+ fprintf(irp->f, "@Type(");
+ ir_print_other_instruction(irp, instruction->type_info);
+ fprintf(irp->f, ")");
+}
+
static void ir_print_has_field(IrPrint *irp, IrInstructionHasField *instruction) {
fprintf(irp->f, "@hasField(");
ir_print_other_instruction(irp, instruction->container_type);
@@ -2258,6 +2266,9 @@ static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction, bool
case IrInstructionIdTypeInfo:
ir_print_type_info(irp, (IrInstructionTypeInfo *)instruction);
break;
+ case IrInstructionIdType:
+ ir_print_type(irp, (IrInstructionType *)instruction);
+ break;
case IrInstructionIdHasField:
ir_print_has_field(irp, (IrInstructionHasField *)instruction);
break;