diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-12-18 13:55:34 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-12-18 13:55:34 -0500 |
| commit | 2e6aa6d813cf3fd4180b8c9ffc671b4bcee54586 (patch) | |
| tree | a9ada6a05284c7692ac608c78f0fcc20f54588e1 /src/codegen.cpp | |
| parent | a76b048354e5754b18ecd83ad21cf45c5a34e276 (diff) | |
| download | zig-2e6aa6d813cf3fd4180b8c9ffc671b4bcee54586.tar.gz zig-2e6aa6d813cf3fd4180b8c9ffc671b4bcee54586.zip | |
IR: fix codegen of ref instruction
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp index dd734cbf63..c6e5827154 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -2854,6 +2854,8 @@ static void do_code_gen(CodeGen *g) { } else if (instruction->id == IrInstructionIdRef) { IrInstructionRef *ref_instruction = (IrInstructionRef *)instruction; slot = &ref_instruction->tmp_ptr; + assert(instruction->type_entry->id == TypeTableEntryIdPointer); + slot_type = instruction->type_entry->data.pointer.child_type; } else if (instruction->id == IrInstructionIdContainerInitList) { IrInstructionContainerInitList *container_init_list_instruction = (IrInstructionContainerInitList *)instruction; slot = &container_init_list_instruction->tmp_ptr; |
