aboutsummaryrefslogtreecommitdiff
path: root/src/Value.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2024-03-25 19:02:21 +0000
committermlugg <mlugg@mlugg.co.uk>2024-03-26 13:48:06 +0000
commitc6f3e9d79cf849623e6c4f25e02e17cdfab07b7c (patch)
tree0efc0142dd23a67509015113b9e1a3aaa2d6c15a /src/Value.zig
parent341857e5cd4fd4453cf9c7d1a6679feb66710d84 (diff)
downloadzig-c6f3e9d79cf849623e6c4f25e02e17cdfab07b7c.tar.gz
zig-c6f3e9d79cf849623e6c4f25e02e17cdfab07b7c.zip
Zcu.Decl: remove `ty` field
`Decl` can no longer store un-interned values, so this field is now unnecessary. The type can instead be fetched with the new `typeOf` helper method, which just gets the type of the Decl's `Value`.
Diffstat (limited to 'src/Value.zig')
-rw-r--r--src/Value.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Value.zig b/src/Value.zig
index 3707c33d46..c220f6d0d9 100644
--- a/src/Value.zig
+++ b/src/Value.zig
@@ -1585,7 +1585,7 @@ pub fn sliceLen(val: Value, mod: *Module) u64 {
const ip = &mod.intern_pool;
return switch (ip.indexToKey(val.toIntern())) {
.ptr => |ptr| switch (ip.indexToKey(switch (ptr.addr) {
- .decl => |decl| mod.declPtr(decl).ty.toIntern(),
+ .decl => |decl| mod.declPtr(decl).typeOf(mod).toIntern(),
.comptime_alloc => @panic("TODO"),
.anon_decl => |anon_decl| ip.typeOf(anon_decl.val),
.comptime_field => |comptime_field| ip.typeOf(comptime_field),