aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/llvm.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-11-25 18:06:09 -0500
committerGitHub <noreply@github.com>2022-11-25 18:06:09 -0500
commit30eb2a1753c41f348f7d5dcf2b9059a51afab5ad (patch)
tree9c89fa27e516c1575daea0d6c408acab75617f58 /src/codegen/llvm.zig
parenta2403d354fa3f93aa4b916f574393c12dff39e51 (diff)
parent9f055e2eb0252d872c9111e60ef7c0802d91bea6 (diff)
downloadzig-30eb2a1753c41f348f7d5dcf2b9059a51afab5ad.tar.gz
zig-30eb2a1753c41f348f7d5dcf2b9059a51afab5ad.zip
Merge pull request #13627 from Vexu/tuple-decls
Implement tuple type declarations
Diffstat (limited to 'src/codegen/llvm.zig')
-rw-r--r--src/codegen/llvm.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
index b3ea892566..a78b201a0a 100644
--- a/src/codegen/llvm.zig
+++ b/src/codegen/llvm.zig
@@ -1956,7 +1956,7 @@ pub const Object = struct {
break :blk fwd_decl;
};
- if (ty.isTupleOrAnonStruct()) {
+ if (ty.isSimpleTupleOrAnonStruct()) {
const tuple = ty.tupleFields();
var di_fields: std.ArrayListUnmanaged(*llvm.DIType) = .{};
@@ -2890,7 +2890,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.isTupleOrAnonStruct()) {
+ if (t.isSimpleTupleOrAnonStruct()) {
const tuple = t.tupleFields();
const llvm_struct_ty = dg.context.structCreateNamed("");
gop.value_ptr.* = llvm_struct_ty; // must be done before any recursive calls
@@ -3584,7 +3584,7 @@ pub const DeclGen = struct {
const field_vals = tv.val.castTag(.aggregate).?.data;
const gpa = dg.gpa;
- if (tv.ty.isTupleOrAnonStruct()) {
+ if (tv.ty.isSimpleTupleOrAnonStruct()) {
const tuple = tv.ty.tupleFields();
var llvm_fields: std.ArrayListUnmanaged(*llvm.Value) = .{};
defer llvm_fields.deinit(gpa);
@@ -10210,7 +10210,7 @@ fn llvmFieldIndex(
var offset: u64 = 0;
var big_align: u32 = 0;
- if (ty.isTupleOrAnonStruct()) {
+ if (ty.isSimpleTupleOrAnonStruct()) {
const tuple = ty.tupleFields();
var llvm_field_index: c_uint = 0;
for (tuple.types) |field_ty, i| {
@@ -10773,7 +10773,7 @@ fn isByRef(ty: Type) bool {
.Struct => {
// Packed structs are represented to LLVM as integers.
if (ty.containerLayout() == .Packed) return false;
- if (ty.isTupleOrAnonStruct()) {
+ if (ty.isSimpleTupleOrAnonStruct()) {
const tuple = ty.tupleFields();
var count: usize = 0;
for (tuple.values) |field_val, i| {