| ... | @@ -1928,6 +1928,7 @@ pub const Object = struct { | ... | @@ -1928,6 +1928,7 @@ pub const Object = struct { |
| 1928 | if (ty.castTag(.@"struct")) |payload| { | 1928 | if (ty.castTag(.@"struct")) |payload| { |
| 1929 | const struct_obj = payload.data; | 1929 | const struct_obj = payload.data; |
| 1930 | if (struct_obj.layout == .Packed and struct_obj.haveFieldTypes()) { | 1930 | if (struct_obj.layout == .Packed and struct_obj.haveFieldTypes()) { |
| | 1931 | assert(struct_obj.haveLayout()); |
| 1931 | const info = struct_obj.backing_int_ty.intInfo(target); | 1932 | const info = struct_obj.backing_int_ty.intInfo(target); |
| 1932 | const dwarf_encoding: c_uint = switch (info.signedness) { | 1933 | const dwarf_encoding: c_uint = switch (info.signedness) { |
| 1933 | .signed => DW.ATE.signed, | 1934 | .signed => DW.ATE.signed, |
| ... | @@ -2931,6 +2932,7 @@ pub const DeclGen = struct { | ... | @@ -2931,6 +2932,7 @@ pub const DeclGen = struct { |
| 2931 | const struct_obj = t.castTag(.@"struct").?.data; | 2932 | const struct_obj = t.castTag(.@"struct").?.data; |
| 2932 | | 2933 | |
| 2933 | if (struct_obj.layout == .Packed) { | 2934 | if (struct_obj.layout == .Packed) { |
| | 2935 | assert(struct_obj.haveLayout()); |
| 2934 | const int_llvm_ty = try dg.lowerType(struct_obj.backing_int_ty); | 2936 | const int_llvm_ty = try dg.lowerType(struct_obj.backing_int_ty); |
| 2935 | gop.value_ptr.* = int_llvm_ty; | 2937 | gop.value_ptr.* = int_llvm_ty; |
| 2936 | return int_llvm_ty; | 2938 | return int_llvm_ty; |
| ... | @@ -3632,6 +3634,7 @@ pub const DeclGen = struct { | ... | @@ -3632,6 +3634,7 @@ pub const DeclGen = struct { |
| 3632 | const struct_obj = tv.ty.castTag(.@"struct").?.data; | 3634 | const struct_obj = tv.ty.castTag(.@"struct").?.data; |
| 3633 | | 3635 | |
| 3634 | if (struct_obj.layout == .Packed) { | 3636 | if (struct_obj.layout == .Packed) { |
| | 3637 | assert(struct_obj.haveLayout()); |
| 3635 | const big_bits = struct_obj.backing_int_ty.bitSize(target); | 3638 | const big_bits = struct_obj.backing_int_ty.bitSize(target); |
| 3636 | const int_llvm_ty = dg.context.intType(@intCast(c_uint, big_bits)); | 3639 | const int_llvm_ty = dg.context.intType(@intCast(c_uint, big_bits)); |
| 3637 | const fields = struct_obj.fields.values(); | 3640 | const fields = struct_obj.fields.values(); |
| ... | @@ -9152,6 +9155,7 @@ pub const FuncGen = struct { | ... | @@ -9152,6 +9155,7 @@ pub const FuncGen = struct { |
| 9152 | .Struct => { | 9155 | .Struct => { |
| 9153 | if (result_ty.containerLayout() == .Packed) { | 9156 | if (result_ty.containerLayout() == .Packed) { |
| 9154 | const struct_obj = result_ty.castTag(.@"struct").?.data; | 9157 | const struct_obj = result_ty.castTag(.@"struct").?.data; |
| | 9158 | assert(struct_obj.haveLayout()); |
| 9155 | const big_bits = struct_obj.backing_int_ty.bitSize(target); | 9159 | const big_bits = struct_obj.backing_int_ty.bitSize(target); |
| 9156 | const int_llvm_ty = self.context.intType(@intCast(c_uint, big_bits)); | 9160 | const int_llvm_ty = self.context.intType(@intCast(c_uint, big_bits)); |
| 9157 | const fields = struct_obj.fields.values(); | 9161 | const fields = struct_obj.fields.values(); |