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
+3 -3
View File
@@ -130,10 +130,10 @@ fn Main() {
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .NS = %.loc4
// CHECK:STDOUT: .NS = %NS
// CHECK:STDOUT: .Main = %Main
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc4: <namespace> = namespace [template] {
// CHECK:STDOUT: %NS: <namespace> = namespace [template] {
// CHECK:STDOUT: .C = %C.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {}
@@ -156,7 +156,7 @@ fn Main() {
// CHECK:STDOUT: fn @Main() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %package.ref: <namespace> = name_ref package, package [template = package]
// CHECK:STDOUT: %NS.ref: <namespace> = name_ref NS, file.%.loc4 [template = file.%.loc4]
// CHECK:STDOUT: %NS.ref: <namespace> = name_ref NS, file.%NS [template = file.%NS]
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %Foo.ref: <function> = name_ref Foo, @C.%Foo [template = @C.%Foo]
// CHECK:STDOUT: %.loc11: init () = call %Foo.ref()