mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user