mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 20:42:01 +01:00
Provide locations for indirectly imported instructions. (#3811)
This replaces all invalid node IDs in import_ref.cpp with references to the imported instruction. This splits out ReplaceInstBeforeConstantUse into a separate function when the LocationId is replaced, as for splicing. That's the less common case, whereas others would need to provide the LocationId in order just to not change the value.
This commit is contained in:
@@ -198,8 +198,7 @@ static auto BuildFunctionDecl(Context& context,
|
||||
}
|
||||
|
||||
// Write the function ID into the FunctionDecl.
|
||||
context.ReplaceInstBeforeConstantUse(function_info.decl_id,
|
||||
{node_id, function_decl});
|
||||
context.ReplaceInstBeforeConstantUse(function_info.decl_id, function_decl);
|
||||
|
||||
if (SemIR::IsEntryPoint(context.sem_ir(), function_decl.function_id)) {
|
||||
// TODO: Update this once valid signatures for the entry point are decided.
|
||||
|
||||
Reference in New Issue
Block a user