aboutsummaryrefslogtreecommitdiff
path: root/src/Sema.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2023-08-08 13:55:43 +0100
committermlugg <mlugg@mlugg.co.uk>2023-08-10 10:00:37 +0100
commitf32b9bc776bfffe0a1adadc013ff3fa3e5d6d34b (patch)
treeed1717db1a7f6c8c931d5c08e244a11a2334ff93 /src/Sema.zig
parent2209813baee8715e739d07b16a2910408ff9230a (diff)
downloadzig-f32b9bc776bfffe0a1adadc013ff3fa3e5d6d34b.tar.gz
zig-f32b9bc776bfffe0a1adadc013ff3fa3e5d6d34b.zip
Sema: add references to generic instantiations
This makes the reference trace appear for generic calls where it previously did not. Resolves: #16725
Diffstat (limited to 'src/Sema.zig')
-rw-r--r--src/Sema.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Sema.zig b/src/Sema.zig
index 6752e19b6b..e89207cc00 100644
--- a/src/Sema.zig
+++ b/src/Sema.zig
@@ -7908,6 +7908,8 @@ fn instantiateGenericCall(
const callee = mod.funcInfo(callee_index);
callee.branchQuota(ip).* = @max(callee.branchQuota(ip).*, sema.branch_quota);
+ try sema.addReferencedBy(block, call_src, callee.owner_decl);
+
// Make a runtime call to the new function, making sure to omit the comptime args.
const func_ty = callee.ty.toType();
const func_ty_info = mod.typeToFunc(func_ty).?;