[Refactor] Move call_params_id from EntityBase to FunctionFields. (#5146)

Move call_params_id from EntityBaseWithParams to FunctionFields.

No visible difference for Function. Since field call_params_id is
function specific fits better in FunctionFields.
This commit is contained in:
Alina Sbirlea
2025-03-18 23:49:24 +00:00
committed by GitHub
parent b72d8dfc0e
commit 5a4b63a040
11 changed files with 30 additions and 30 deletions
+3 -1
View File
@@ -178,6 +178,7 @@ static auto MergeFunctionRedecl(Context& context,
// Track the signature from the definition, so that IDs in the body
// match IDs in the signature.
prev_function.MergeDefinition(new_function);
prev_function.call_params_id = new_function.call_params_id;
prev_function.return_slot_pattern_id = new_function.return_slot_pattern_id;
prev_function.self_param_id = new_function.self_param_id;
}
@@ -473,7 +474,8 @@ static auto BuildFunctionDecl(Context& context,
auto function_info =
SemIR::Function{name_context.MakeEntityWithParamsBase(
name, decl_id, is_extern, introducer.extern_library),
{.return_slot_pattern_id = name.return_slot_pattern_id,
{.call_params_id = name.call_params_id,
.return_slot_pattern_id = name.return_slot_pattern_id,
.virtual_modifier = virtual_modifier,
.self_param_id = self_param_id}};
if (is_definition) {