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:
@@ -133,8 +133,8 @@ auto MatchContext::DoWork(Context& context) -> SemIR::InstBlockId {
|
||||
|
||||
auto MatchContext::EmitPatternMatch(Context& context,
|
||||
MatchContext::WorkItem entry) -> void {
|
||||
if (entry.pattern_id == SemIR::InstId::BuiltinError) {
|
||||
results_.push_back(SemIR::InstId::BuiltinError);
|
||||
if (entry.pattern_id == SemIR::InstId::BuiltinErrorInst) {
|
||||
results_.push_back(SemIR::InstId::BuiltinErrorInst);
|
||||
return;
|
||||
}
|
||||
DiagnosticAnnotationScope annotate_diagnostics(
|
||||
@@ -187,7 +187,7 @@ auto MatchContext::EmitPatternMatch(Context& context,
|
||||
context.emitter().Emit(
|
||||
TokenOnly(context.insts().GetLocId(entry.scrutinee_id)),
|
||||
AddrSelfIsNonRef);
|
||||
results_.push_back(SemIR::InstId::BuiltinError);
|
||||
results_.push_back(SemIR::InstId::BuiltinErrorInst);
|
||||
return;
|
||||
}
|
||||
auto scrutinee_ref = context.insts().Get(scrutinee_ref_id);
|
||||
@@ -208,8 +208,8 @@ auto MatchContext::EmitPatternMatch(Context& context,
|
||||
switch (kind_) {
|
||||
case MatchKind::Caller: {
|
||||
CARBON_CHECK(entry.scrutinee_id.is_valid());
|
||||
if (entry.scrutinee_id == SemIR::InstId::BuiltinError) {
|
||||
results_.push_back(SemIR::InstId::BuiltinError);
|
||||
if (entry.scrutinee_id == SemIR::InstId::BuiltinErrorInst) {
|
||||
results_.push_back(SemIR::InstId::BuiltinErrorInst);
|
||||
} else {
|
||||
results_.push_back(ConvertToValueOfType(
|
||||
context, context.insts().GetLocId(entry.scrutinee_id),
|
||||
|
||||
Reference in New Issue
Block a user