Rename singleton InstId constants to TypeInstId (#5323)

These constant instructions are all TypeInstId already in their type,
and this makes their names match.

Change the name of MakeSingletonInstId as well and update its comment.
This commit is contained in:
Dana Jansens
2025-04-17 18:57:20 +00:00
committed by GitHub
parent bf32da8dad
commit c38e723dd8
26 changed files with 113 additions and 104 deletions
+2 -2
View File
@@ -143,7 +143,7 @@ auto ImplWitnessStartDefinition(Context& context, SemIR::Impl& impl) -> void {
CARBON_CHECK(decl_id.has_value(), "Non-constant associated entity");
if (auto decl =
context.insts().TryGetAs<SemIR::AssociatedConstantDecl>(decl_id)) {
if (witness_value == SemIR::ImplWitnessTablePlaceholder::InstId) {
if (witness_value == SemIR::ImplWitnessTablePlaceholder::TypeInstId) {
CARBON_DIAGNOSTIC(ImplAssociatedConstantNeedsValue, Error,
"associated constant {0} not given a value in impl "
"of interface {1}",
@@ -251,7 +251,7 @@ auto FillImplWitnessWithErrors(Context& context, SemIR::Impl& impl) -> void {
auto witness_block =
context.inst_blocks().GetMutable(witness_table.elements_id);
for (auto& elem : witness_block) {
if (elem == SemIR::ImplWitnessTablePlaceholder::InstId) {
if (elem == SemIR::ImplWitnessTablePlaceholder::TypeInstId) {
elem = SemIR::ErrorInst::InstId;
}
}