diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-10-22 12:15:31 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-10-22 12:15:31 -0700 |
| commit | 9f0359d78f9facc38418e32b0e8c1bf6f99f0d26 (patch) | |
| tree | c9427aa9886e8d7f84c50f2ef12407cc80fa61d1 /src/codegen/spirv/Module.zig | |
| parent | fd2239bde9e2051a32fb25c50c732a40d4afccd0 (diff) | |
| download | zig-9f0359d78f9facc38418e32b0e8c1bf6f99f0d26.tar.gz zig-9f0359d78f9facc38418e32b0e8c1bf6f99f0d26.zip | |
Revert "Merge pull request #17657 from Snektron/spirv-recursive-ptrs"
This reverts commit b822e841cda0adabe3fec260ff51c18508f7ee32, reversing
changes made to 0c99ba1eab63865592bb084feb271cd4e4b0357e.
This caused a CI failure when it landed in master branch.
Diffstat (limited to 'src/codegen/spirv/Module.zig')
| -rw-r--r-- | src/codegen/spirv/Module.zig | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/codegen/spirv/Module.zig b/src/codegen/spirv/Module.zig index 4ecbc8d7a0..1936b78826 100644 --- a/src/codegen/spirv/Module.zig +++ b/src/codegen/spirv/Module.zig @@ -507,6 +507,17 @@ pub fn arrayType(self: *Module, len: u32, elem_ty_ref: CacheRef) !CacheRef { } }); } +pub fn ptrType( + self: *Module, + child: CacheRef, + storage_class: spec.StorageClass, +) !CacheRef { + return try self.resolve(.{ .ptr_type = .{ + .storage_class = storage_class, + .child_type = child, + } }); +} + pub fn constInt(self: *Module, ty_ref: CacheRef, value: anytype) !IdRef { const ty = self.cache.lookup(ty_ref).int_type; const Value = Cache.Key.Int.Value; |
