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
+3 -1
View File
@@ -16,6 +16,7 @@
#include "toolchain/check/literal.h"
#include "toolchain/check/type.h"
#include "toolchain/check/type_completion.h"
#include "toolchain/sem_ir/function.h"
#include "toolchain/sem_ir/ids.h"
#include "toolchain/sem_ir/typed_insts.h"
@@ -552,7 +553,8 @@ auto PerformCppThunkCall(Context& context, SemIR::LocId loc_id,
auto callee_function_params =
context.inst_blocks().Get(callee_function.call_params_id);
auto thunk_callee = GetCalleeFunction(context.sem_ir(), thunk_callee_id);
auto thunk_callee =
GetCalleeFunctionAsFunction(context.sem_ir(), thunk_callee_id);
auto& thunk_function = context.functions().Get(thunk_callee.function_id);
auto thunk_function_params =
context.inst_blocks().Get(thunk_function.call_params_id);