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
@@ -39,8 +39,8 @@ auto BuildUnaryOperator(Context& context, SemIR::LocId loc_id, Operator op,
// Form `operand.(Op)`.
auto bound_op_id = PerformCompoundMemberAccess(context, loc_id, operand_id,
op_fn, missing_impl_diagnoser);
if (bound_op_id == SemIR::InstId::BuiltinErrorInst) {
return SemIR::InstId::BuiltinErrorInst;
if (bound_op_id == SemIR::ErrorInst::SingletonInstId) {
return SemIR::ErrorInst::SingletonInstId;
}
// Form `bound_op()`.
@@ -57,8 +57,8 @@ auto BuildBinaryOperator(Context& context, SemIR::LocId loc_id, Operator op,
// Form `lhs.(Op)`.
auto bound_op_id = PerformCompoundMemberAccess(context, loc_id, lhs_id, op_fn,
missing_impl_diagnoser);
if (bound_op_id == SemIR::InstId::BuiltinErrorInst) {
return SemIR::InstId::BuiltinErrorInst;
if (bound_op_id == SemIR::ErrorInst::SingletonInstId) {
return SemIR::ErrorInst::SingletonInstId;
}
// Form `bound_op(rhs)`.