aboutsummaryrefslogtreecommitdiff
path: root/src/Sema
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/Sema
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/Sema')
-rw-r--r--src/Sema/LowerZon.zig5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Sema/LowerZon.zig b/src/Sema/LowerZon.zig
index 192c2e2d56..b8064cefbf 100644
--- a/src/Sema/LowerZon.zig
+++ b/src/Sema/LowerZon.zig
@@ -157,13 +157,14 @@ fn lowerExprAnonResTy(self: *LowerZon, node: Zoir.Node.Index) CompileError!Inter
)) {
.wip => |wip| ty: {
errdefer wip.cancel(ip, pt.tid);
- wip.setName(ip, try self.sema.createTypeName(
+ const type_name = try self.sema.createTypeName(
self.block,
.anon,
"struct",
self.base_node_inst.resolve(ip),
wip.index,
- ));
+ );
+ wip.setName(ip, type_name.name, type_name.nav);
const struct_type = ip.loadStructType(wip.index);