mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-23 04:32:42 +00: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:
1 parent
b079acd86f
commit
1c673041f0
16 files changed
+198
-98
No files matched your search
@@ -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