aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/llvm.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen/llvm.zig')
-rw-r--r--src/codegen/llvm.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
index d92a444ea4..bd2807d1bb 100644
--- a/src/codegen/llvm.zig
+++ b/src/codegen/llvm.zig
@@ -9150,7 +9150,7 @@ pub const FuncGen = struct {
// necessarily match the format that we need, depending on which tag is active. We
// must construct the correct unnamed struct type here and bitcast, in order to
// then set the fields appropriately.
- const result_ptr = self.buildAlloca(union_llvm_ty, null);
+ const result_ptr = self.buildAlloca(union_llvm_ty, layout.abi_align);
const llvm_payload = try self.resolveInst(extra.init);
assert(union_obj.haveFieldTypes());
const field = union_obj.fields.values()[extra.field_index];