Switch CalleeFunction to a variant (#6104)

Trying to make it easier to see what's intended to be present/correct on
`CalleeFunction` in its various modes.
This commit is contained in:
Jon Ross-Perkins
2025-09-22 22:56:38 +00:00
committed by GitHub
parent a73e259620
commit 0f7df4ed7e
11 changed files with 210 additions and 127 deletions
+1 -1
View File
@@ -227,7 +227,7 @@ static auto HasDeclaredReturnType(Context& context,
auto BuildThunk(Context& context, SemIR::FunctionId signature_id,
SemIR::SpecificId signature_specific_id,
SemIR::InstId callee_id) -> SemIR::InstId {
auto callee = SemIR::GetCalleeFunction(context.sem_ir(), callee_id);
auto callee = SemIR::GetCalleeFunctionAsFunction(context.sem_ir(), callee_id);
// Check whether we can use the given function without a thunk.
// TODO: For virtual functions, we want different rules for checking `self`.