diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-09-27 15:58:39 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-09-27 15:58:39 -0400 |
| commit | 878aece87b11e112b2ab890aa5242d8c472864a5 (patch) | |
| tree | ff44a060d3fc463f1d024b30cfb0b763123381d0 /src/analyze.cpp | |
| parent | 70e934f116f3b889fcee755380a708fdceaaf699 (diff) | |
| parent | 09575bc0d605ca59bba19e98b66d0d0b1ba4fa89 (diff) | |
| download | zig-878aece87b11e112b2ab890aa5242d8c472864a5.tar.gz zig-878aece87b11e112b2ab890aa5242d8c472864a5.zip | |
Merge branch 'LemonBoy-fix-3138'
closes #3213
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index e0ba82f9b5..82872bcbfc 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -7839,7 +7839,7 @@ static void resolve_llvm_types_struct(CodeGen *g, ZigType *struct_type, ResolveS assert(next_offset >= llvm_next_offset); if (next_offset > llvm_next_offset) { - size_t pad_bytes = next_offset - (field->offset + field_type->abi_size); + size_t pad_bytes = next_offset - (field->offset + LLVMStoreSizeOfType(g->target_data_ref, llvm_type)); if (pad_bytes != 0) { LLVMTypeRef pad_llvm_type = LLVMArrayType(LLVMInt8Type(), pad_bytes); element_types[gen_field_index] = pad_llvm_type; |
