| ... | @@ -2495,17 +2495,16 @@ pub const Object = struct { | ... | @@ -2495,17 +2495,16 @@ pub const Object = struct { |
| 2495 | } | 2495 | } |
| 2496 | | 2496 | |
| 2497 | const struct_type = mod.typeToStruct(ty).?; | 2497 | const struct_type = mod.typeToStruct(ty).?; |
| 2498 | const field_types = struct_type.field_types.get(ip); | | |
| 2499 | | 2498 | |
| 2500 | var di_fields: std.ArrayListUnmanaged(*llvm.DIType) = .{}; | 2499 | var di_fields: std.ArrayListUnmanaged(*llvm.DIType) = .{}; |
| 2501 | defer di_fields.deinit(gpa); | 2500 | defer di_fields.deinit(gpa); |
| 2502 | | 2501 | |
| 2503 | try di_fields.ensureUnusedCapacity(gpa, field_types.len); | 2502 | try di_fields.ensureUnusedCapacity(gpa, struct_type.field_types.len); |
| 2504 | | 2503 | |
| 2505 | comptime assert(struct_layout_version == 2); | 2504 | comptime assert(struct_layout_version == 2); |
| 2506 | var it = struct_type.iterateRuntimeOrder(ip); | 2505 | var it = struct_type.iterateRuntimeOrder(ip); |
| 2507 | while (it.next()) |field_index| { | 2506 | while (it.next()) |field_index| { |
| 2508 | const field_ty = field_types[field_index].toType(); | 2507 | const field_ty = struct_type.field_types.get(ip)[field_index].toType(); |
| 2509 | if (!field_ty.hasRuntimeBitsIgnoreComptime(mod)) continue; | 2508 | if (!field_ty.hasRuntimeBitsIgnoreComptime(mod)) continue; |
| 2510 | const field_size = field_ty.abiSize(mod); | 2509 | const field_size = field_ty.abiSize(mod); |
| 2511 | const field_align = mod.structFieldAlignment( | 2510 | const field_align = mod.structFieldAlignment( |