diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-05-03 23:02:33 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-03 23:02:33 -0400 |
| commit | b9e320dd521751663db7b040e65c8ff5420c824a (patch) | |
| tree | 2c4161ebf8d1997ea45926af86301d64a960484c /src/ir_print.cpp | |
| parent | aa2586de182e5587c924740e80468c4c4d509500 (diff) | |
| parent | 849ea61fa11460b1a6df2529063a6b0cabc6e5e4 (diff) | |
| download | zig-b9e320dd521751663db7b040e65c8ff5420c824a.tar.gz zig-b9e320dd521751663db7b040e65c8ff5420c824a.zip | |
Merge pull request #951 from alexnask/reflect_reify
Metaprogramming - @typeInfo [DONE]
Diffstat (limited to 'src/ir_print.cpp')
| -rw-r--r-- | src/ir_print.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp index a77ae244d4..9678120f1d 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -966,6 +966,12 @@ static void ir_print_offset_of(IrPrint *irp, IrInstructionOffsetOf *instruction) fprintf(irp->f, ")"); } +static void ir_print_type_info(IrPrint *irp, IrInstructionTypeInfo *instruction) { + fprintf(irp->f, "@typeInfo("); + ir_print_other_instruction(irp, instruction->type_value); + 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); @@ -1536,6 +1542,9 @@ static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) { case IrInstructionIdOffsetOf: ir_print_offset_of(irp, (IrInstructionOffsetOf *)instruction); break; + case IrInstructionIdTypeInfo: + ir_print_type_info(irp, (IrInstructionTypeInfo *)instruction); + break; case IrInstructionIdTypeId: ir_print_type_id(irp, (IrInstructionTypeId *)instruction); break; |
