Make namespace formatting more consistent with other declaration block instructions. (#3732)

List names vertically rather than horizontally.
This commit is contained in:
Richard Smith
2024-02-28 22:20:37 +00:00
committed by GitHub
parent 5f4e6c768a
commit 5543602a50
379 changed files with 2051 additions and 622 deletions
@@ -14,7 +14,9 @@ fn Main() {
// CHECK:STDOUT: --- fail_not_found.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace {.Main = %Main} [template]
// CHECK:STDOUT: package: <namespace> = namespace {
// CHECK:STDOUT: .Main = %Main
// CHECK:STDOUT: } [template]
// CHECK:STDOUT: %Main: <function> = fn_decl @Main {} [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
+15 -4
View File
@@ -50,7 +50,10 @@ fn Main() {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace {.x = %x, .Main = %Main} [template]
// CHECK:STDOUT: package: <namespace> = namespace {
// CHECK:STDOUT: .x = %x
// CHECK:STDOUT: .Main = %Main
// CHECK:STDOUT: } [template]
// CHECK:STDOUT: %x.var: ref i32 = var x
// CHECK:STDOUT: %x: ref i32 = bind_name x, %x.var
// CHECK:STDOUT: %Main: <function> = fn_decl @Main {} [template]
@@ -86,7 +89,10 @@ fn Main() {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace {.x = %x, .Main = %Main} [template]
// CHECK:STDOUT: package: <namespace> = namespace {
// CHECK:STDOUT: .x = %x
// CHECK:STDOUT: .Main = %Main
// CHECK:STDOUT: } [template]
// CHECK:STDOUT: %x.var: ref i32 = var x
// CHECK:STDOUT: %x: ref i32 = bind_name x, %x.var
// CHECK:STDOUT: %Main: <function> = fn_decl @Main {} [template]
@@ -123,8 +129,13 @@ fn Main() {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace {.NS = %.loc4, .Main = %Main} [template]
// CHECK:STDOUT: %.loc4: <namespace> = namespace {.C = %C.decl} [template]
// CHECK:STDOUT: package: <namespace> = namespace {
// CHECK:STDOUT: .NS = %.loc4
// CHECK:STDOUT: .Main = %Main
// CHECK:STDOUT: } [template]
// CHECK:STDOUT: %.loc4: <namespace> = namespace {
// CHECK:STDOUT: .C = %C.decl
// CHECK:STDOUT: } [template]
// CHECK:STDOUT: %C.decl = class_decl @C {} [template = constants.%C]
// CHECK:STDOUT: %Main: <function> = fn_decl @Main {} [template]
// CHECK:STDOUT: }