mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 17:31:07 +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:
@@ -25,11 +25,11 @@ auto PerformPointerDereference(
|
||||
base_id = ConvertToValueExpr(context, base_id);
|
||||
auto type_id = context.types().GetUnqualifiedType(
|
||||
context.insts().Get(base_id).type_id());
|
||||
auto result_type_id = SemIR::TypeId::Error;
|
||||
auto result_type_id = SemIR::ErrorInst::SingletonTypeId;
|
||||
if (auto pointer_type =
|
||||
context.types().TryGetAs<SemIR::PointerType>(type_id)) {
|
||||
result_type_id = pointer_type->pointee_id;
|
||||
} else if (type_id != SemIR::TypeId::Error) {
|
||||
} else if (type_id != SemIR::ErrorInst::SingletonTypeId) {
|
||||
diagnose_not_pointer(type_id);
|
||||
}
|
||||
return context.AddInst<SemIR::Deref>(
|
||||
|
||||
Reference in New Issue
Block a user