mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 20:21:21 +01:00
Remove InstId::Builtin members (#4632)
- `InstId::Builtin<Inst>` -> `<Inst>::SingletonInstId` - `InstId::PackageNamespace` -> `Namespace::PackageInstId`
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user