diff options
Diffstat (limited to 'src/Value.zig')
| -rw-r--r-- | src/Value.zig | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Value.zig b/src/Value.zig index 59fbdf67d5..25f5b50166 100644 --- a/src/Value.zig +++ b/src/Value.zig @@ -1343,7 +1343,12 @@ pub fn isLazySize(val: Value, zcu: *Zcu) bool { pub fn isPtrRuntimeValue(val: Value, zcu: *Zcu) bool { const ip = &zcu.intern_pool; const nav = ip.getBackingNav(val.toIntern()).unwrap() orelse return false; - return switch (ip.indexToKey(ip.getNav(nav).status.resolved.val)) { + const nav_val = switch (ip.getNav(nav).status) { + .unresolved => unreachable, + .type_resolved => |r| return r.is_threadlocal, + .fully_resolved => |r| r.val, + }; + return switch (ip.indexToKey(nav_val)) { .@"extern" => |e| e.is_threadlocal or e.is_dll_import, .variable => |v| v.is_threadlocal, else => false, |
