diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-07-02 16:53:08 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-07-02 16:53:08 -0400 |
| commit | 57d6724186ead79ac76491f42390c0d581a76b04 (patch) | |
| tree | d428783b71938e855e079a120a6c65e1251717af /src/ir_print.cpp | |
| parent | b05b5649df341573c0a42de503ceb025c4129473 (diff) | |
| parent | df11512f85e5228ee2393e9dc5fc42294ecba1c9 (diff) | |
| download | zig-57d6724186ead79ac76491f42390c0d581a76b04.tar.gz zig-57d6724186ead79ac76491f42390c0d581a76b04.zip | |
Merge branch 'shawnl-has-field'
Diffstat (limited to 'src/ir_print.cpp')
| -rw-r--r-- | src/ir_print.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp index a973079900..31b7e608b7 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -1270,6 +1270,14 @@ static void ir_print_type_info(IrPrint *irp, IrInstructionTypeInfo *instruction) 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); + fprintf(irp->f, ","); + ir_print_other_instruction(irp, instruction->field_name); + fprintf(irp->f, ")"); +} + static void ir_print_type_id(IrPrint *irp, IrInstructionTypeId *instruction) { fprintf(irp->f, "@typeId("); ir_print_other_instruction(irp, instruction->type_value); @@ -1965,6 +1973,9 @@ static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) { case IrInstructionIdTypeInfo: ir_print_type_info(irp, (IrInstructionTypeInfo *)instruction); break; + case IrInstructionIdHasField: + ir_print_has_field(irp, (IrInstructionHasField *)instruction); + break; case IrInstructionIdTypeId: ir_print_type_id(irp, (IrInstructionTypeId *)instruction); break; |
