stage2: add a few more Value checks for InternPool

This commit is contained in:
Andrew Kelley
2023-05-04 21:57:55 -07:00
parent 6ab8b6f8b2
commit 41cdcd5486
3 changed files with 26 additions and 17 deletions

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,
};