InternPool: fix more key lifetime issues

Reminder to look into deleting `get` and make keys less pointery and
more long lived.
This commit is contained in:
Jacob Young
2023-06-01 19:48:36 -04:00
committed by Andrew Kelley
parent 9b48fc2833
commit 8299ddfe4f
3 changed files with 9 additions and 7 deletions

View File

@@ -2331,14 +2331,15 @@ pub const Object = struct {
try param_di_types.append(try o.lowerDebugType(ptr_ty, .full));
}
for (mod.typeToFunc(ty).?.param_types) |param_ty| {
if (!param_ty.toType().hasRuntimeBitsIgnoreComptime(mod)) continue;
for (0..mod.typeToFunc(ty).?.param_types.len) |i| {
const param_ty = mod.typeToFunc(ty).?.param_types[i].toType();
if (!param_ty.hasRuntimeBitsIgnoreComptime(mod)) continue;
if (isByRef(param_ty.toType(), mod)) {
const ptr_ty = try mod.singleMutPtrType(param_ty.toType());
if (isByRef(param_ty, mod)) {
const ptr_ty = try mod.singleMutPtrType(param_ty);
try param_di_types.append(try o.lowerDebugType(ptr_ty, .full));
} else {
try param_di_types.append(try o.lowerDebugType(param_ty.toType(), .full));
try param_di_types.append(try o.lowerDebugType(param_ty, .full));
}
}