From c4ec382fc806e0cb4484c1cb2edcc5fc40c3c9d8 Mon Sep 17 00:00:00 2001 From: mlugg Date: Sat, 7 Jun 2025 14:47:59 +0100 Subject: InternPool: store the Nav types are named after When the name strategy is `.parent`, the DWARF info really wants to know what `Nav` we were named after to emit a more optimal hierarchy. --- src/Zcu/PerThread.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Zcu/PerThread.zig') diff --git a/src/Zcu/PerThread.zig b/src/Zcu/PerThread.zig index b5eaca0397..6f0eeba864 100644 --- a/src/Zcu/PerThread.zig +++ b/src/Zcu/PerThread.zig @@ -1787,7 +1787,7 @@ fn createFileRootStruct( }; errdefer wip_ty.cancel(ip, pt.tid); - wip_ty.setName(ip, try file.internFullyQualifiedName(pt)); + wip_ty.setName(ip, try file.internFullyQualifiedName(pt), .none); ip.namespacePtr(namespace_index).owner_type = wip_ty.index; if (zcu.comp.incremental) { @@ -3976,7 +3976,7 @@ fn recreateStructType( }; errdefer wip_ty.cancel(ip, pt.tid); - wip_ty.setName(ip, struct_obj.name); + wip_ty.setName(ip, struct_obj.name, struct_obj.name_nav); try pt.addDependency(.wrap(.{ .type = wip_ty.index }), .{ .src_hash = key.zir_index }); zcu.namespacePtr(struct_obj.namespace).owner_type = wip_ty.index; // No need to re-scan the namespace -- `zirStructDecl` will ultimately do that if the type is still alive. @@ -4068,7 +4068,7 @@ fn recreateUnionType( }; errdefer wip_ty.cancel(ip, pt.tid); - wip_ty.setName(ip, union_obj.name); + wip_ty.setName(ip, union_obj.name, union_obj.name_nav); try pt.addDependency(.wrap(.{ .type = wip_ty.index }), .{ .src_hash = key.zir_index }); zcu.namespacePtr(namespace_index).owner_type = wip_ty.index; // No need to re-scan the namespace -- `zirUnionDecl` will ultimately do that if the type is still alive. @@ -4177,7 +4177,7 @@ fn recreateEnumType( var done = true; errdefer if (!done) wip_ty.cancel(ip, pt.tid); - wip_ty.setName(ip, enum_obj.name); + wip_ty.setName(ip, enum_obj.name, enum_obj.name_nav); zcu.namespacePtr(namespace_index).owner_type = wip_ty.index; // No need to re-scan the namespace -- `zirEnumDecl` will ultimately do that if the type is still alive. -- cgit v1.2.3