From bf7cde62c52b370f953db2cd6167a156771d8343 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 18 Nov 2016 20:57:27 -0500 Subject: IR: support setDebugSafety builtin function --- src/ir_print.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/ir_print.cpp') diff --git a/src/ir_print.cpp b/src/ir_print.cpp index a471384cbc..93a4c0e58d 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -409,6 +409,14 @@ static void ir_print_set_fn_test(IrPrint *irp, IrInstructionSetFnTest *instructi fprintf(irp->f, ")"); } +static void ir_print_set_debug_safety(IrPrint *irp, IrInstructionSetDebugSafety *instruction) { + fprintf(irp->f, "@setDebugSafety("); + ir_print_other_instruction(irp, instruction->scope_value); + fprintf(irp->f, ", "); + ir_print_other_instruction(irp, instruction->debug_safety_on); + fprintf(irp->f, ")"); +} + static void ir_print_array_type(IrPrint *irp, IrInstructionArrayType *instruction) { fprintf(irp->f, "["); ir_print_other_instruction(irp, instruction->size); @@ -541,6 +549,9 @@ static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) { case IrInstructionIdSetFnTest: ir_print_set_fn_test(irp, (IrInstructionSetFnTest *)instruction); break; + case IrInstructionIdSetDebugSafety: + ir_print_set_debug_safety(irp, (IrInstructionSetDebugSafety *)instruction); + break; case IrInstructionIdArrayType: ir_print_array_type(irp, (IrInstructionArrayType *)instruction); break; -- cgit v1.2.3