diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-12-22 10:39:10 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-12-22 10:39:10 -0500 |
| commit | 6f91fb4c37a676002ccb68b78bea8044ba44b7e2 (patch) | |
| tree | 4500d5a03322813bb1f09b4a226a83cec939938b /src/ir_print.cpp | |
| parent | 8dc45bc50523d9fa58a937f525b9dc8f7569af0b (diff) | |
| download | zig-6f91fb4c37a676002ccb68b78bea8044ba44b7e2.tar.gz zig-6f91fb4c37a676002ccb68b78bea8044ba44b7e2.zip | |
IR: support const ref
Diffstat (limited to 'src/ir_print.cpp')
| -rw-r--r-- | src/ir_print.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp index 7acbbb0207..c4262bf799 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -666,7 +666,8 @@ static void ir_print_array_len(IrPrint *irp, IrInstructionArrayLen *instruction) } static void ir_print_ref(IrPrint *irp, IrInstructionRef *instruction) { - fprintf(irp->f, "ref "); + const char *const_str = instruction->is_const ? "const " : ""; + fprintf(irp->f, "%sref ", const_str); ir_print_other_instruction(irp, instruction->value); } |
