mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-25 21:11:11 +00: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:
1 parent
e2ae5f212c
commit
4a80d6758d
35 files changed
+131
-126
No files matched your search
@@ -139,7 +139,7 @@ auto HandleParseNode(Context& context, Parse::StructLiteralId node_id) -> bool {
|
||||
|
||||
if (DiagnoseDuplicateNames(context, field_name_nodes, fields,
|
||||
/*is_struct_type_literal=*/false)) {
|
||||
context.node_stack().Push(node_id, SemIR::InstId::BuiltinError);
|
||||
context.node_stack().Push(node_id, SemIR::InstId::BuiltinErrorInst);
|
||||
} else {
|
||||
auto type_id = context.GetStructType(
|
||||
context.struct_type_fields().AddCanonical(fields));
|
||||
@@ -165,7 +165,7 @@ auto HandleParseNode(Context& context, Parse::StructTypeLiteralId node_id)
|
||||
|
||||
if (DiagnoseDuplicateNames(context, field_name_nodes, fields,
|
||||
/*is_struct_type_literal=*/true)) {
|
||||
context.node_stack().Push(node_id, SemIR::InstId::BuiltinError);
|
||||
context.node_stack().Push(node_id, SemIR::InstId::BuiltinErrorInst);
|
||||
} else {
|
||||
auto fields_id = context.struct_type_fields().AddCanonical(fields);
|
||||
context.AddInstAndPush<SemIR::StructType>(
|
||||
|
||||
Reference in new issue
Block a user