aboutsummaryrefslogtreecommitdiff
path: root/src/InternPool.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-12-11 19:16:57 -0800
committerAndrew Kelley <andrew@ziglang.org>2025-01-15 15:11:35 -0800
commitc96e23632f04c7bffc2257139a19cad82fbe7223 (patch)
tree793a2a41d98d67c7a46d70384d7f732a636a91e9 /src/InternPool.zig
parent26c38b2d42ca3d68a8964c83a86a7e69f0990019 (diff)
downloadzig-c96e23632f04c7bffc2257139a19cad82fbe7223.tar.gz
zig-c96e23632f04c7bffc2257139a19cad82fbe7223.zip
frontend: add const to more Zcu pointers
Diffstat (limited to 'src/InternPool.zig')
-rw-r--r--src/InternPool.zig6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/InternPool.zig b/src/InternPool.zig
index 3b9fb29b86..7a2e6d8ce3 100644
--- a/src/InternPool.zig
+++ b/src/InternPool.zig
@@ -3360,6 +3360,10 @@ pub const LoadedUnionType = struct {
return flags.status == .field_types_wip;
}
+ pub fn requiresComptime(u: LoadedUnionType, ip: *const InternPool) RequiresComptime {
+ return u.flagsUnordered(ip).requires_comptime;
+ }
+
pub fn setRequiresComptimeWip(u: LoadedUnionType, ip: *InternPool) RequiresComptime {
const extra_mutex = &ip.getLocal(u.tid).mutate.extra.mutex;
extra_mutex.lock();
@@ -4014,7 +4018,7 @@ pub const LoadedStructType = struct {
}
}
- pub fn haveLayout(s: LoadedStructType, ip: *InternPool) bool {
+ pub fn haveLayout(s: LoadedStructType, ip: *const InternPool) bool {
return switch (s.layout) {
.@"packed" => s.backingIntTypeUnordered(ip) != .none,
.auto, .@"extern" => s.flagsUnordered(ip).layout_resolved,