Remove InstId::Builtin members (#4632)

- `InstId::Builtin<Inst>` -> `<Inst>::SingletonInstId`
- `InstId::PackageNamespace` -> `Namespace::PackageInstId`
This commit is contained in:
Jon Ross-Perkins
2024-12-05 18:13:46 +00:00
committed by GitHub
parent d79d9e0884
commit efab39cbd9
38 changed files with 131 additions and 150 deletions
+2 -2
View File
@@ -139,7 +139,7 @@ auto HandleParseNode(Context& context, Parse::StructLiteralId node_id) -> bool {
if (DiagnoseDuplicateNames(context, field_name_nodes, fields,
/*is_struct_type_literal=*/false)) {
context.node_stack().Push(node_id, SemIR::InstId::BuiltinErrorInst);
context.node_stack().Push(node_id, SemIR::ErrorInst::SingletonInstId);
} else {
auto type_id = context.GetStructType(
context.struct_type_fields().AddCanonical(fields));
@@ -165,7 +165,7 @@ auto HandleParseNode(Context& context, Parse::StructTypeLiteralId node_id)
if (DiagnoseDuplicateNames(context, field_name_nodes, fields,
/*is_struct_type_literal=*/true)) {
context.node_stack().Push(node_id, SemIR::InstId::BuiltinErrorInst);
context.node_stack().Push(node_id, SemIR::ErrorInst::SingletonInstId);
} else {
auto fields_id = context.struct_type_fields().AddCanonical(fields);
context.AddInstAndPush<SemIR::StructType>(