aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/spirv.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-10-21 21:38:55 -0400
committerGitHub <noreply@github.com>2023-10-21 21:38:55 -0400
commit7d50634e0ad4355e339bc243a2e2842693e133f9 (patch)
treecd6f81b82b20532d40e0944e6a814519ebf7cb41 /src/codegen/spirv.zig
parent3cd3052d4d303dbae7d517fa40f6d171c957afdd (diff)
parent3d7c6c803b788138aa08f51cf4ee8cf7892e315d (diff)
downloadzig-7d50634e0ad4355e339bc243a2e2842693e133f9.tar.gz
zig-7d50634e0ad4355e339bc243a2e2842693e133f9.zip
Merge pull request #17545 from ziglang/more-anon-decls
migrate make_ptr_const to new anonymous decl mechanism
Diffstat (limited to 'src/codegen/spirv.zig')
-rw-r--r--src/codegen/spirv.zig7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/codegen/spirv.zig b/src/codegen/spirv.zig
index ded73d6afd..e7e6ebdef3 100644
--- a/src/codegen/spirv.zig
+++ b/src/codegen/spirv.zig
@@ -959,12 +959,17 @@ const DeclGen = struct {
}
}
- fn constantAnonDeclRef(self: *DeclGen, ty: Type, decl_val: InternPool.Index) !IdRef {
+ fn constantAnonDeclRef(
+ self: *DeclGen,
+ ty: Type,
+ anon_decl: InternPool.Key.Ptr.Addr.AnonDecl,
+ ) !IdRef {
// TODO: Merge this function with constantDeclRef.
const mod = self.module;
const ip = &mod.intern_pool;
const ty_ref = try self.resolveType(ty, .direct);
+ const decl_val = anon_decl.val;
const decl_ty = ip.typeOf(decl_val).toType();
if (decl_val.toValue().getFunction(mod)) |func| {