Handle SpecificImplFunction in GetCallee (#6487)

I need this in a forthcoming PR, to reliably get the `Function` that was
originally used to build a `Call` inst, but even as a stand-alone
change, it seems to nicely improve the textual SemIR.
This commit is contained in:
Geoff Romer
2025-12-11 01:06:16 +00:00
committed by GitHub
parent ff8ce31e1b
commit a0d1e4b809
36 changed files with 370 additions and 366 deletions
+4
View File
@@ -37,6 +37,10 @@ auto GetCallee(const File& sem_ir, InstId callee_id, SpecificId specific_id)
sem_ir.insts().TryGetAs<SpecificFunction>(callee_id)) {
fn.resolved_specific_id = specific_function->specific_id;
callee_id = specific_function->callee_id;
} else if (auto specific_impl_function =
sem_ir.insts().TryGetAs<SpecificImplFunction>(callee_id)) {
fn.resolved_specific_id = specific_impl_function->specific_id;
callee_id = specific_impl_function->callee_id;
}
// Identify the function we're calling by its type.