mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 08:44:41 +01:00
Remove InstId::Builtin members (#4632)
- `InstId::Builtin<Inst>` -> `<Inst>::SingletonInstId` - `InstId::PackageNamespace` -> `Namespace::PackageInstId`
This commit is contained in:
@@ -400,7 +400,7 @@ auto HandleParseNode(Context& context, Parse::AdaptDeclId node_id) -> bool {
|
||||
adapted_inst_id);
|
||||
});
|
||||
if (adapted_type_id == SemIR::ErrorInst::SingletonTypeId) {
|
||||
adapted_inst_id = SemIR::InstId::BuiltinErrorInst;
|
||||
adapted_inst_id = SemIR::ErrorInst::SingletonInstId;
|
||||
}
|
||||
|
||||
// Build a SemIR representation for the declaration.
|
||||
@@ -439,7 +439,7 @@ struct BaseInfo {
|
||||
constexpr BaseInfo BaseInfo::Error = {
|
||||
.type_id = SemIR::ErrorInst::SingletonTypeId,
|
||||
.scope_id = SemIR::NameScopeId::Invalid,
|
||||
.inst_id = SemIR::InstId::BuiltinErrorInst};
|
||||
.inst_id = SemIR::ErrorInst::SingletonInstId};
|
||||
} // namespace
|
||||
|
||||
// Diagnoses an attempt to derive from a final type.
|
||||
@@ -577,7 +577,7 @@ static auto CheckCompleteAdapterClassType(Context& context,
|
||||
.Build(class_info.adapt_id, AdaptWithBase)
|
||||
.Note(class_info.base_id, AdaptWithBaseHere)
|
||||
.Emit();
|
||||
return SemIR::InstId::BuiltinErrorInst;
|
||||
return SemIR::ErrorInst::SingletonInstId;
|
||||
}
|
||||
|
||||
auto field_decls = context.field_decls_stack().PeekArray();
|
||||
@@ -589,7 +589,7 @@ static auto CheckCompleteAdapterClassType(Context& context,
|
||||
.Build(class_info.adapt_id, AdaptWithFields)
|
||||
.Note(field_decls.front(), AdaptWithFieldHere)
|
||||
.Emit();
|
||||
return SemIR::InstId::BuiltinErrorInst;
|
||||
return SemIR::ErrorInst::SingletonInstId;
|
||||
}
|
||||
|
||||
for (auto inst_id : context.inst_block_stack().PeekCurrentBlockContents()) {
|
||||
@@ -606,7 +606,7 @@ static auto CheckCompleteAdapterClassType(Context& context,
|
||||
.Build(class_info.adapt_id, AdaptWithVirtual)
|
||||
.Note(inst_id, AdaptWithVirtualHere)
|
||||
.Emit();
|
||||
return SemIR::InstId::BuiltinErrorInst;
|
||||
return SemIR::ErrorInst::SingletonInstId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user