Rename BoundMethod::function_id to function_decl_id (#4775)

The InstId in this field is to an instruction that declares the
function, rather than the function itself, so that diagnostics can print
where the function is coming from. The type of the function (the
FunctionType instruction) is the type (the type_id) of the
function_decl_id. So we rename the field to help make this distinction
more clear.

Followup to #4739
This commit is contained in:
Dana Jansens
2025-01-08 19:08:56 +00:00
committed by GitHub
parent 7d92aa7bbf
commit ab12da7d03
8 changed files with 14 additions and 12 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ auto GetCalleeFunction(const File& sem_ir, InstId callee_id) -> CalleeFunction {
if (auto bound_method = sem_ir.insts().TryGetAs<BoundMethod>(callee_id)) {
result.self_id = bound_method->object_id;
callee_id = bound_method->function_id;
callee_id = bound_method->function_decl_id;
}
// Identify the function we're calling.