mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 12:11:04 +01:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user