Include the complete type witness for a class in its SemIR output. (#4599)

This seems slightly redundant for a locally-defined class, where there
will be a complete_type_witness instruction earlier in the class, but is
important for imported classes, where we're currently doing the wrong
thing in a way that's invisible in formatted SemIR.
This commit is contained in:
Richard Smith
2024-11-27 23:45:20 +00:00
committed by GitHub
parent d6ec885eb3
commit 4a10d29b99
225 changed files with 955 additions and 0 deletions
@@ -89,6 +89,7 @@ var w: Outer({}*).Inner({.a: i32}*) = v;
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%NoParams
// CHECK:STDOUT: complete_type_witness = %.loc4
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @EmptyParams {
@@ -96,6 +97,7 @@ var w: Outer({}*).Inner({.a: i32}*) = v;
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%EmptyParams.2
// CHECK:STDOUT: complete_type_witness = %.loc5
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
@@ -204,6 +206,7 @@ var w: Outer({}*).Inner({.a: i32}*) = v;
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%Outer.2
// CHECK:STDOUT: .Inner = %Inner.decl
// CHECK:STDOUT: complete_type_witness = %.loc7
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -218,6 +221,7 @@ var w: Outer({}*).Inner({.a: i32}*) = v;
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%Inner.2
// CHECK:STDOUT: complete_type_witness = %.loc6
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT: