aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-07-16 10:47:42 -0700
committerGitHub <noreply@github.com>2024-07-16 10:47:42 -0700
commita58ceb3d554a9565a6cc0443f6384149ae2b3145 (patch)
treeaf66e289a0ae028be92389722979ed270b42ee42 /lib/std
parenta9d544575d5bd2a939b09b8f088bee5d8ff7b0d9 (diff)
parent7dbd2a6bb549afa6dc3c95df46f40bf144db23a6 (diff)
downloadzig-a58ceb3d554a9565a6cc0443f6384149ae2b3145.tar.gz
zig-a58ceb3d554a9565a6cc0443f6384149ae2b3145.zip
Merge pull request #20646 from ziglang/fix-updateZirRefs
frontend: fix updateZirRefs
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/zig/Zir.zig10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/std/zig/Zir.zig b/lib/std/zig/Zir.zig
index be462e5edb..600ca488e6 100644
--- a/lib/std/zig/Zir.zig
+++ b/lib/std/zig/Zir.zig
@@ -1,5 +1,7 @@
-//! Zig Intermediate Representation. Astgen.zig converts AST nodes to these
-//! untyped IR instructions. Next, Sema.zig processes these into AIR.
+//! Zig Intermediate Representation.
+//!
+//! Astgen.zig converts AST nodes to these untyped IR instructions. Next,
+//! Sema.zig processes these into AIR.
//! The minimum amount of information needed to represent a list of ZIR instructions.
//! Once this structure is completed, it can be used to generate AIR, followed by
//! machine code, without any memory access into the AST tree token list, node list,
@@ -4024,8 +4026,8 @@ pub fn getAssociatedSrcHash(zir: Zir, inst: Zir.Inst.Index) ?std.zig.SrcHash {
const data = zir.instructions.items(.data);
switch (tag[@intFromEnum(inst)]) {
.declaration => {
- const pl_node = data[@intFromEnum(inst)].pl_node;
- const extra = zir.extraData(Inst.Declaration, pl_node.payload_index);
+ const declaration = data[@intFromEnum(inst)].declaration;
+ const extra = zir.extraData(Inst.Declaration, declaration.payload_index);
return @bitCast([4]u32{
extra.data.src_hash_0,
extra.data.src_hash_1,