aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2023-05-29 07:30:30 -0400
committerAndrew Kelley <andrew@ziglang.org>2023-06-10 20:47:56 -0700
commit4f70863a55e699c13731325f8c52870119479c02 (patch)
treec3e45219ecaf9ae0fd2ffc7316a0063028d65fce /src/Module.zig
parent32692569656d9a178abb24f8fb7893395700cb62 (diff)
downloadzig-4f70863a55e699c13731325f8c52870119479c02.tar.gz
zig-4f70863a55e699c13731325f8c52870119479c02.zip
InternPool: fix various pointer issues
Diffstat (limited to 'src/Module.zig')
-rw-r--r--src/Module.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Module.zig b/src/Module.zig
index 36037bb49c..49cf9387a9 100644
--- a/src/Module.zig
+++ b/src/Module.zig
@@ -6716,6 +6716,10 @@ pub fn singleConstPtrType(mod: *Module, child_type: Type) Allocator.Error!Type {
return ptrType(mod, .{ .elem_type = child_type.toIntern(), .is_const = true });
}
+pub fn manyConstPtrType(mod: *Module, child_type: Type) Allocator.Error!Type {
+ return ptrType(mod, .{ .elem_type = child_type.toIntern(), .size = .Many, .is_const = true });
+}
+
pub fn adjustPtrTypeChild(mod: *Module, ptr_ty: Type, new_child: Type) Allocator.Error!Type {
const info = Type.ptrInfoIp(mod.intern_pool, ptr_ty.toIntern());
return mod.ptrType(.{