InternPool: fix yet more key lifetime issues

This commit is contained in:
Jacob Young
2023-06-02 18:49:40 -04:00
committed by Andrew Kelley
parent 6a15fc87ad
commit e23b0a01e6
6 changed files with 52 additions and 44 deletions

View File

@@ -517,7 +517,7 @@ pub fn generateSymbol(
const field_ty = field.ty;
if (!field_ty.hasRuntimeBits(mod)) continue;
const field_val = switch (aggregate.storage) {
const field_val = switch (mod.intern_pool.indexToKey(typed_value.val.toIntern()).aggregate.storage) {
.bytes => |bytes| try mod.intern_pool.get(mod.gpa, .{ .int = .{
.ty = field_ty.toIntern(),
.storage = .{ .u64 = bytes[index] },