Change Namespace formatting to use the scope's name. (#3782)

This change only affects the generated IR, but I think it's cleaning up
an existing issue with namespace name printing.
This commit is contained in:
Jon Ross-Perkins
2024-03-14 21:12:26 +00:00
committed by GitHub
parent 28d76e6164
commit 295c8eb97f
24 changed files with 136 additions and 129 deletions
+7
View File
@@ -531,6 +531,13 @@ class InstNamer {
add_inst_name_id(inst.As<NameRef>().name_id, ".ref");
continue;
}
// The namespace is specified here due to the name conflict.
case SemIR::Namespace::Kind: {
add_inst_name_id(sem_ir_.name_scopes()
.Get(inst.As<SemIR::Namespace>().name_scope_id)
.name_id);
continue;
}
case Param::Kind: {
add_inst_name_id(inst.As<Param>().name_id);
continue;