authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2023-08-08 13:55:43+01:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2023-08-10 10:00:37+01:00
logf32b9bc776bfffe0a1adadc013ff3fa3e5d6d34b
treeed1717db1a7f6c8c931d5c08e244a11a2334ff93
parent2209813baee8715e739d07b16a2910408ff9230a
signaturelock-open Commit is signed but in an unrecognized format.

Sema: add references to generic instantiations

This makes the reference trace appear for generic calls where it previously did not. Resolves: #16725

1 files changed, 2 insertions(+), 0 deletions(-)

src/Sema.zig+2
......@@ -7908,6 +7908,8 @@ fn instantiateGenericCall(
79087908 const callee = mod.funcInfo(callee_index);
79097909 callee.branchQuota(ip).* = @max(callee.branchQuota(ip).*, sema.branch_quota);
79107910
7911 try sema.addReferencedBy(block, call_src, callee.owner_decl);
7912
79117913 // Make a runtime call to the new function, making sure to omit the comptime args.
79127914 const func_ty = callee.ty.toType();
79137915 const func_ty_info = mod.typeToFunc(func_ty).?;