stage2: add a few more Value checks for InternPool

This commit is contained in:
Andrew Kelley committed 2023-06-10 20:42:28 -07:00
1 parent 6ab8b6f8b2
commit 41cdcd5486
3 files changed
+26 -17

No files matched your search

+6 -3
View File
@@ -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,
};