Skip to content

Commit

Permalink
Readd the missing class !members list. (#4828)
Browse files Browse the repository at this point in the history
Thanks to danakj for spotting this was removed accidentally in #4732
  • Loading branch information
dwblaikie authored Jan 21, 2025
1 parent 943acf1 commit 667a010
Show file tree
Hide file tree
Showing 236 changed files with 3,492 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ let d: c = {};
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
Expand Down
19 changes: 19 additions & 0 deletions toolchain/check/testdata/alias/no_prelude/export_name.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ var d: D* = &c;
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- export.carbon
Expand All @@ -104,6 +107,7 @@ var d: D* = &c;
// CHECK:STDOUT: %import_ref.f42 = import_ref Main//base, C, unloaded
// CHECK:STDOUT: %import_ref.05a: type = import_ref Main//base, D, loaded [template = constants.%C]
// CHECK:STDOUT: %import_ref.8f2: <witness> = import_ref Main//base, loc4_10, loaded [template = constants.%complete_type]
// CHECK:STDOUT: %import_ref.2c4 = import_ref Main//base, inst14 [no loc], unloaded
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand All @@ -117,6 +121,9 @@ var d: D* = &c;
// CHECK:STDOUT:
// CHECK:STDOUT: class @C [from "base.carbon"] {
// CHECK:STDOUT: complete_type_witness = imports.%import_ref.8f2
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = imports.%import_ref.2c4
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- export_orig.carbon
Expand All @@ -131,6 +138,7 @@ var d: D* = &c;
// CHECK:STDOUT: %import_ref.3b0: type = import_ref Main//base, C, loaded [template = constants.%C]
// CHECK:STDOUT: %import_ref.909 = import_ref Main//base, D, unloaded
// CHECK:STDOUT: %import_ref.8f2: <witness> = import_ref Main//base, loc4_10, loaded [template = constants.%complete_type]
// CHECK:STDOUT: %import_ref.2c4 = import_ref Main//base, inst14 [no loc], unloaded
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand All @@ -144,6 +152,9 @@ var d: D* = &c;
// CHECK:STDOUT:
// CHECK:STDOUT: class @C [from "base.carbon"] {
// CHECK:STDOUT: complete_type_witness = imports.%import_ref.8f2
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = imports.%import_ref.2c4
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- use_export.carbon
Expand All @@ -158,6 +169,7 @@ var d: D* = &c;
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %import_ref.c3f: type = import_ref Main//export, D, loaded [template = constants.%C]
// CHECK:STDOUT: %import_ref.8db: <witness> = import_ref Main//export, inst20 [indirect], loaded [template = constants.%complete_type]
// CHECK:STDOUT: %import_ref.6a9 = import_ref Main//export, inst21 [indirect], unloaded
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand All @@ -177,6 +189,9 @@ var d: D* = &c;
// CHECK:STDOUT:
// CHECK:STDOUT: class @C [from "export.carbon"] {
// CHECK:STDOUT: complete_type_witness = imports.%import_ref.8db
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = imports.%import_ref.6a9
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
Expand Down Expand Up @@ -234,6 +249,7 @@ var d: D* = &c;
// CHECK:STDOUT: %import_ref.c3f: type = import_ref Main//export, D, loaded [template = constants.%C]
// CHECK:STDOUT: %import_ref.06e: type = import_ref Main//export_orig, C, loaded [template = constants.%C]
// CHECK:STDOUT: %import_ref.8db: <witness> = import_ref Main//export_orig, inst20 [indirect], loaded [template = constants.%complete_type]
// CHECK:STDOUT: %import_ref.6a9 = import_ref Main//export_orig, inst21 [indirect], unloaded
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand Down Expand Up @@ -265,6 +281,9 @@ var d: D* = &c;
// CHECK:STDOUT:
// CHECK:STDOUT: class @C [from "export_orig.carbon"] {
// CHECK:STDOUT: complete_type_witness = imports.%import_ref.8db
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = imports.%import_ref.6a9
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,17 @@ let c_var: c = d;
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @D {
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%D
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,8 @@ extern alias C = Class;
// CHECK:STDOUT: class @Class {
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%Class
// CHECK:STDOUT: }
// CHECK:STDOUT:
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ alias b = C;
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
Expand Down
11 changes: 11 additions & 0 deletions toolchain/check/testdata/alias/no_prelude/import.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ var c: () = a_alias_alias;
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- class2.carbon
Expand All @@ -116,6 +119,7 @@ var c: () = a_alias_alias;
// CHECK:STDOUT: %import_ref.204: type = import_ref Main//class1, c_alias, loaded [template = constants.%C]
// CHECK:STDOUT: %import_ref.6da = import_ref Main//class1, a, unloaded
// CHECK:STDOUT: %import_ref.8f2: <witness> = import_ref Main//class1, loc4_10, loaded [template = constants.%complete_type]
// CHECK:STDOUT: %import_ref.2c4 = import_ref Main//class1, inst14 [no loc], unloaded
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand Down Expand Up @@ -143,6 +147,9 @@ var c: () = a_alias_alias;
// CHECK:STDOUT:
// CHECK:STDOUT: class @C [from "class1.carbon"] {
// CHECK:STDOUT: complete_type_witness = imports.%import_ref.8f2
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = imports.%import_ref.2c4
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- class3.carbon
Expand All @@ -158,6 +165,7 @@ var c: () = a_alias_alias;
// CHECK:STDOUT: %import_ref.3fd: type = import_ref Main//class2, c_alias_alias, loaded [template = constants.%C]
// CHECK:STDOUT: %import_ref.b9b = import_ref Main//class2, b, unloaded
// CHECK:STDOUT: %import_ref.8db: <witness> = import_ref Main//class2, inst21 [indirect], loaded [template = constants.%complete_type]
// CHECK:STDOUT: %import_ref.6a9 = import_ref Main//class2, inst22 [indirect], unloaded
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand All @@ -181,6 +189,9 @@ var c: () = a_alias_alias;
// CHECK:STDOUT:
// CHECK:STDOUT: class @C [from "class2.carbon"] {
// CHECK:STDOUT: complete_type_witness = imports.%import_ref.8db
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = imports.%import_ref.6a9
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- var1.carbon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ var inst: Test.A = {};
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- def.impl.carbon
Expand All @@ -89,6 +92,7 @@ var inst: Test.A = {};
// CHECK:STDOUT: %import_ref.f42 = import_ref Test//def, C, unloaded
// CHECK:STDOUT: %import_ref.323: type = import_ref Test//def, A, loaded [template = constants.%C]
// CHECK:STDOUT: %import_ref.8f2: <witness> = import_ref Test//def, loc4_10, loaded [template = constants.%complete_type]
// CHECK:STDOUT: %import_ref.2c4 = import_ref Test//def, inst14 [no loc], unloaded
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
Expand All @@ -110,6 +114,9 @@ var inst: Test.A = {};
// CHECK:STDOUT:
// CHECK:STDOUT: class @C [from "def.carbon"] {
// CHECK:STDOUT: complete_type_witness = imports.%import_ref.8f2
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = imports.%import_ref.2c4
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
Expand Down
9 changes: 9 additions & 0 deletions toolchain/check/testdata/alias/no_prelude/import_order.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ var a_val: a = {.v = b_val.v};
// CHECK:STDOUT: %.var: ref %C.elem = var <invalid>
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.v [template = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C
// CHECK:STDOUT: .v = %.loc4_16
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- b.carbon
Expand All @@ -88,6 +92,7 @@ var a_val: a = {.v = b_val.v};
// CHECK:STDOUT: %import_ref.610: type = import_ref Main//a, c, loaded [template = constants.%C]
// CHECK:STDOUT: %import_ref.14f: type = import_ref Main//a, d, loaded [template = constants.%C]
// CHECK:STDOUT: %import_ref.146: <witness> = import_ref Main//a, loc4_22, loaded [template = constants.%complete_type]
// CHECK:STDOUT: %import_ref.2c4 = import_ref Main//a, inst14 [no loc], unloaded
// CHECK:STDOUT: %import_ref.f99: %C.elem = import_ref Main//a, loc4_16, loaded [template = %.2fc]
// CHECK:STDOUT: }
// CHECK:STDOUT:
Expand Down Expand Up @@ -136,6 +141,10 @@ var a_val: a = {.v = b_val.v};
// CHECK:STDOUT:
// CHECK:STDOUT: class @C [from "a.carbon"] {
// CHECK:STDOUT: complete_type_witness = imports.%import_ref.146
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = imports.%import_ref.2c4
// CHECK:STDOUT: .v = imports.%import_ref.f99
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
Expand Down
4 changes: 4 additions & 0 deletions toolchain/check/testdata/alias/no_prelude/in_namespace.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ fn F() -> NS.a {
// CHECK:STDOUT: %.var: ref %C.elem = var <invalid>
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.v [template = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C
// CHECK:STDOUT: .v = %.loc11_16
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F() -> %return.param_patt: %C {
Expand Down
Loading

0 comments on commit 667a010

Please sign in to comment.