diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-02-16 15:45:41 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-02-16 15:45:41 -0500 |
| commit | fc5d47b9b960aa08d65bf0dfe3d6395c811f793b (patch) | |
| tree | 2ccc51b0a0f2429793c4be5075bfda53b1b01b65 /src/ir.cpp | |
| parent | 4b5cc80f665314067e0e5b96c859acca1b2e1cb0 (diff) | |
| download | zig-fc5d47b9b960aa08d65bf0dfe3d6395c811f793b.tar.gz zig-fc5d47b9b960aa08d65bf0dfe3d6395c811f793b.zip | |
reading from a bit field partially works
See #261
Still need to do:
* reading a field that has bit offset 0 but still needs to
shift and truncate
* writing a field
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 03b77a69f7..ddb2164ad5 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -9067,7 +9067,8 @@ static TypeTableEntry *ir_analyze_container_field_ptr(IrAnalyze *ira, Buf *field } } ir_build_struct_field_ptr_from(&ira->new_irb, &field_ptr_instruction->base, container_ptr, field); - return get_pointer_to_type_extra(ira->codegen, field->type_entry, is_const, 0, is_volatile); + return get_pointer_to_type_extra(ira->codegen, field->type_entry, is_const, + field->packed_bits_offset, is_volatile); } else { return ir_analyze_container_member_access_inner(ira, bare_type, field_name, field_ptr_instruction, container_ptr, container_type); |
