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
+4 -4
View File
@@ -1092,7 +1092,7 @@ static auto MakeConstantForBuiltinCall(Context& context, SemIRLoc loc,
case SemIR::BuiltinFunctionKind::IntLiteralMakeType: {
return context.constant_values().Get(
SemIR::InstId::BuiltinIntLiteralType);
SemIR::IntLiteralType::SingletonInstId);
}
case SemIR::BuiltinFunctionKind::IntMakeTypeSigned: {
@@ -1114,11 +1114,11 @@ static auto MakeConstantForBuiltinCall(Context& context, SemIRLoc loc,
return SemIR::ErrorInst::SingletonConstantId;
}
return context.constant_values().Get(
SemIR::InstId::BuiltinLegacyFloatType);
SemIR::LegacyFloatType::SingletonInstId);
}
case SemIR::BuiltinFunctionKind::BoolMakeType: {
return context.constant_values().Get(SemIR::InstId::BuiltinBoolType);
return context.constant_values().Get(SemIR::BoolType::SingletonInstId);
}
// Integer conversions.
@@ -1826,7 +1826,7 @@ auto TryEvalBlockForSpecific(Context& context, SemIR::SpecificId specific_id,
result[i] = context.constant_values().GetInstId(const_id);
// TODO: If this becomes possible through monomorphization failure, produce
// a diagnostic and put `SemIR::InstId::BuiltinErrorInst` in the table
// a diagnostic and put `SemIR::ErrorInst::SingletonInstId` in the table
// entry.
CARBON_CHECK(result[i].is_valid());
}