mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 10:11:06 +01:00
Add a SemIR scope for generated entities (#6792)
This currently doesn't include much, but we expect to be generating more entities, such as `Destroy`, which I'm aiming to get more clearly categorized here instead of `imports`. Assisted-by: Google Antigravity with Gemini 3 Flash --------- Co-authored-by: Dana Jansens <danakj@orodu.net>
This commit is contained in:
co-authored by
Dana Jansens
parent
af368dbadd
commit
c6bc033af8
@@ -185,11 +185,9 @@ auto MakeBuiltinFunction(Context& context, SemIR::LocId loc_id,
|
||||
.return_patterns_id = return_patterns_id,
|
||||
.self_param_id = self_param_id,
|
||||
}});
|
||||
// Add the builtin to the imports block so that it appears in the formatted
|
||||
// IR.
|
||||
// TODO: Find a better way to handle this. Ideally we should stop using this
|
||||
// function entirely and declare builtins in the prelude.
|
||||
context.imports().push_back(decl_id);
|
||||
context.generated().push_back(decl_id);
|
||||
|
||||
auto& function = context.functions().Get(function_id);
|
||||
CARBON_CHECK(IsValidBuiltinDeclaration(context, function, builtin_kind));
|
||||
|
||||
Reference in New Issue
Block a user