aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2023-05-26 00:24:29 -0400
committerAndrew Kelley <andrew@ziglang.org>2023-06-10 20:47:55 -0700
commit9a738c0be54c9bda0e57de9da84f86fc73bd5198 (patch)
treeae754aeda344d8d9c359ccddb565155f45468d5e /src/codegen.zig
parentf37c0a459382fa033cefc9bb139277436a78b25e (diff)
downloadzig-9a738c0be54c9bda0e57de9da84f86fc73bd5198.tar.gz
zig-9a738c0be54c9bda0e57de9da84f86fc73bd5198.zip
Module: intern the values of decls when they are marked alive
I'm not sure if this is the right place for this to happen, and it should become obsolete when comptime mutation is rewritten and the remaining legacy value tags are remove, so keeping this as a separate revertable commit.
Diffstat (limited to 'src/codegen.zig')
-rw-r--r--src/codegen.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/codegen.zig b/src/codegen.zig
index f343f0441d..87aea6c245 100644
--- a/src/codegen.zig
+++ b/src/codegen.zig
@@ -673,7 +673,7 @@ fn lowerDeclRef(
return Result.ok;
}
- mod.markDeclAlive(decl);
+ try mod.markDeclAlive(decl);
const vaddr = try bin_file.getDeclVAddr(decl_index, .{
.parent_atom_index = reloc_info.parent_atom_index,
@@ -782,7 +782,7 @@ fn genDeclRef(
}
}
- mod.markDeclAlive(decl);
+ try mod.markDeclAlive(decl);
const is_threadlocal = tv.val.isPtrToThreadLocal(mod) and !bin_file.options.single_threaded;