aboutsummaryrefslogtreecommitdiff
path: root/src/ir_print.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-11-18 20:57:27 -0500
committerAndrew Kelley <superjoe30@gmail.com>2016-11-18 20:57:27 -0500
commitbf7cde62c52b370f953db2cd6167a156771d8343 (patch)
tree4f11799818dc793db8431332537b010620aad55f /src/ir_print.cpp
parented31ae8867fd2d7b5274c6b127d42360b48fc49c (diff)
downloadzig-bf7cde62c52b370f953db2cd6167a156771d8343.tar.gz
zig-bf7cde62c52b370f953db2cd6167a156771d8343.zip
IR: support setDebugSafety builtin function
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 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;