mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
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:
@@ -1075,7 +1075,8 @@ static auto MakeConstantForBuiltinCall(Context& context, SemIRLoc loc,
|
||||
if (!ValidateFloatBitWidth(context, loc, arg_ids[0])) {
|
||||
return SemIR::ConstantId::Error;
|
||||
}
|
||||
return context.constant_values().Get(SemIR::InstId::BuiltinFloatType);
|
||||
return context.constant_values().Get(
|
||||
SemIR::InstId::BuiltinLegacyFloatType);
|
||||
}
|
||||
|
||||
case SemIR::BuiltinFunctionKind::BoolMakeType: {
|
||||
@@ -1716,7 +1717,8 @@ 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::BuiltinError` in the table entry.
|
||||
// a diagnostic and put `SemIR::InstId::BuiltinErrorInst` in the table
|
||||
// entry.
|
||||
CARBON_CHECK(result[i].is_valid());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user