mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 14:41:06 +01:00
Rename IntLiteral to IntValue. (#4475)
This instruction represents integer values, whether they come from literals or calculations, so it the old name is inaccurate. I also plan to rename `BigInt` to `IntLiteral` based on recent discussion and this change aims to avoid confusion stemming from the same name being used for two different things. I'm not renaming `FloatLiteral` because recent discussion suggests we may want distinct `FloatLiteral` versus `FloatValue` representations in SemIR.
This commit is contained in:
@@ -1217,7 +1217,7 @@ class ImportRefResolver {
|
||||
case CARBON_KIND(SemIR::InterfaceType inst): {
|
||||
return TryResolveTypedInst(inst);
|
||||
}
|
||||
case CARBON_KIND(SemIR::IntLiteral inst): {
|
||||
case CARBON_KIND(SemIR::IntValue inst): {
|
||||
return TryResolveTypedInst(inst);
|
||||
}
|
||||
case CARBON_KIND(SemIR::IntType inst): {
|
||||
@@ -2093,13 +2093,13 @@ class ImportRefResolver {
|
||||
.elements_id = elements_id});
|
||||
}
|
||||
|
||||
auto TryResolveTypedInst(SemIR::IntLiteral inst) -> ResolveResult {
|
||||
auto TryResolveTypedInst(SemIR::IntValue inst) -> ResolveResult {
|
||||
auto type_id = GetLocalConstantId(inst.type_id);
|
||||
if (HasNewWork()) {
|
||||
return Retry();
|
||||
}
|
||||
|
||||
return ResolveAs<SemIR::IntLiteral>(
|
||||
return ResolveAs<SemIR::IntValue>(
|
||||
{.type_id = context_.GetTypeIdForTypeConstant(type_id),
|
||||
.int_id = context_.ints().Add(import_ir_.ints().Get(inst.int_id))});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user