diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-03-01 23:46:57 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-03-01 23:46:57 -0700 |
| commit | ed2364a1480f99a7380285cec15ff1962d9df519 (patch) | |
| tree | da488724987e43e11a5938589a9df5b92c79d8c4 /src/codegen | |
| parent | 6f303c01f3e06fe8203563065ea32537f6eff456 (diff) | |
| download | zig-ed2364a1480f99a7380285cec15ff1962d9df519.tar.gz zig-ed2364a1480f99a7380285cec15ff1962d9df519.zip | |
stage2: introduce anonymous struct literals
Diffstat (limited to 'src/codegen')
| -rw-r--r-- | src/codegen/llvm.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index 28654b905a..fa29a1aae3 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -958,7 +958,7 @@ pub const DeclGen = struct { // reference, we need to copy it here. gop.key_ptr.* = try t.copy(dg.object.type_map_arena.allocator()); - if (t.isTuple()) { + if (t.isTupleOrAnonStruct()) { const tuple = t.tupleFields(); const llvm_struct_ty = dg.context.structCreateNamed(""); gop.value_ptr.* = llvm_struct_ty; // must be done before any recursive calls @@ -2104,7 +2104,7 @@ pub const DeclGen = struct { var zig_big_align: u32 = 0; var llvm_big_align: u32 = 0; - if (ty.isTuple()) { + if (ty.isTupleOrAnonStruct()) { const tuple = ty.tupleFields(); var llvm_field_index: c_uint = 0; for (tuple.types) |field_ty, i| { @@ -5704,7 +5704,7 @@ fn isByRef(ty: Type) bool { .Struct => { // Packed structs are represented to LLVM as integers. if (ty.containerLayout() == .Packed) return false; - if (ty.isTuple()) { + if (ty.isTupleOrAnonStruct()) { const tuple = ty.tupleFields(); var count: usize = 0; for (tuple.values) |field_val, i| { |
