mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 07:34:45 +01:00
Switch TypeId::TypeType to TypeType::SingletonTypeId, and similar (#4619)
`ids.h` and `ids.cpp` are the manual edits, everything else is search-and-replace. The full list of things moved is: - `TypeId::TypeType` - `TypeId::AutoType` - `TypeId::Error` - `ConstantId::Error` This is to unblock removing `InstId::Builtin*`.
This commit is contained in:
@@ -170,7 +170,7 @@ static auto BuildInterfaceWitness(
|
||||
auto decl = context.insts().Get(decl_id);
|
||||
CARBON_KIND_SWITCH(decl) {
|
||||
case CARBON_KIND(SemIR::StructValue struct_value): {
|
||||
if (struct_value.type_id == SemIR::TypeId::Error) {
|
||||
if (struct_value.type_id == SemIR::ErrorInst::SingletonTypeId) {
|
||||
return SemIR::InstId::BuiltinErrorInst;
|
||||
}
|
||||
auto type_inst = context.types().GetAsInst(struct_value.type_id);
|
||||
@@ -229,7 +229,7 @@ auto BuildImplWitness(Context& context, SemIR::ImplId impl_id)
|
||||
CARBON_CHECK(impl.is_being_defined());
|
||||
|
||||
auto facet_type_id = context.GetTypeIdForTypeInst(impl.constraint_id);
|
||||
if (facet_type_id == SemIR::TypeId::Error) {
|
||||
if (facet_type_id == SemIR::ErrorInst::SingletonTypeId) {
|
||||
return SemIR::InstId::BuiltinErrorInst;
|
||||
}
|
||||
auto facet_type = context.types().TryGetAs<SemIR::FacetType>(facet_type_id);
|
||||
|
||||
Reference in New Issue
Block a user