aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-05-04 21:57:55 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-06-10 20:42:28 -0700
commit41cdcd5486ba10dcd21dc45cb8470c556b7497dd (patch)
treef4827ae6615e016508f3317a0be90ccdee614e5a /src/Module.zig
parent6ab8b6f8b273356ce248a075b6a0657bfea33c79 (diff)
downloadzig-41cdcd5486ba10dcd21dc45cb8470c556b7497dd.tar.gz
zig-41cdcd5486ba10dcd21dc45cb8470c556b7497dd.zip
stage2: add a few more Value checks for InternPool
Diffstat (limited to 'src/Module.zig')
-rw-r--r--src/Module.zig9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Module.zig b/src/Module.zig
index b1cbd88297..bfc06ac5ab 100644
--- a/src/Module.zig
+++ b/src/Module.zig
@@ -4903,9 +4903,12 @@ fn semaDecl(mod: *Module, decl_index: Decl.Index) !bool {
break :blk (try decl_arena_allocator.dupeZ(u8, bytes)).ptr;
};
decl.@"addrspace" = blk: {
- const addrspace_ctx: Sema.AddressSpaceContext = switch (decl_tv.val.tag()) {
- .function, .extern_fn => .function,
- .variable => .variable,
+ const addrspace_ctx: Sema.AddressSpaceContext = switch (decl_tv.val.ip_index) {
+ .none => switch (decl_tv.val.tag()) {
+ .function, .extern_fn => .function,
+ .variable => .variable,
+ else => .constant,
+ },
else => .constant,
};