aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-07-15 23:44:44 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-07-15 23:44:44 -0400
commit776423bbf72312e756eb661b616f0e1bb805f568 (patch)
tree508ded38a4b9e70b21052eb0d0b83bbad3d04b9e /src
parent6fe3b209620a340da536da4c9f3d07e0e6051840 (diff)
downloadzig-776423bbf72312e756eb661b616f0e1bb805f568.tar.gz
zig-776423bbf72312e756eb661b616f0e1bb805f568.zip
fix result location alignment in ir_render_call
Diffstat (limited to 'src')
-rw-r--r--src/codegen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 94e2a98b2f..234b28219b 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -3837,7 +3837,7 @@ static LLVMValueRef ir_render_call(CodeGen *g, IrExecutable *executable, IrInstr
return result_loc;
} else if (handle_is_ptr(src_return_type)) {
LLVMValueRef store_instr = LLVMBuildStore(g->builder, result, result_loc);
- LLVMSetAlignment(store_instr, LLVMGetAlignment(result_loc));
+ LLVMSetAlignment(store_instr, get_ptr_align(g, instruction->result_loc->value.type));
return result_loc;
} else {
return result;