Make semir scope labels only print when non-empty (#6780)

This shifts logic a little so that empty top-level scopes are printed
less often. This affects imports mainly for now, but should be expected
to affect the soon-to-be-added generated scope more significantly.

Assisted-by: Google Antigravity with Gemini 3 Flash
This commit is contained in:
Jon Ross-Perkins
2026-02-25 00:28:59 +00:00
committed by GitHub
parent c46cd65bd0
commit e2bdbe8507
160 changed files with 96 additions and 892 deletions
@@ -140,9 +140,6 @@ fn NonConstNonConst(p: X**) { TakeNonConstConst(p); }
// CHECK:STDOUT: %ptr.0ab: type = ptr_type %ptr.d4c [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @NonConst(%p.param: %ptr.2a9) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %TakeNonConst.ref: %TakeNonConst.type = name_ref TakeNonConst, file.%TakeNonConst.decl [concrete = constants.%TakeNonConst]
@@ -191,9 +188,6 @@ fn NonConstNonConst(p: X**) { TakeNonConstConst(p); }
// CHECK:STDOUT: %ptr.e9d: type = ptr_type %const.cbb [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @NonConstNonConst(%p.param: %ptr.8a5) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %TakeConstConst.ref: %TakeConstConst.type = name_ref TakeConstConst, file.%TakeConstConst.decl [concrete = constants.%TakeConstConst]