diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-09-14 13:54:33 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-09-14 13:55:45 -0400 |
| commit | 639c3811288b65173b3d9706b8e2001ee2419233 (patch) | |
| tree | 7c800c2e3853280c2eafd44d0456feb4096e0b4f /src/ir.cpp | |
| parent | 82af31ce368d16cc5cadac80faa3d8a4d4b1f752 (diff) | |
| download | zig-639c3811288b65173b3d9706b8e2001ee2419233.tar.gz zig-639c3811288b65173b3d9706b8e2001ee2419233.zip | |
fix coroutine alignment
zig returned the wrong alignment for coroutine promises
in some cases
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 7448d3fffe..fd23992a9e 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -20023,8 +20023,8 @@ static ZigType *ir_analyze_instruction_ptr_cast(IrAnalyze *ira, IrInstructionPtr return dest_type; } - uint32_t src_align_bytes = get_ptr_align(src_type); - uint32_t dest_align_bytes = get_ptr_align(dest_type); + uint32_t src_align_bytes = get_ptr_align(ira->codegen, src_type); + uint32_t dest_align_bytes = get_ptr_align(ira->codegen, dest_type); if (dest_align_bytes > src_align_bytes) { ErrorMsg *msg = ir_add_error(ira, &instruction->base, buf_sprintf("cast increases pointer alignment")); |
