aboutsummaryrefslogtreecommitdiff
path: root/src/Zcu/PerThread.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2025-06-07 14:47:59 +0100
committermlugg <mlugg@mlugg.co.uk>2025-06-12 13:55:41 +0100
commitc4ec382fc806e0cb4484c1cb2edcc5fc40c3c9d8 (patch)
treee2b3fd46007dfa4fc775245dfb53bb9f7946d92c /src/Zcu/PerThread.zig
parent580d622b0dfec3ae9f1e3262673d8d4daa6b5b60 (diff)
downloadzig-c4ec382fc806e0cb4484c1cb2edcc5fc40c3c9d8.tar.gz
zig-c4ec382fc806e0cb4484c1cb2edcc5fc40c3c9d8.zip
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.
Diffstat (limited to 'src/Zcu/PerThread.zig')
-rw-r--r--src/Zcu/PerThread.zig8
1 files changed, 4 insertions, 4 deletions
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.