mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 14:31:03 +01:00
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:
@@ -199,6 +199,7 @@ extern library "basic" fn F();
|
||||
// CHECK:STDOUT: .Self = constants.%C
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: .G = %G.decl
|
||||
// CHECK:STDOUT: complete_type_witness = %.loc15
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F();
|
||||
|
||||
Vendored
+4
@@ -157,6 +157,7 @@ fn CallFAndGIncomplete() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%D
|
||||
// CHECK:STDOUT: complete_type_witness = %.loc37
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @ReturnCUnused() -> %C;
|
||||
@@ -189,6 +190,8 @@ fn CallFAndGIncomplete() {
|
||||
// CHECK:STDOUT: %ReturnDUnused.type: type = fn_type @ReturnDUnused [template]
|
||||
// CHECK:STDOUT: %ReturnDUnused: %ReturnDUnused.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %D: type = class_type @D [template]
|
||||
// CHECK:STDOUT: %.1: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: %.2: <witness> = complete_type_witness %.1 [template]
|
||||
// CHECK:STDOUT: %ReturnDUsed.type: type = fn_type @ReturnDUsed [template]
|
||||
// CHECK:STDOUT: %ReturnDUsed: %ReturnDUsed.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -224,6 +227,7 @@ fn CallFAndGIncomplete() {
|
||||
// CHECK:STDOUT: class @D {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = imports.%import_ref.8
|
||||
// CHECK:STDOUT: complete_type_witness = constants.%.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @CallFAndGIncomplete() {
|
||||
|
||||
Reference in New Issue
Block a user