From a6d2bdf6050642762cc7bc193bca34690f712d49 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 13 Dec 2016 01:48:40 -0500 Subject: IR: implement breakpoint builtin --- src/ir_print.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/ir_print.cpp') diff --git a/src/ir_print.cpp b/src/ir_print.cpp index ede1c6461d..186de8b449 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -812,6 +812,10 @@ static void ir_print_member_count(IrPrint *irp, IrInstructionMemberCount *instru fprintf(irp->f, ")"); } +static void ir_print_breakpoint(IrPrint *irp, IrInstructionBreakpoint *instruction) { + fprintf(irp->f, "@breakpoint()"); +} + static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) { ir_print_prefix(irp, instruction); switch (instruction->id) { @@ -1009,6 +1013,9 @@ static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) { case IrInstructionIdMemberCount: ir_print_member_count(irp, (IrInstructionMemberCount *)instruction); break; + case IrInstructionIdBreakpoint: + ir_print_breakpoint(irp, (IrInstructionBreakpoint *)instruction); + break; } fprintf(irp->f, "\n"); } -- cgit v1.2.3