Rename the builtin FloatType to LegacyFloatType, Error to ErrorInst (#4555)

This is for more clearly distinct names, and to make it a clearer
transition from `BuiltinInst` for name conflicts. `FloatType` is also an
instruction, and we have `Carbon::Error` (common/error.h). This avoids
affecting tests, although the name is embedded in the builtin test.

In `LegacyFloatType`, `Legacy` because I was having trouble coming up
with a more appropriate name. I'm not clear this is a `FloatLiteralType`
at present, it needs some work to mirror `IntLiteralType`.

In `ErrorInst`, the suffix `Inst` was discussed as good and similar to
`BuiltinInst` (although I'm trying to get rid of that).
This commit is contained in:
Jon Ross-Perkins
2024-11-19 20:37:39 +00:00
committed by GitHub
parent e2ae5f212c
commit 4a80d6758d
35 changed files with 131 additions and 126 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::BuiltinError) {
return SemIR::InstId::BuiltinError;
if (bound_op_id == SemIR::InstId::BuiltinErrorInst) {
return SemIR::InstId::BuiltinErrorInst;
}
// 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::BuiltinError) {
return SemIR::InstId::BuiltinError;
if (bound_op_id == SemIR::InstId::BuiltinErrorInst) {
return SemIR::InstId::BuiltinErrorInst;
}
// Form `bound_op(rhs)`.