diff --git a/toolchain/check/testdata/alias/fail_bool_value.carbon b/toolchain/check/testdata/alias/fail_bool_value.carbon index 575ca910440c..26e33da70052 100644 --- a/toolchain/check/testdata/alias/fail_bool_value.carbon +++ b/toolchain/check/testdata/alias/fail_bool_value.carbon @@ -18,9 +18,9 @@ let a_test: bool = a; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: bool = bool_literal false [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Bool = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -31,8 +31,8 @@ let a_test: bool = a; // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %.loc14: bool = bool_literal false [template = constants.%.1] // CHECK:STDOUT: %a: = bind_alias a, [template = ] -// CHECK:STDOUT: %import_ref: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct] -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct() [template = bool] +// CHECK:STDOUT: %import_ref: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc15_13.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc15_13.2: type = converted %bool.make_type, %.loc15_13.1 [template = bool] // CHECK:STDOUT: %a.ref: = name_ref a, %a [template = ] diff --git a/toolchain/check/testdata/alias/fail_builtins.carbon b/toolchain/check/testdata/alias/fail_builtins.carbon index eee1ea19bf16..aceb91cbe720 100644 --- a/toolchain/check/testdata/alias/fail_builtins.carbon +++ b/toolchain/check/testdata/alias/fail_builtins.carbon @@ -22,11 +22,11 @@ alias b = bool; // CHECK:STDOUT: --- fail_builtins.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.2: Bool = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -36,11 +36,11 @@ alias b = bool; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %a: = bind_alias a, [template = ] -// CHECK:STDOUT: %import_ref.2: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %import_ref.2: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %b: = bind_alias b, [template = ] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/alias/no_prelude/fail_local_in_namespace.carbon b/toolchain/check/testdata/alias/no_prelude/fail_local_in_namespace.carbon index 17841af31ae9..83d621c6aca0 100644 --- a/toolchain/check/testdata/alias/no_prelude/fail_local_in_namespace.carbon +++ b/toolchain/check/testdata/alias/no_prelude/fail_local_in_namespace.carbon @@ -30,9 +30,9 @@ fn F() -> {} { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -41,7 +41,7 @@ fn F() -> {} { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %NS: = namespace [template] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %.loc13_12.1: {} = struct_literal () // CHECK:STDOUT: %.loc13_12.2: type = converted %.loc13_12.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: @F.%return: ref {} = var diff --git a/toolchain/check/testdata/alias/no_prelude/fail_not_constant.carbon b/toolchain/check/testdata/alias/no_prelude/fail_not_constant.carbon index 611b0d51393e..cd18e03ae1e0 100644 --- a/toolchain/check/testdata/alias/no_prelude/fail_not_constant.carbon +++ b/toolchain/check/testdata/alias/no_prelude/fail_not_constant.carbon @@ -20,9 +20,9 @@ fn F() { // CHECK:STDOUT: --- fail_not_constant.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %tuple: () = tuple_value () [template] // CHECK:STDOUT: %.2: type = ptr_type () [template] // CHECK:STDOUT: } @@ -31,7 +31,7 @@ fn F() { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { diff --git a/toolchain/check/testdata/alias/no_prelude/in_namespace.carbon b/toolchain/check/testdata/alias/no_prelude/in_namespace.carbon index 26b52591fa65..a97bde41e3ac 100644 --- a/toolchain/check/testdata/alias/no_prelude/in_namespace.carbon +++ b/toolchain/check/testdata/alias/no_prelude/in_namespace.carbon @@ -28,9 +28,9 @@ fn F() -> NS.a { // CHECK:STDOUT: %.3: type = struct_type {.v: ()} [template] // CHECK:STDOUT: %.4: type = ptr_type {.v: ()} [template] // CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct.1: C = struct_value (%tuple) [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %struct: C = struct_value (%tuple) [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -53,12 +53,12 @@ fn F() -> NS.a { // CHECK:STDOUT: %.loc16_23.3: ref () = class_element_access %.loc16_23.2, element0 // CHECK:STDOUT: %.loc16_22.2: init () = tuple_init () to %.loc16_23.3 [template = constants.%tuple] // CHECK:STDOUT: %.loc16_23.4: init () = converted %.loc16_22.1, %.loc16_22.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc16_23.5: init C = class_init (%.loc16_23.4), %.loc16_23.2 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc16_23.5: init C = class_init (%.loc16_23.4), %.loc16_23.2 [template = constants.%struct] // CHECK:STDOUT: %.loc16_23.6: ref C = temporary %.loc16_23.2, %.loc16_23.5 // CHECK:STDOUT: %.loc16_24.1: ref C = converted %.loc16_23.1, %.loc16_23.6 // CHECK:STDOUT: %.loc16_24.2: C = bind_value %.loc16_24.1 // CHECK:STDOUT: %b: C = bind_name b, %.loc16_24.2 -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %NS.ref.loc18: = name_ref NS, %NS [template = %NS] // CHECK:STDOUT: %a.ref.loc18: type = name_ref a, %a [template = constants.%C] // CHECK:STDOUT: @F.%return: ref C = var @@ -82,8 +82,8 @@ fn F() -> NS.a { // CHECK:STDOUT: %.loc19_18.2: ref () = class_element_access %return, element0 // CHECK:STDOUT: %.loc19_17.2: init () = tuple_init () to %.loc19_18.2 [template = constants.%tuple] // CHECK:STDOUT: %.loc19_18.3: init () = converted %.loc19_17.1, %.loc19_17.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc19_18.4: init C = class_init (%.loc19_18.3), %return [template = constants.%struct.1] -// CHECK:STDOUT: %.loc19_19: init C = converted %.loc19_18.1, %.loc19_18.4 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc19_18.4: init C = class_init (%.loc19_18.3), %return [template = constants.%struct] +// CHECK:STDOUT: %.loc19_19: init C = converted %.loc19_18.1, %.loc19_18.4 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_19 to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/alias/no_prelude/local.carbon b/toolchain/check/testdata/alias/no_prelude/local.carbon index b07f889f7a40..a54421aa35c3 100644 --- a/toolchain/check/testdata/alias/no_prelude/local.carbon +++ b/toolchain/check/testdata/alias/no_prelude/local.carbon @@ -18,8 +18,8 @@ fn F() -> () { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %tuple: () = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -27,7 +27,7 @@ fn F() -> () { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %.loc11_12.1: () = tuple_literal () // CHECK:STDOUT: %.loc11_12.2: type = converted %.loc11_12.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: @F.%return: ref () = var diff --git a/toolchain/check/testdata/array/array_in_place.carbon b/toolchain/check/testdata/array/array_in_place.carbon index 9aa38d5147ed..4c22e95936e3 100644 --- a/toolchain/check/testdata/array/array_in_place.carbon +++ b/toolchain/check/testdata/array/array_in_place.carbon @@ -17,15 +17,15 @@ fn G() { // CHECK:STDOUT: --- array_in_place.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type, type, type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32, i32, i32) [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.4: i32 = int_literal 2 [template] // CHECK:STDOUT: %.5: type = array_type %.4, (i32, i32, i32) [template] // CHECK:STDOUT: %.6: type = ptr_type (i32, i32, i32) [template] @@ -42,13 +42,13 @@ fn G() { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11_12: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc11_17: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc11_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc11_12: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_17: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_25.1: (type, type, type) = tuple_literal (%int.make_type_32.loc11_12, %int.make_type_32.loc11_17, %int.make_type_32.loc11_22) // CHECK:STDOUT: %.loc11_25.2: type = value_of_initializer %int.make_type_32.loc11_12 [template = i32] // CHECK:STDOUT: %.loc11_25.3: type = converted %int.make_type_32.loc11_12, %.loc11_25.2 [template = i32] @@ -59,10 +59,10 @@ fn G() { // CHECK:STDOUT: %.loc11_25.8: type = converted %.loc11_25.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: @F.%return: ref (i32, i32, i32) = var // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] {} -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -71,9 +71,9 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32.loc14_12: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc14_17: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc14_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_12: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_17: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_25.1: (type, type, type) = tuple_literal (%int.make_type_32.loc14_12, %int.make_type_32.loc14_17, %int.make_type_32.loc14_22) // CHECK:STDOUT: %.loc14_28: i32 = int_literal 2 [template = constants.%.4] // CHECK:STDOUT: %.loc14_25.2: type = value_of_initializer %int.make_type_32.loc14_12 [template = i32] @@ -86,13 +86,13 @@ fn G() { // CHECK:STDOUT: %.loc14_29: type = array_type %.loc14_28, (i32, i32, i32) [template = constants.%.5] // CHECK:STDOUT: %v.var: ref [(i32, i32, i32); 2] = var v // CHECK:STDOUT: %v: ref [(i32, i32, i32); 2] = bind_name v, %v.var -// CHECK:STDOUT: %F.ref.loc14_34: F = name_ref F, file.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref.loc14_34: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc14_42.3: ref (i32, i32, i32) = splice_block %.loc14_42.2 { // CHECK:STDOUT: %.loc14_42.1: i32 = int_literal 0 [template = constants.%.9] // CHECK:STDOUT: %.loc14_42.2: ref (i32, i32, i32) = array_index %v.var, %.loc14_42.1 // CHECK:STDOUT: } // CHECK:STDOUT: %F.call.loc14_35: init (i32, i32, i32) = call %F.ref.loc14_34() to %.loc14_42.3 -// CHECK:STDOUT: %F.ref.loc14_39: F = name_ref F, file.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref.loc14_39: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc14_42.6: ref (i32, i32, i32) = splice_block %.loc14_42.5 { // CHECK:STDOUT: %.loc14_42.4: i32 = int_literal 1 [template = constants.%.10] // CHECK:STDOUT: %.loc14_42.5: ref (i32, i32, i32) = array_index %v.var, %.loc14_42.4 diff --git a/toolchain/check/testdata/array/array_vs_tuple.carbon b/toolchain/check/testdata/array/array_vs_tuple.carbon index 45485ec809f4..48764806482e 100644 --- a/toolchain/check/testdata/array/array_vs_tuple.carbon +++ b/toolchain/check/testdata/array/array_vs_tuple.carbon @@ -17,11 +17,11 @@ fn G() { // CHECK:STDOUT: --- array_vs_tuple.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %G: type = fn_type @G [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: G = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] +// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] // CHECK:STDOUT: %.4: type = ptr_type [i32; 3] [template] @@ -41,16 +41,16 @@ fn G() { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_16: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc13_11.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_11.2: type = converted %int.make_type_32.loc13, %.loc13_11.1 [template = i32] @@ -73,9 +73,9 @@ fn G() { // CHECK:STDOUT: %.loc13_29.11: init [i32; 3] = array_init (%.loc13_29.4, %.loc13_29.7, %.loc13_29.10) to %a.var [template = constants.%array] // CHECK:STDOUT: %.loc13_30: init [i32; 3] = converted %.loc13_29.1, %.loc13_29.11 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc13_30 -// CHECK:STDOUT: %int.make_type_32.loc14_11: init type = call constants.%struct.2() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc14_16: init type = call constants.%struct.2() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc14_21: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_11: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_16: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_24.1: (type, type, type) = tuple_literal (%int.make_type_32.loc14_11, %int.make_type_32.loc14_16, %int.make_type_32.loc14_21) // CHECK:STDOUT: %.loc14_24.2: type = value_of_initializer %int.make_type_32.loc14_11 [template = i32] // CHECK:STDOUT: %.loc14_24.3: type = converted %int.make_type_32.loc14_11, %.loc14_24.2 [template = i32] diff --git a/toolchain/check/testdata/array/assign_return_value.carbon b/toolchain/check/testdata/array/assign_return_value.carbon index 0e0f931569c2..4d4eb65c9c83 100644 --- a/toolchain/check/testdata/array/assign_return_value.carbon +++ b/toolchain/check/testdata/array/assign_return_value.carbon @@ -17,17 +17,17 @@ fn Run() { // CHECK:STDOUT: --- assign_return_value.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32) [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.4: i32 = int_literal 0 [template] // CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.4) [template] -// CHECK:STDOUT: %Run: type = fn_type @Run [template] -// CHECK:STDOUT: %struct.3: Run = struct_value () [template] +// CHECK:STDOUT: %Run.type: type = fn_type @Run [template] +// CHECK:STDOUT: %Run: = struct_value () [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: type = array_type %.5, i32 [template] // CHECK:STDOUT: %.7: type = ptr_type [i32; 1] [template] @@ -40,17 +40,17 @@ fn Run() { // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_16.1: (type,) = tuple_literal (%int.make_type_32) // CHECK:STDOUT: %.loc11_16.2: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_16.3: type = converted %int.make_type_32, %.loc11_16.2 [template = i32] // CHECK:STDOUT: %.loc11_16.4: type = converted %.loc11_16.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: @F.%return: ref (i32,) = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Run.decl: Run = fn_decl @Run [template = constants.%struct.3] {} -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -66,14 +66,14 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_16: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc14_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_11.2: type = converted %int.make_type_32, %.loc14_11.1 [template = i32] // CHECK:STDOUT: %.loc14_17: type = array_type %.loc14_16, i32 [template = constants.%.6] // CHECK:STDOUT: %t.var: ref [i32; 1] = var t // CHECK:STDOUT: %t: ref [i32; 1] = bind_name t, %t.var -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init (i32,) = call %F.ref() // CHECK:STDOUT: %.loc14_22.1: ref (i32,) = temporary_storage // CHECK:STDOUT: %.loc14_22.2: ref (i32,) = temporary %.loc14_22.1, %F.call diff --git a/toolchain/check/testdata/array/assign_var.carbon b/toolchain/check/testdata/array/assign_var.carbon index 1925c85d10de..b249a8131b40 100644 --- a/toolchain/check/testdata/array/assign_var.carbon +++ b/toolchain/check/testdata/array/assign_var.carbon @@ -14,9 +14,9 @@ var b: [i32; 3] = a; // CHECK:STDOUT: --- assign_var.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type, type, type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32, i32, i32) [template] // CHECK:STDOUT: %.4: type = ptr_type (i32, i32, i32) [template] @@ -36,12 +36,12 @@ var b: [i32; 3] = a; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%struct() [template = i32] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%struct() [template = i32] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_22.1: (type, type, type) = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14, %int.make_type_32.loc11_19) // CHECK:STDOUT: %.loc11_22.2: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_22.3: type = converted %int.make_type_32.loc11_9, %.loc11_22.2 [template = i32] @@ -52,8 +52,8 @@ var b: [i32; 3] = a; // CHECK:STDOUT: %.loc11_22.8: type = converted %.loc11_22.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %a.var: ref (i32, i32, i32) = var a // CHECK:STDOUT: %a: ref (i32, i32, i32) = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_14: i32 = int_literal 3 [template = constants.%.7] // CHECK:STDOUT: %.loc12_9.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_9.2: type = converted %int.make_type_32.loc12, %.loc12_9.1 [template = i32] diff --git a/toolchain/check/testdata/array/base.carbon b/toolchain/check/testdata/array/base.carbon index c7574a88dffb..702772913469 100644 --- a/toolchain/check/testdata/array/base.carbon +++ b/toolchain/check/testdata/array/base.carbon @@ -15,9 +15,9 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: --- base.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] // CHECK:STDOUT: %.4: type = ptr_type [i32; 1] [template] @@ -25,8 +25,8 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: %.6: i32 = int_literal 0 [template] // CHECK:STDOUT: %array.1: [i32; 1] = tuple_value (%.2) [template] // CHECK:STDOUT: %.7: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] -// CHECK:STDOUT: %struct.2: Float = struct_value () [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] +// CHECK:STDOUT: %Float: = struct_value () [template] // CHECK:STDOUT: %.8: i32 = int_literal 2 [template] // CHECK:STDOUT: %.9: type = array_type %.8, f64 [template] // CHECK:STDOUT: %.10: type = ptr_type [f64; 2] [template] @@ -52,8 +52,8 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32, %.loc11_9.1 [template = i32] @@ -61,8 +61,8 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: %a.var: ref [i32; 1] = var a // CHECK:STDOUT: %a: ref [i32; 1] = bind_name a, %a.var // CHECK:STDOUT: %.loc12_9.1: i32 = int_literal 64 [template = constants.%.7] -// CHECK:STDOUT: %import_ref.2: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %float.make_type: init type = call constants.%struct.2(%.loc12_9.1) [template = f64] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc12_9.1) [template = f64] // CHECK:STDOUT: %.loc12_14: i32 = int_literal 2 [template = constants.%.8] // CHECK:STDOUT: %.loc12_9.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc12_9.3: type = converted %float.make_type, %.loc12_9.2 [template = f64] diff --git a/toolchain/check/testdata/array/canonicalize_index.carbon b/toolchain/check/testdata/array/canonicalize_index.carbon index da3d3fa2490a..4d165c6f519e 100644 --- a/toolchain/check/testdata/array/canonicalize_index.carbon +++ b/toolchain/check/testdata/array/canonicalize_index.carbon @@ -16,11 +16,11 @@ let b: [i32; 3]* = &a; // CHECK:STDOUT: --- canonicalize_index.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Add: type = fn_type @Add [template] -// CHECK:STDOUT: %struct.2: Add = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Add.type: type = fn_type @Add [template] +// CHECK:STDOUT: %Add: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 3 [template] @@ -38,28 +38,28 @@ let b: [i32; 3]* = &a; // CHECK:STDOUT: .a = %a.loc13 // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Add.decl: Add = fn_decl @Add [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Add.decl: = fn_decl @Add [template = constants.%Add] { +// CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32] // CHECK:STDOUT: %a.loc11_8.1: i32 = param a // CHECK:STDOUT: @Add.%a: i32 = bind_name a, %a.loc11_8.1 -// CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_32.loc11_19 [template = i32] // CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_32.loc11_19, %.loc11_19.1 [template = i32] // CHECK:STDOUT: %b.loc11_16.1: i32 = param b // CHECK:STDOUT: @Add.%b: i32 = bind_name b, %b.loc11_16.1 -// CHECK:STDOUT: %int.make_type_32.loc11_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_27.1: type = value_of_initializer %int.make_type_32.loc11_27 [template = i32] // CHECK:STDOUT: %.loc11_27.2: type = converted %int.make_type_32.loc11_27, %.loc11_27.1 [template = i32] // CHECK:STDOUT: @Add.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %Add.ref: Add = name_ref Add, %Add.decl [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %Add.ref: = name_ref Add, %Add.decl [template = constants.%Add] // CHECK:STDOUT: %.loc13_18: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc13_21: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.sadd: init i32 = call %Add.ref(%.loc13_18, %.loc13_21) [template = constants.%.4] @@ -68,8 +68,8 @@ let b: [i32; 3]* = &a; // CHECK:STDOUT: %.loc13_23: type = array_type %int.sadd, i32 [template = constants.%.5] // CHECK:STDOUT: %a.var: ref [i32; 3] = var a // CHECK:STDOUT: %a.loc13: ref [i32; 3] = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_14: i32 = int_literal 3 [template = constants.%.4] // CHECK:STDOUT: %.loc14_9.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] // CHECK:STDOUT: %.loc14_9.2: type = converted %int.make_type_32.loc14, %.loc14_9.1 [template = i32] diff --git a/toolchain/check/testdata/array/fail_bound_negative.carbon b/toolchain/check/testdata/array/fail_bound_negative.carbon index f3c4d6c68b97..f72bd5b57efd 100644 --- a/toolchain/check/testdata/array/fail_bound_negative.carbon +++ b/toolchain/check/testdata/array/fail_bound_negative.carbon @@ -18,11 +18,11 @@ var a: [i32; Negate(1)]; // CHECK:STDOUT: --- fail_bound_negative.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Negate: type = fn_type @Negate [template] -// CHECK:STDOUT: %struct.2: Negate = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] +// CHECK:STDOUT: %Negate: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal -1 [template] // CHECK:STDOUT: } @@ -34,22 +34,22 @@ var a: [i32; Negate(1)]; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Negate.decl: Negate = fn_decl @Negate [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_32.loc11_14 [template = i32] // CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_32.loc11_14, %.loc11_14.1 [template = i32] // CHECK:STDOUT: %n.loc11_11.1: i32 = param n // CHECK:STDOUT: @Negate.%n: i32 = bind_name n, %n.loc11_11.1 -// CHECK:STDOUT: %int.make_type_32.loc11_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_22.1: type = value_of_initializer %int.make_type_32.loc11_22 [template = i32] // CHECK:STDOUT: %.loc11_22.2: type = converted %int.make_type_32.loc11_22, %.loc11_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %Negate.ref: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %Negate.ref: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc16_21: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %int.snegate: init i32 = call %Negate.ref(%.loc16_21) [template = constants.%.3] // CHECK:STDOUT: %.loc16_9.1: type = value_of_initializer %int.make_type_32.loc16 [template = i32] diff --git a/toolchain/check/testdata/array/fail_bound_overflow.carbon b/toolchain/check/testdata/array/fail_bound_overflow.carbon index 6cfe687e4b67..43f564d33108 100644 --- a/toolchain/check/testdata/array/fail_bound_overflow.carbon +++ b/toolchain/check/testdata/array/fail_bound_overflow.carbon @@ -29,9 +29,9 @@ var b: [1; 39999999999999999993]; // CHECK:STDOUT: --- fail_bound_overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -42,8 +42,8 @@ var b: [1; 39999999999999999993]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_9.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc18_9.2: type = converted %int.make_type_32, %.loc18_9.1 [template = i32] // CHECK:STDOUT: %.loc18_34: type = array_type , i32 [template = ] diff --git a/toolchain/check/testdata/array/fail_out_of_bound.carbon b/toolchain/check/testdata/array/fail_out_of_bound.carbon index 70ed9674f083..861e94bb95e1 100644 --- a/toolchain/check/testdata/array/fail_out_of_bound.carbon +++ b/toolchain/check/testdata/array/fail_out_of_bound.carbon @@ -16,9 +16,9 @@ var a: [i32; 1] = (1, 2, 3); // CHECK:STDOUT: --- fail_out_of_bound.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] // CHECK:STDOUT: %.4: type = ptr_type [i32; 1] [template] @@ -33,8 +33,8 @@ var a: [i32; 1] = (1, 2, 3); // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_14: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc14_9.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_9.2: type = converted %int.make_type_32, %.loc14_9.1 [template = i32] diff --git a/toolchain/check/testdata/array/fail_out_of_bound_non_literal.carbon b/toolchain/check/testdata/array/fail_out_of_bound_non_literal.carbon index db90d2b728c3..0b76220303d3 100644 --- a/toolchain/check/testdata/array/fail_out_of_bound_non_literal.carbon +++ b/toolchain/check/testdata/array/fail_out_of_bound_non_literal.carbon @@ -17,9 +17,9 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: --- fail_out_of_bound_non_literal.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] // CHECK:STDOUT: %.4: type = ptr_type [i32; 3] [template] @@ -29,7 +29,7 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: %.8: i32 = int_literal 0 [template] // CHECK:STDOUT: %array: [i32; 3] = tuple_value (%.5, %.6, %.2) [template] // CHECK:STDOUT: %.9: type = struct_type {.index: i32} [template] -// CHECK:STDOUT: %struct.2: {.index: i32} = struct_value (%.2) [template] +// CHECK:STDOUT: %struct: {.index: i32} = struct_value (%.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -39,16 +39,16 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32.loc11, %.loc11_9.1 [template = i32] // CHECK:STDOUT: %.loc11_15: type = array_type %.loc11_14, i32 [template = constants.%.3] // CHECK:STDOUT: %a.var: ref [i32; 3] = var a // CHECK:STDOUT: %a: ref [i32; 3] = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_32.loc15, %.loc15_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b @@ -78,8 +78,8 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: %a.ref: ref [i32; 3] = name_ref a, file.%a // CHECK:STDOUT: %.loc15_26: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc15_27.1: {.index: i32} = struct_literal (%.loc15_26) -// CHECK:STDOUT: %struct: {.index: i32} = struct_value (%.loc15_26) [template = constants.%struct.2] -// CHECK:STDOUT: %.loc15_27.2: {.index: i32} = converted %.loc15_27.1, %struct [template = constants.%struct.2] +// CHECK:STDOUT: %struct: {.index: i32} = struct_value (%.loc15_26) [template = constants.%struct] +// CHECK:STDOUT: %.loc15_27.2: {.index: i32} = converted %.loc15_27.1, %struct [template = constants.%struct] // CHECK:STDOUT: %.loc15_28: i32 = struct_access %.loc15_27.2, element0 [template = constants.%.2] // CHECK:STDOUT: %.loc15_34.1: ref i32 = array_index %a.ref, %.loc15_28 [template = ] // CHECK:STDOUT: %.loc15_34.2: i32 = bind_value %.loc15_34.1 diff --git a/toolchain/check/testdata/array/fail_type_mismatch.carbon b/toolchain/check/testdata/array/fail_type_mismatch.carbon index 40873fb76a1b..3c8886453e97 100644 --- a/toolchain/check/testdata/array/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/array/fail_type_mismatch.carbon @@ -36,9 +36,9 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: --- fail_type_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] // CHECK:STDOUT: %.4: type = ptr_type [i32; 3] [template] @@ -68,42 +68,42 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_14: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc15_9.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_9.2: type = converted %int.make_type_32.loc15, %.loc15_9.1 [template = i32] // CHECK:STDOUT: %.loc15_15: type = array_type %.loc15_14, i32 [template = constants.%.3] // CHECK:STDOUT: %a.var: ref [i32; 3] = var a // CHECK:STDOUT: %a: ref [i32; 3] = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_29.1: (type, type, type) = tuple_literal (%int.make_type_32.loc17, String, String) // CHECK:STDOUT: %.loc17_29.2: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_29.3: type = converted %int.make_type_32.loc17, %.loc17_29.2 [template = i32] // CHECK:STDOUT: %.loc17_29.4: type = converted %.loc17_29.1, constants.%.9 [template = constants.%.9] // CHECK:STDOUT: %t1.var: ref (i32, String, String) = var t1 // CHECK:STDOUT: %t1: ref (i32, String, String) = bind_name t1, %t1.var -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_14: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc22_9.1: type = value_of_initializer %int.make_type_32.loc22 [template = i32] // CHECK:STDOUT: %.loc22_9.2: type = converted %int.make_type_32.loc22, %.loc22_9.1 [template = i32] // CHECK:STDOUT: %.loc22_15: type = array_type %.loc22_14, i32 [template = constants.%.3] // CHECK:STDOUT: %b.var: ref [i32; 3] = var b // CHECK:STDOUT: %b: ref [i32; 3] = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc28: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc28: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc28_14: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc28_9.1: type = value_of_initializer %int.make_type_32.loc28 [template = i32] // CHECK:STDOUT: %.loc28_9.2: type = converted %int.make_type_32.loc28, %.loc28_9.1 [template = i32] // CHECK:STDOUT: %.loc28_15: type = array_type %.loc28_14, i32 [template = constants.%.3] // CHECK:STDOUT: %c.var: ref [i32; 3] = var c // CHECK:STDOUT: %c: ref [i32; 3] = bind_name c, %c.var -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc30_10: init type = call constants.%struct() [template = i32] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc30_15: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc30_10: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc30_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc30_18.1: (type, type) = tuple_literal (%int.make_type_32.loc30_10, %int.make_type_32.loc30_15) // CHECK:STDOUT: %.loc30_18.2: type = value_of_initializer %int.make_type_32.loc30_10 [template = i32] // CHECK:STDOUT: %.loc30_18.3: type = converted %int.make_type_32.loc30_10, %.loc30_18.2 [template = i32] @@ -112,8 +112,8 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: %.loc30_18.6: type = converted %.loc30_18.1, constants.%.15 [template = constants.%.15] // CHECK:STDOUT: %t2.var: ref (i32, i32) = var t2 // CHECK:STDOUT: %t2: ref (i32, i32) = bind_name t2, %t2.var -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc34: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc34_14: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc34_9.1: type = value_of_initializer %int.make_type_32.loc34 [template = i32] // CHECK:STDOUT: %.loc34_9.2: type = converted %int.make_type_32.loc34, %.loc34_9.1 [template = i32] diff --git a/toolchain/check/testdata/array/fail_undefined_bound.carbon b/toolchain/check/testdata/array/fail_undefined_bound.carbon index 5e97ae6c2ffa..6926d80d8cc6 100644 --- a/toolchain/check/testdata/array/fail_undefined_bound.carbon +++ b/toolchain/check/testdata/array/fail_undefined_bound.carbon @@ -16,9 +16,9 @@ var a: [i32; ]; // CHECK:STDOUT: --- fail_undefined_bound.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file {} diff --git a/toolchain/check/testdata/array/function_param.carbon b/toolchain/check/testdata/array/function_param.carbon index 57e49a3aa219..6ec84cd6f1eb 100644 --- a/toolchain/check/testdata/array/function_param.carbon +++ b/toolchain/check/testdata/array/function_param.carbon @@ -19,16 +19,16 @@ fn G() -> i32 { // CHECK:STDOUT: --- function_param.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.4: type = ptr_type [i32; 3] [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] // CHECK:STDOUT: %.7: type = tuple_type (i32, i32, i32) [template] @@ -43,30 +43,30 @@ fn G() -> i32 { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11_12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc11_12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_17: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc11_12.1: type = value_of_initializer %int.make_type_32.loc11_12 [template = i32] // CHECK:STDOUT: %.loc11_12.2: type = converted %int.make_type_32.loc11_12, %.loc11_12.1 [template = i32] // CHECK:STDOUT: %.loc11_18: type = array_type %.loc11_17, i32 [template = constants.%.3] // CHECK:STDOUT: %arr.loc11_6.1: [i32; 3] = param arr // CHECK:STDOUT: @F.%arr: [i32; 3] = bind_name arr, %arr.loc11_6.1 -// CHECK:STDOUT: %int.make_type_32.loc11_24: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_24.1: type = value_of_initializer %int.make_type_32.loc11_24 [template = i32] // CHECK:STDOUT: %.loc11_24.2: type = converted %int.make_type_32.loc11_24, %.loc11_24.1 [template = i32] // CHECK:STDOUT: %i.loc11_21.1: i32 = param i // CHECK:STDOUT: @F.%i: i32 = bind_name i, %i.loc11_21.1 -// CHECK:STDOUT: %int.make_type_32.loc11_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_32.1: type = value_of_initializer %int.make_type_32.loc11_32 [template = i32] // CHECK:STDOUT: %.loc11_32.2: type = converted %int.make_type_32.loc11_32, %.loc11_32.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_11.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_11.2: type = converted %int.make_type_32.loc15, %.loc15_11.1 [template = i32] // CHECK:STDOUT: @G.%return: ref i32 = var @@ -87,7 +87,7 @@ fn G() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc16_13: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc16_16: i32 = int_literal 2 [template = constants.%.6] // CHECK:STDOUT: %.loc16_19: i32 = int_literal 3 [template = constants.%.2] diff --git a/toolchain/check/testdata/array/index_not_literal.carbon b/toolchain/check/testdata/array/index_not_literal.carbon index 6bd8f4733b10..c26f3e362f12 100644 --- a/toolchain/check/testdata/array/index_not_literal.carbon +++ b/toolchain/check/testdata/array/index_not_literal.carbon @@ -14,9 +14,9 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: --- index_not_literal.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] // CHECK:STDOUT: %.4: type = ptr_type [i32; 3] [template] @@ -26,7 +26,7 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: %.8: i32 = int_literal 0 [template] // CHECK:STDOUT: %array: [i32; 3] = tuple_value (%.5, %.6, %.2) [template] // CHECK:STDOUT: %.9: type = struct_type {.index: i32} [template] -// CHECK:STDOUT: %struct.2: {.index: i32} = struct_value (%.6) [template] +// CHECK:STDOUT: %struct: {.index: i32} = struct_value (%.6) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -36,16 +36,16 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32.loc11, %.loc11_9.1 [template = i32] // CHECK:STDOUT: %.loc11_15: type = array_type %.loc11_14, i32 [template = constants.%.3] // CHECK:STDOUT: %a.var: ref [i32; 3] = var a // CHECK:STDOUT: %a: ref [i32; 3] = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_32.loc12, %.loc12_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b @@ -75,8 +75,8 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: %a.ref: ref [i32; 3] = name_ref a, file.%a // CHECK:STDOUT: %.loc12_26: i32 = int_literal 2 [template = constants.%.6] // CHECK:STDOUT: %.loc12_27.1: {.index: i32} = struct_literal (%.loc12_26) -// CHECK:STDOUT: %struct: {.index: i32} = struct_value (%.loc12_26) [template = constants.%struct.2] -// CHECK:STDOUT: %.loc12_27.2: {.index: i32} = converted %.loc12_27.1, %struct [template = constants.%struct.2] +// CHECK:STDOUT: %struct: {.index: i32} = struct_value (%.loc12_26) [template = constants.%struct] +// CHECK:STDOUT: %.loc12_27.2: {.index: i32} = converted %.loc12_27.1, %struct [template = constants.%struct] // CHECK:STDOUT: %.loc12_28: i32 = struct_access %.loc12_27.2, element0 [template = constants.%.6] // CHECK:STDOUT: %.loc12_34.1: ref i32 = array_index %a.ref, %.loc12_28 // CHECK:STDOUT: %.loc12_34.2: i32 = bind_value %.loc12_34.1 diff --git a/toolchain/check/testdata/array/nine_elements.carbon b/toolchain/check/testdata/array/nine_elements.carbon index 7c1acd87e601..4213a6f04692 100644 --- a/toolchain/check/testdata/array/nine_elements.carbon +++ b/toolchain/check/testdata/array/nine_elements.carbon @@ -13,9 +13,9 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: --- nine_elements.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 9 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] // CHECK:STDOUT: %.4: type = ptr_type [i32; 9] [template] @@ -38,8 +38,8 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14: i32 = int_literal 9 [template = constants.%.2] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32, %.loc11_9.1 [template = i32] diff --git a/toolchain/check/testdata/as/adapter_conversion.carbon b/toolchain/check/testdata/as/adapter_conversion.carbon index 299994b8417b..f40d37963faa 100644 --- a/toolchain/check/testdata/as/adapter_conversion.carbon +++ b/toolchain/check/testdata/as/adapter_conversion.carbon @@ -106,17 +106,17 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type A, i32 [template] -// CHECK:STDOUT: %Make: type = fn_type @Make [template] -// CHECK:STDOUT: %struct.2: Make = struct_value () [template] +// CHECK:STDOUT: %Make.type: type = fn_type @Make [template] +// CHECK:STDOUT: %Make: = struct_value () [template] // CHECK:STDOUT: %.3: type = struct_type {.x: i32, .y: i32} [template] // CHECK:STDOUT: %.4: type = ptr_type {.x: i32, .y: i32} [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] -// CHECK:STDOUT: %struct.3: A = struct_value (%.5, %.6) [template] +// CHECK:STDOUT: %struct: A = struct_value (%.5, %.6) [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %.7: type = ptr_type B [template] // CHECK:STDOUT: } @@ -131,8 +131,8 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} // CHECK:STDOUT: %A.ref.loc17: type = name_ref A, %A.decl [template = constants.%A] // CHECK:STDOUT: %a_ref.var: ref A = var a_ref @@ -161,15 +161,15 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_32.loc5, %.loc5_10.1 [template = i32] // CHECK:STDOUT: %.loc5_8: = field_decl x, element0 [template] -// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_32.loc6, %.loc6_10.1 [template = i32] // CHECK:STDOUT: %.loc6_8: = field_decl y, element1 [template] -// CHECK:STDOUT: %Make.decl: Make = fn_decl @Make [template = constants.%struct.2] { +// CHECK:STDOUT: %Make.decl: = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %return.var: ref A = var // CHECK:STDOUT: } @@ -200,8 +200,8 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %.loc9_27.3: init i32 = initialize_from %.loc9_18 to %.loc9_27.2 [template = constants.%.5] // CHECK:STDOUT: %.loc9_27.4: ref i32 = class_element_access @A.%return.var, element1 // CHECK:STDOUT: %.loc9_27.5: init i32 = initialize_from %.loc9_26 to %.loc9_27.4 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_27.6: init A = class_init (%.loc9_27.3, %.loc9_27.5), @A.%return.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc9_28: init A = converted %.loc9_27.1, %.loc9_27.6 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc9_27.6: init A = class_init (%.loc9_27.3, %.loc9_27.5), @A.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc9_28: init A = converted %.loc9_27.1, %.loc9_27.6 [template = constants.%struct] // CHECK:STDOUT: return %.loc9_28 to @A.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: @@ -214,11 +214,11 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %.loc17_31.3: init i32 = initialize_from %.loc17_22 to %.loc17_31.2 [template = constants.%.5] // CHECK:STDOUT: %.loc17_31.4: ref i32 = class_element_access file.%a_ref.var, element1 // CHECK:STDOUT: %.loc17_31.5: init i32 = initialize_from %.loc17_30 to %.loc17_31.4 [template = constants.%.6] -// CHECK:STDOUT: %.loc17_31.6: init A = class_init (%.loc17_31.3, %.loc17_31.5), file.%a_ref.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc17_32: init A = converted %.loc17_31.1, %.loc17_31.6 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc17_31.6: init A = class_init (%.loc17_31.3, %.loc17_31.5), file.%a_ref.var [template = constants.%struct] +// CHECK:STDOUT: %.loc17_32: init A = converted %.loc17_31.1, %.loc17_31.6 [template = constants.%struct] // CHECK:STDOUT: assign file.%a_ref.var, %.loc17_32 // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %Make.ref: Make = name_ref Make, @A.%Make.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Make.ref: = name_ref Make, @A.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc24_5: ref B = splice_block file.%b_factory.var {} // CHECK:STDOUT: %Make.call: init A = call %Make.ref() to %.loc24_5 // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] @@ -232,9 +232,9 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -245,24 +245,24 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %A.ref.loc8_8: type = name_ref A, %A.decl [template = constants.%A] // CHECK:STDOUT: %.loc8_13: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_18.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_18.2: type = converted %int.make_type_32.loc8, %.loc8_18.1 [template = i32] // CHECK:STDOUT: %A.ref.loc8_26: type = name_ref A, %A.decl [template = constants.%A] // CHECK:STDOUT: %.loc8_23.1: A = as_compatible %.loc8_13 [template = constants.%.2] // CHECK:STDOUT: %.loc8_23.2: A = converted %.loc8_13, %.loc8_23.1 [template = constants.%.2] // CHECK:STDOUT: %a: A = bind_name a, %.loc8_23.2 -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc9_8: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc9_8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_32.loc9_8 [template = i32] // CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_32.loc9_8, %.loc9_8.1 [template = i32] // CHECK:STDOUT: %a.ref: A = name_ref a, %a -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc9_19: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc9_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %int.make_type_32.loc9_19 [template = i32] // CHECK:STDOUT: %.loc9_19.2: type = converted %int.make_type_32.loc9_19, %.loc9_19.1 [template = i32] // CHECK:STDOUT: %.loc9_16.1: i32 = as_compatible %a.ref @@ -271,7 +271,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_12.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc5_12.2: type = converted %int.make_type_32, %.loc5_12.1 [template = i32] // CHECK:STDOUT: adapt_decl i32 @@ -353,16 +353,16 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type A, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.x: i32, .y: i32} [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %.4: type = ptr_type {.x: i32, .y: i32} [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] -// CHECK:STDOUT: %struct.2: A = struct_value (%.5, %.6) [template] +// CHECK:STDOUT: %struct: A = struct_value (%.5, %.6) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -374,8 +374,8 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} // CHECK:STDOUT: %B.ref.loc13_14: type = name_ref B, %B.decl [template = constants.%B] // CHECK:STDOUT: %.loc13_25: i32 = int_literal 1 [template = constants.%.5] @@ -387,7 +387,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %.loc13_34.4: init i32 = initialize_from %.loc13_25 to %.loc13_34.3 [template = constants.%.5] // CHECK:STDOUT: %.loc13_34.5: ref i32 = class_element_access %.loc13_34.2, element1 // CHECK:STDOUT: %.loc13_34.6: init i32 = initialize_from %.loc13_33 to %.loc13_34.5 [template = constants.%.6] -// CHECK:STDOUT: %.loc13_34.7: init A = class_init (%.loc13_34.4, %.loc13_34.6), %.loc13_34.2 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc13_34.7: init A = class_init (%.loc13_34.4, %.loc13_34.6), %.loc13_34.2 [template = constants.%struct] // CHECK:STDOUT: %.loc13_34.8: ref A = temporary %.loc13_34.2, %.loc13_34.7 // CHECK:STDOUT: %.loc13_36: ref A = converted %.loc13_34.1, %.loc13_34.8 // CHECK:STDOUT: %B.ref.loc13_45: type = name_ref B, %B.decl [template = constants.%B] @@ -401,11 +401,11 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_32.loc5, %.loc5_10.1 [template = i32] // CHECK:STDOUT: %.loc5_8: = field_decl x, element0 [template] -// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_32.loc6, %.loc6_10.1 [template = i32] // CHECK:STDOUT: %.loc6_8: = field_decl y, element1 [template] @@ -437,7 +437,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %.loc24_33.4: init i32 = initialize_from %.loc24_24 to %.loc24_33.3 [template = constants.%.5] // CHECK:STDOUT: %.loc24_33.5: ref i32 = class_element_access %.loc24_33.2, element1 // CHECK:STDOUT: %.loc24_33.6: init i32 = initialize_from %.loc24_32 to %.loc24_33.5 [template = constants.%.6] -// CHECK:STDOUT: %.loc24_33.7: init A = class_init (%.loc24_33.4, %.loc24_33.6), %.loc24_33.2 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc24_33.7: init A = class_init (%.loc24_33.4, %.loc24_33.6), %.loc24_33.2 [template = constants.%struct] // CHECK:STDOUT: %.loc24_33.8: ref A = temporary %.loc24_33.2, %.loc24_33.7 // CHECK:STDOUT: %.loc24_35: ref A = converted %.loc24_33.1, %.loc24_33.8 // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] @@ -452,9 +452,9 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type A, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.x: i32} [template] // CHECK:STDOUT: %B: type = class_type @B [template] @@ -471,7 +471,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} // CHECK:STDOUT: %B.ref: type = name_ref B, %B.decl [template = constants.%B] // CHECK:STDOUT: %b.var: ref B = var b @@ -479,7 +479,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_32, %.loc5_10.1 [template = i32] // CHECK:STDOUT: %.loc5_8: = field_decl x, element0 [template] diff --git a/toolchain/check/testdata/as/as_type.carbon b/toolchain/check/testdata/as/as_type.carbon index b09f7bd7303b..6b13e765a78f 100644 --- a/toolchain/check/testdata/as/as_type.carbon +++ b/toolchain/check/testdata/as/as_type.carbon @@ -13,9 +13,9 @@ let t: type = (i32, i32) as type; // CHECK:STDOUT: --- as_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: } @@ -25,10 +25,10 @@ let t: type = (i32, i32) as type; // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11_16: init type = call constants.%struct() [template = i32] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11_21: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_16: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_24: (type, type) = tuple_literal (%int.make_type_32.loc11_16, %int.make_type_32.loc11_21) // CHECK:STDOUT: %.loc11_26.1: type = value_of_initializer %int.make_type_32.loc11_16 [template = i32] // CHECK:STDOUT: %.loc11_26.2: type = converted %int.make_type_32.loc11_16, %.loc11_26.1 [template = i32] diff --git a/toolchain/check/testdata/as/basic.carbon b/toolchain/check/testdata/as/basic.carbon index 67888fed0f22..eb5b09a981cd 100644 --- a/toolchain/check/testdata/as/basic.carbon +++ b/toolchain/check/testdata/as/basic.carbon @@ -15,11 +15,11 @@ fn Main() -> i32 { // CHECK:STDOUT: --- basic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.2: Main = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -29,14 +29,14 @@ fn Main() -> i32 { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_32, %.loc11_14.1 [template = i32] // CHECK:STDOUT: @Main.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -44,7 +44,7 @@ fn Main() -> i32 { // CHECK:STDOUT: fn @Main() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc12_10: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_15.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_15.2: type = converted %int.make_type_32, %.loc12_15.1 [template = i32] // CHECK:STDOUT: return %.loc12_10 diff --git a/toolchain/check/testdata/as/fail_no_conversion.carbon b/toolchain/check/testdata/as/fail_no_conversion.carbon index 767e6c1dea2c..2bfa5dca2f3b 100644 --- a/toolchain/check/testdata/as/fail_no_conversion.carbon +++ b/toolchain/check/testdata/as/fail_no_conversion.carbon @@ -16,9 +16,9 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: --- fail_no_conversion.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %.4: type = ptr_type (i32, i32) [template] @@ -30,10 +30,10 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc14_9: init type = call constants.%struct() [template = i32] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc14_14: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc14_9: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc14_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_17.1: (type, type) = tuple_literal (%int.make_type_32.loc14_9, %int.make_type_32.loc14_14) // CHECK:STDOUT: %.loc14_17.2: type = value_of_initializer %int.make_type_32.loc14_9 [template = i32] // CHECK:STDOUT: %.loc14_17.3: type = converted %int.make_type_32.loc14_9, %.loc14_17.2 [template = i32] @@ -41,10 +41,10 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: %.loc14_17.5: type = converted %int.make_type_32.loc14_14, %.loc14_17.4 [template = i32] // CHECK:STDOUT: %.loc14_17.6: type = converted %.loc14_17.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %.loc14_21: i32 = int_literal 1 [template = constants.%.5] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc14_27: init type = call constants.%struct() [template = i32] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc14_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc14_27: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc14_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_35.1: (type, type) = tuple_literal (%int.make_type_32.loc14_27, %int.make_type_32.loc14_32) // CHECK:STDOUT: %.loc14_35.2: type = value_of_initializer %int.make_type_32.loc14_27 [template = i32] // CHECK:STDOUT: %.loc14_35.3: type = converted %int.make_type_32.loc14_27, %.loc14_35.2 [template = i32] diff --git a/toolchain/check/testdata/as/fail_not_type.carbon b/toolchain/check/testdata/as/fail_not_type.carbon index ba90b23e9d5c..698416ad153f 100644 --- a/toolchain/check/testdata/as/fail_not_type.carbon +++ b/toolchain/check/testdata/as/fail_not_type.carbon @@ -16,9 +16,9 @@ let n: i32 = 1 as 2; // CHECK:STDOUT: --- fail_not_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: } @@ -28,8 +28,8 @@ let n: i32 = 1 as 2; // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_8.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_8.2: type = converted %int.make_type_32, %.loc14_8.1 [template = i32] // CHECK:STDOUT: %.loc14_14: i32 = int_literal 1 [template = constants.%.2] diff --git a/toolchain/check/testdata/as/identity.carbon b/toolchain/check/testdata/as/identity.carbon index 9f626b7cb5b2..9c33fefc624b 100644 --- a/toolchain/check/testdata/as/identity.carbon +++ b/toolchain/check/testdata/as/identity.carbon @@ -33,17 +33,17 @@ fn Initializing() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %X: type = class_type @X [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %Value: type = fn_type @Value [template] +// CHECK:STDOUT: %Value.type: type = fn_type @Value [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Value = struct_value () [template] +// CHECK:STDOUT: %Value: = struct_value () [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] // CHECK:STDOUT: %.4: type = ptr_type X [template] -// CHECK:STDOUT: %Reference: type = fn_type @Reference [template] -// CHECK:STDOUT: %struct.2: Reference = struct_value () [template] -// CHECK:STDOUT: %Make: type = fn_type @Make [template] -// CHECK:STDOUT: %struct.3: Make = struct_value () [template] -// CHECK:STDOUT: %Initializing: type = fn_type @Initializing [template] -// CHECK:STDOUT: %struct.4: Initializing = struct_value () [template] +// CHECK:STDOUT: %Reference.type: type = fn_type @Reference [template] +// CHECK:STDOUT: %Reference: = struct_value () [template] +// CHECK:STDOUT: %Make.type: type = fn_type @Make [template] +// CHECK:STDOUT: %Make: = struct_value () [template] +// CHECK:STDOUT: %Initializing.type: type = fn_type @Initializing [template] +// CHECK:STDOUT: %Initializing: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -57,22 +57,22 @@ fn Initializing() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} -// CHECK:STDOUT: %Value.decl: Value = fn_decl @Value [template = constants.%struct.1] { +// CHECK:STDOUT: %Value.decl: = fn_decl @Value [template = constants.%Value] { // CHECK:STDOUT: %X.ref.loc17: type = name_ref X, %X.decl [template = constants.%X] // CHECK:STDOUT: %n.loc17_10.1: X = param n // CHECK:STDOUT: @Value.%n: X = bind_name n, %n.loc17_10.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %Reference.decl: Reference = fn_decl @Reference [template = constants.%struct.2] { +// CHECK:STDOUT: %Reference.decl: = fn_decl @Reference [template = constants.%Reference] { // CHECK:STDOUT: %X.ref.loc21: type = name_ref X, %X.decl [template = constants.%X] // CHECK:STDOUT: %.loc21: type = ptr_type X [template = constants.%.4] // CHECK:STDOUT: %p.loc21_14.1: X* = param p // CHECK:STDOUT: @Reference.%p: X* = bind_name p, %p.loc21_14.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %Make.decl: Make = fn_decl @Make [template = constants.%struct.3] { +// CHECK:STDOUT: %Make.decl: = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %X.ref.loc25: type = name_ref X, %X.decl [template = constants.%X] // CHECK:STDOUT: @Make.%return: ref X = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Initializing.decl: Initializing = fn_decl @Initializing [template = constants.%struct.4] {} +// CHECK:STDOUT: %Initializing.decl: = fn_decl @Initializing [template = constants.%Initializing] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { @@ -108,7 +108,7 @@ fn Initializing() { // CHECK:STDOUT: %X.ref.loc28_10: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %x.var: ref X = var x // CHECK:STDOUT: %x: ref X = bind_name x, %x.var -// CHECK:STDOUT: %Make.ref: Make = name_ref Make, file.%Make.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Make.ref: = name_ref Make, file.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc28: ref X = splice_block %x.var {} // CHECK:STDOUT: %Make.call: init X = call %Make.ref() to %.loc28 // CHECK:STDOUT: %X.ref.loc28_25: type = name_ref X, file.%X.decl [template = constants.%X] diff --git a/toolchain/check/testdata/as/no_prelude/tuple.carbon b/toolchain/check/testdata/as/no_prelude/tuple.carbon index 358ec09aaa70..b25addb2503d 100644 --- a/toolchain/check/testdata/as/no_prelude/tuple.carbon +++ b/toolchain/check/testdata/as/no_prelude/tuple.carbon @@ -29,18 +29,18 @@ fn Var() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %X: type = class_type @X [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %Make: type = fn_type @Make [template] +// CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Make = struct_value () [template] -// CHECK:STDOUT: %Let: type = fn_type @Let [template] -// CHECK:STDOUT: %struct.2: Let = struct_value () [template] +// CHECK:STDOUT: %Make: = struct_value () [template] +// CHECK:STDOUT: %Let.type: type = fn_type @Let [template] +// CHECK:STDOUT: %Let: = struct_value () [template] // CHECK:STDOUT: %.3: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.4: type = tuple_type (X, X) [template] // CHECK:STDOUT: %.5: type = ptr_type {} [template] // CHECK:STDOUT: %.6: type = tuple_type ({}*, {}*) [template] // CHECK:STDOUT: %.7: type = ptr_type ({}*, {}*) [template] -// CHECK:STDOUT: %Var: type = fn_type @Var [template] -// CHECK:STDOUT: %struct.3: Var = struct_value () [template] +// CHECK:STDOUT: %Var.type: type = fn_type @Var [template] +// CHECK:STDOUT: %Var: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -51,12 +51,12 @@ fn Var() { // CHECK:STDOUT: .Var = %Var.decl // CHECK:STDOUT: } // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} -// CHECK:STDOUT: %Make.decl: Make = fn_decl @Make [template = constants.%struct.1] { +// CHECK:STDOUT: %Make.decl: = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %X.ref: type = name_ref X, %X.decl [template = constants.%X] // CHECK:STDOUT: @Make.%return: ref X = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Let.decl: Let = fn_decl @Let [template = constants.%struct.2] {} -// CHECK:STDOUT: %Var.decl: Var = fn_decl @Var [template = constants.%struct.3] {} +// CHECK:STDOUT: %Let.decl: = fn_decl @Let [template = constants.%Let] {} +// CHECK:STDOUT: %Var.decl: = fn_decl @Var [template = constants.%Var] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { @@ -72,10 +72,10 @@ fn Var() { // CHECK:STDOUT: %X.ref.loc19_14: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %.loc19_15.1: (type, type) = tuple_literal (%X.ref.loc19_11, %X.ref.loc19_14) // CHECK:STDOUT: %.loc19_15.2: type = converted %.loc19_15.1, constants.%.4 [template = constants.%.4] -// CHECK:STDOUT: %Make.ref.loc19_20: Make = name_ref Make, file.%Make.decl [template = constants.%struct.1] +// CHECK:STDOUT: %Make.ref.loc19_20: = name_ref Make, file.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc19_24.1: ref X = temporary_storage // CHECK:STDOUT: %Make.call.loc19_24: init X = call %Make.ref.loc19_20() to %.loc19_24.1 -// CHECK:STDOUT: %Make.ref.loc19_28: Make = name_ref Make, file.%Make.decl [template = constants.%struct.1] +// CHECK:STDOUT: %Make.ref.loc19_28: = name_ref Make, file.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc19_32.1: ref X = temporary_storage // CHECK:STDOUT: %Make.call.loc19_32: init X = call %Make.ref.loc19_28() to %.loc19_32.1 // CHECK:STDOUT: %.loc19_34: (X, X) = tuple_literal (%Make.call.loc19_24, %Make.call.loc19_32) @@ -101,10 +101,10 @@ fn Var() { // CHECK:STDOUT: %.loc24_15.2: type = converted %.loc24_15.1, constants.%.4 [template = constants.%.4] // CHECK:STDOUT: %b.var: ref (X, X) = var b // CHECK:STDOUT: %b: ref (X, X) = bind_name b, %b.var -// CHECK:STDOUT: %Make.ref.loc24_20: Make = name_ref Make, file.%Make.decl [template = constants.%struct.1] +// CHECK:STDOUT: %Make.ref.loc24_20: = name_ref Make, file.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc24_34.1: ref X = tuple_access %b.var, element0 // CHECK:STDOUT: %Make.call.loc24_24: init X = call %Make.ref.loc24_20() to %.loc24_34.1 -// CHECK:STDOUT: %Make.ref.loc24_28: Make = name_ref Make, file.%Make.decl [template = constants.%struct.1] +// CHECK:STDOUT: %Make.ref.loc24_28: = name_ref Make, file.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc24_34.2: ref X = tuple_access %b.var, element1 // CHECK:STDOUT: %Make.call.loc24_32: init X = call %Make.ref.loc24_28() to %.loc24_34.2 // CHECK:STDOUT: %.loc24_34.3: (X, X) = tuple_literal (%Make.call.loc24_24, %Make.call.loc24_32) diff --git a/toolchain/check/testdata/basics/builtin_types.carbon b/toolchain/check/testdata/basics/builtin_types.carbon index 5b747f6af72d..47700b1f70a1 100644 --- a/toolchain/check/testdata/basics/builtin_types.carbon +++ b/toolchain/check/testdata/basics/builtin_types.carbon @@ -16,13 +16,13 @@ var test_type: type = i32; // CHECK:STDOUT: --- builtin_types.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: %.3: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] -// CHECK:STDOUT: %struct.2: Float = struct_value () [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] +// CHECK:STDOUT: %Float: = struct_value () [template] // CHECK:STDOUT: %.4: f64 = float_literal 0.10000000000000001 [template] // CHECK:STDOUT: %.5: type = ptr_type String [template] // CHECK:STDOUT: %.6: String = string_literal "Test" [template] @@ -36,15 +36,15 @@ var test_type: type = i32; // CHECK:STDOUT: .test_type = %test_type // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_15.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_15.2: type = converted %int.make_type_32, %.loc11_15.1 [template = i32] // CHECK:STDOUT: %test_i32.var: ref i32 = var test_i32 // CHECK:STDOUT: %test_i32: ref i32 = bind_name test_i32, %test_i32.var // CHECK:STDOUT: %.loc12_15.1: i32 = int_literal 64 [template = constants.%.3] -// CHECK:STDOUT: %import_ref.2: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %float.make_type: init type = call constants.%struct.2(%.loc12_15.1) [template = f64] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc12_15.1) [template = f64] // CHECK:STDOUT: %.loc12_15.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc12_15.3: type = converted %float.make_type, %.loc12_15.2 [template = f64] // CHECK:STDOUT: %test_f64.var: ref f64 = var test_f64 @@ -53,7 +53,7 @@ var test_type: type = i32; // CHECK:STDOUT: %test_str: String = bind_name test_str, %.loc13 // CHECK:STDOUT: %test_type.var: ref type = var test_type // CHECK:STDOUT: %test_type: ref type = bind_name test_type, %test_type.var -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -66,7 +66,7 @@ var test_type: type = i32; // CHECK:STDOUT: assign file.%test_i32.var, %.loc11 // CHECK:STDOUT: %.loc12: f64 = float_literal 0.10000000000000001 [template = constants.%.4] // CHECK:STDOUT: assign file.%test_f64.var, %.loc12 -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: assign file.%test_type.var, %int.make_type_32 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/basics/fail_bad_run.carbon b/toolchain/check/testdata/basics/fail_bad_run.carbon index 1232270585a8..29eb69a67df0 100644 --- a/toolchain/check/testdata/basics/fail_bad_run.carbon +++ b/toolchain/check/testdata/basics/fail_bad_run.carbon @@ -20,9 +20,9 @@ fn Run() -> String {} // CHECK:STDOUT: --- fail_bad_run.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Run: type = fn_type @Run [template] +// CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Run = struct_value () [template] +// CHECK:STDOUT: %Run: = struct_value () [template] // CHECK:STDOUT: %.2: type = ptr_type String [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -32,7 +32,7 @@ fn Run() -> String {} // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Run.decl: Run = fn_decl @Run [template = constants.%struct] { +// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] { // CHECK:STDOUT: @Run.%return: ref String = var // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/basics/fail_bad_run_2.carbon b/toolchain/check/testdata/basics/fail_bad_run_2.carbon index 06870890ae5a..e02193cc1b20 100644 --- a/toolchain/check/testdata/basics/fail_bad_run_2.carbon +++ b/toolchain/check/testdata/basics/fail_bad_run_2.carbon @@ -16,11 +16,11 @@ fn Run(n: i32) {} // CHECK:STDOUT: --- fail_bad_run_2.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Run: type = fn_type @Run [template] -// CHECK:STDOUT: %struct.2: Run = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Run.type: type = fn_type @Run [template] +// CHECK:STDOUT: %Run: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -29,9 +29,9 @@ fn Run(n: i32) {} // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Run.decl: Run = fn_decl @Run [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_11.2: type = converted %int.make_type_32, %.loc14_11.1 [template = i32] // CHECK:STDOUT: %n.loc14_8.1: i32 = param n diff --git a/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon b/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon index 6410c24164e3..23ae22213f8c 100644 --- a/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon +++ b/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon @@ -40,12 +40,12 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: --- fail_numeric_literal_overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] -// CHECK:STDOUT: %struct.2: Float = struct_value () [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] +// CHECK:STDOUT: %Float: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -53,30 +53,30 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_32.loc15, %.loc15_8.1 [template = i32] // CHECK:STDOUT: %a: i32 = bind_name a, -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_8.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_8.2: type = converted %int.make_type_32.loc21, %.loc21_8.1 [template = i32] // CHECK:STDOUT: %b: i32 = bind_name b, -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc27_8.1: type = value_of_initializer %int.make_type_32.loc27 [template = i32] // CHECK:STDOUT: %.loc27_8.2: type = converted %int.make_type_32.loc27, %.loc27_8.1 [template = i32] // CHECK:STDOUT: %c: i32 = bind_name c, // CHECK:STDOUT: %.loc33_8.1: i32 = int_literal 64 [template = constants.%.2] -// CHECK:STDOUT: %import_ref.4: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %float.make_type.loc33: init type = call constants.%struct.2(%.loc33_8.1) [template = f64] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %float.make_type.loc33: init type = call constants.%Float(%.loc33_8.1) [template = f64] // CHECK:STDOUT: %.loc33_8.2: type = value_of_initializer %float.make_type.loc33 [template = f64] // CHECK:STDOUT: %.loc33_8.3: type = converted %float.make_type.loc33, %.loc33_8.2 [template = f64] // CHECK:STDOUT: %d: f64 = bind_name d, // CHECK:STDOUT: %.loc38_8.1: i32 = int_literal 64 [template = constants.%.2] -// CHECK:STDOUT: %import_ref.5: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %float.make_type.loc38: init type = call constants.%struct.2(%.loc38_8.1) [template = f64] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %float.make_type.loc38: init type = call constants.%Float(%.loc38_8.1) [template = f64] // CHECK:STDOUT: %.loc38_8.2: type = value_of_initializer %float.make_type.loc38 [template = f64] // CHECK:STDOUT: %.loc38_8.3: type = converted %float.make_type.loc38, %.loc38_8.2 [template = f64] // CHECK:STDOUT: %e: f64 = bind_name e, diff --git a/toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon b/toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon index 4d5192fdbdd8..585777a8916c 100644 --- a/toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon +++ b/toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon @@ -17,9 +17,9 @@ var y: i32 = x.b; // CHECK:STDOUT: --- fail_qualifier_unsupported.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -29,14 +29,14 @@ var y: i32 = x.b; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_8.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_8.2: type = converted %int.make_type_32.loc11, %.loc11_8.1 [template = i32] // CHECK:STDOUT: %x.var: ref i32 = var x // CHECK:STDOUT: %x: ref i32 = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_32.loc15, %.loc15_8.1 [template = i32] // CHECK:STDOUT: %y.var: ref i32 = var y diff --git a/toolchain/check/testdata/basics/multifile.carbon b/toolchain/check/testdata/basics/multifile.carbon index 67c8286c9e2e..5e9b84a807d8 100644 --- a/toolchain/check/testdata/basics/multifile.carbon +++ b/toolchain/check/testdata/basics/multifile.carbon @@ -21,9 +21,9 @@ fn B() {} // CHECK:STDOUT: --- a.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -32,7 +32,7 @@ fn B() {} // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -43,9 +43,9 @@ fn B() {} // CHECK:STDOUT: --- b.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %B: type = fn_type @B [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: B = struct_value () [template] +// CHECK:STDOUT: %B: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -54,7 +54,7 @@ fn B() {} // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %B.decl: B = fn_decl @B [template = constants.%struct] {} +// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @B() { diff --git a/toolchain/check/testdata/basics/no_prelude/fail_name_lookup.carbon b/toolchain/check/testdata/basics/no_prelude/fail_name_lookup.carbon index cbb8d36624b1..28eb8a0a7ff0 100644 --- a/toolchain/check/testdata/basics/no_prelude/fail_name_lookup.carbon +++ b/toolchain/check/testdata/basics/no_prelude/fail_name_lookup.carbon @@ -18,16 +18,16 @@ fn Main() { // CHECK:STDOUT: --- fail_name_lookup.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Main: type = fn_type @Main [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Main = struct_value () [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { diff --git a/toolchain/check/testdata/basics/no_prelude/multifile_raw_and_textual_ir.carbon b/toolchain/check/testdata/basics/no_prelude/multifile_raw_and_textual_ir.carbon index a954a6dea6d8..5cea3c2895e8 100644 --- a/toolchain/check/testdata/basics/no_prelude/multifile_raw_and_textual_ir.carbon +++ b/toolchain/check/testdata/basics/no_prelude/multifile_raw_and_textual_ir.carbon @@ -66,16 +66,16 @@ fn B() {} // CHECK:STDOUT: --- a.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -127,16 +127,16 @@ fn B() {} // CHECK:STDOUT: --- b.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %B: type = fn_type @B [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: B = struct_value () [template] +// CHECK:STDOUT: %B: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %B.decl: B = fn_decl @B [template = constants.%struct] {} +// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @B() { diff --git a/toolchain/check/testdata/basics/no_prelude/raw_and_textual_ir.carbon b/toolchain/check/testdata/basics/no_prelude/raw_and_textual_ir.carbon index a48fbbf784ab..fc909b3e208a 100644 --- a/toolchain/check/testdata/basics/no_prelude/raw_and_textual_ir.carbon +++ b/toolchain/check/testdata/basics/no_prelude/raw_and_textual_ir.carbon @@ -147,8 +147,8 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %.2: type = tuple_type ((), ()) [template] -// CHECK:STDOUT: %Foo: type = fn_type @Foo [template] -// CHECK:STDOUT: %struct: Foo = struct_value () [template] +// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] +// CHECK:STDOUT: %Foo: = struct_value () [template] // CHECK:STDOUT: %.3: type = ptr_type ((), ()) [template] // CHECK:STDOUT: %tuple.1: () = tuple_value () [template] // CHECK:STDOUT: %tuple.2: ((), ()) = tuple_value (%tuple.1, %tuple.1) [template] @@ -158,7 +158,7 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl: Foo = fn_decl @Foo [template = constants.%struct] { +// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %.loc15_12.1: () = tuple_literal () // CHECK:STDOUT: %.loc15_12.2: type = converted %.loc15_12.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %n.loc15_8.1: () = param n diff --git a/toolchain/check/testdata/basics/no_prelude/raw_identifier.carbon b/toolchain/check/testdata/basics/no_prelude/raw_identifier.carbon index 7cb758ff870e..52fa2380195c 100644 --- a/toolchain/check/testdata/basics/no_prelude/raw_identifier.carbon +++ b/toolchain/check/testdata/basics/no_prelude/raw_identifier.carbon @@ -28,12 +28,12 @@ fn C(r#if: ()) -> () { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: type = fn_type @A [template] -// CHECK:STDOUT: %struct.1: A = struct_value () [template] -// CHECK:STDOUT: %B: type = fn_type @B [template] -// CHECK:STDOUT: %struct.2: B = struct_value () [template] -// CHECK:STDOUT: %C: type = fn_type @C [template] -// CHECK:STDOUT: %struct.3: C = struct_value () [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] +// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] +// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %C.type: type = fn_type @C [template] +// CHECK:STDOUT: %C: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -42,7 +42,7 @@ fn C(r#if: ()) -> () { // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct.1] { +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] { // CHECK:STDOUT: %.loc15_10.1: () = tuple_literal () // CHECK:STDOUT: %.loc15_10.2: type = converted %.loc15_10.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %n.loc15_6.1: () = param n @@ -51,7 +51,7 @@ fn C(r#if: ()) -> () { // CHECK:STDOUT: %.loc15_17.2: type = converted %.loc15_17.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: @A.%return: ref () = var // CHECK:STDOUT: } -// CHECK:STDOUT: %B.decl: B = fn_decl @B [template = constants.%struct.2] { +// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { // CHECK:STDOUT: %.loc19_12.1: () = tuple_literal () // CHECK:STDOUT: %.loc19_12.2: type = converted %.loc19_12.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %n.loc19_6.1: () = param n @@ -60,7 +60,7 @@ fn C(r#if: ()) -> () { // CHECK:STDOUT: %.loc19_19.2: type = converted %.loc19_19.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: @B.%return: ref () = var // CHECK:STDOUT: } -// CHECK:STDOUT: %C.decl: C = fn_decl @C [template = constants.%struct.3] { +// CHECK:STDOUT: %C.decl: = fn_decl @C [template = constants.%C] { // CHECK:STDOUT: %.loc23_13.1: () = tuple_literal () // CHECK:STDOUT: %.loc23_13.2: type = converted %.loc23_13.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %if.loc23_6.1: () = param r#if diff --git a/toolchain/check/testdata/basics/no_prelude/textual_ir.carbon b/toolchain/check/testdata/basics/no_prelude/textual_ir.carbon index b49af1bb85ee..58d8d3fab44b 100644 --- a/toolchain/check/testdata/basics/no_prelude/textual_ir.carbon +++ b/toolchain/check/testdata/basics/no_prelude/textual_ir.carbon @@ -21,8 +21,8 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %.2: type = tuple_type ((), ()) [template] -// CHECK:STDOUT: %Foo: type = fn_type @Foo [template] -// CHECK:STDOUT: %struct: Foo = struct_value () [template] +// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] +// CHECK:STDOUT: %Foo: = struct_value () [template] // CHECK:STDOUT: %.3: type = ptr_type ((), ()) [template] // CHECK:STDOUT: %tuple.1: () = tuple_value () [template] // CHECK:STDOUT: %tuple.2: ((), ()) = tuple_value (%tuple.1, %tuple.1) [template] @@ -32,7 +32,7 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl: Foo = fn_decl @Foo [template = constants.%struct] { +// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %.loc15_12.1: () = tuple_literal () // CHECK:STDOUT: %.loc15_12.2: type = converted %.loc15_12.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %n.loc15_8.1: () = param n diff --git a/toolchain/check/testdata/basics/numeric_literals.carbon b/toolchain/check/testdata/basics/numeric_literals.carbon index 3459270979e7..ddc3d6be7111 100644 --- a/toolchain/check/testdata/basics/numeric_literals.carbon +++ b/toolchain/check/testdata/basics/numeric_literals.carbon @@ -32,11 +32,11 @@ fn F() { // CHECK:STDOUT: --- numeric_literals.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 6 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] // CHECK:STDOUT: %.4: type = ptr_type [i32; 6] [template] @@ -52,8 +52,8 @@ fn F() { // CHECK:STDOUT: %.14: i32 = int_literal 5 [template] // CHECK:STDOUT: %array.1: [i32; 6] = tuple_value (%.5, %.6, %.5, %.5, %.7, %.7) [template] // CHECK:STDOUT: %.15: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] -// CHECK:STDOUT: %struct.3: Float = struct_value () [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] +// CHECK:STDOUT: %Float: = struct_value () [template] // CHECK:STDOUT: %.16: type = array_type %.2, f64 [template] // CHECK:STDOUT: %.17: type = ptr_type [f64; 6] [template] // CHECK:STDOUT: %.18: f64 = float_literal 0.90000000000000002 [template] @@ -72,14 +72,14 @@ fn F() { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.2: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.3] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_19: i32 = int_literal 6 [template = constants.%.2] // CHECK:STDOUT: %.loc14_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_14.2: type = converted %int.make_type_32, %.loc14_14.1 [template = i32] @@ -115,7 +115,7 @@ fn F() { // CHECK:STDOUT: %.loc21_4: init [i32; 6] = converted %.loc21_3.1, %.loc21_3.20 [template = constants.%array.1] // CHECK:STDOUT: assign %ints.var, %.loc21_4 // CHECK:STDOUT: %.loc22_16.1: i32 = int_literal 64 [template = constants.%.15] -// CHECK:STDOUT: %float.make_type: init type = call constants.%struct.3(%.loc22_16.1) [template = f64] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc22_16.1) [template = f64] // CHECK:STDOUT: %.loc22_21: i32 = int_literal 6 [template = constants.%.2] // CHECK:STDOUT: %.loc22_16.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc22_16.3: type = converted %float.make_type, %.loc22_16.2 [template = f64] diff --git a/toolchain/check/testdata/basics/parens.carbon b/toolchain/check/testdata/basics/parens.carbon index 710a1ed6c8ad..e644a30cf679 100644 --- a/toolchain/check/testdata/basics/parens.carbon +++ b/toolchain/check/testdata/basics/parens.carbon @@ -14,9 +14,9 @@ var b: i32 = ((2)); // CHECK:STDOUT: --- parens.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: } @@ -28,14 +28,14 @@ var b: i32 = ((2)); // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_8.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_8.2: type = converted %int.make_type_32.loc11, %.loc11_8.1 [template = i32] // CHECK:STDOUT: %a.var: ref i32 = var a // CHECK:STDOUT: %a: ref i32 = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_32.loc12, %.loc12_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b diff --git a/toolchain/check/testdata/basics/run.carbon b/toolchain/check/testdata/basics/run.carbon index a9fc08900572..220ece3e86ea 100644 --- a/toolchain/check/testdata/basics/run.carbon +++ b/toolchain/check/testdata/basics/run.carbon @@ -13,9 +13,9 @@ fn Run() {} // CHECK:STDOUT: --- run.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Run: type = fn_type @Run [template] +// CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Run = struct_value () [template] +// CHECK:STDOUT: %Run: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -24,7 +24,7 @@ fn Run() {} // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Run.decl: Run = fn_decl @Run [template = constants.%struct] {} +// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { diff --git a/toolchain/check/testdata/basics/run_i32.carbon b/toolchain/check/testdata/basics/run_i32.carbon index 74a8eeb01d9b..9a32c9df08a6 100644 --- a/toolchain/check/testdata/basics/run_i32.carbon +++ b/toolchain/check/testdata/basics/run_i32.carbon @@ -13,11 +13,11 @@ fn Run() -> i32 { return 0; } // CHECK:STDOUT: --- run_i32.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Run: type = fn_type @Run [template] -// CHECK:STDOUT: %struct.2: Run = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Run.type: type = fn_type @Run [template] +// CHECK:STDOUT: %Run: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -27,9 +27,9 @@ fn Run() -> i32 { return 0; } // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Run.decl: Run = fn_decl @Run [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_32, %.loc11_13.1 [template = i32] // CHECK:STDOUT: @Run.%return: ref i32 = var diff --git a/toolchain/check/testdata/basics/type_literals.carbon b/toolchain/check/testdata/basics/type_literals.carbon index 1cbed44613e3..d66d69512b81 100644 --- a/toolchain/check/testdata/basics/type_literals.carbon +++ b/toolchain/check/testdata/basics/type_literals.carbon @@ -115,9 +115,9 @@ var test_f128: f128; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 8 [template] -// CHECK:STDOUT: %Int: type = fn_type @Int [template] +// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int = struct_value () [template] +// CHECK:STDOUT: %Int: = struct_value () [template] // CHECK:STDOUT: %.3: type = int_type signed, %.1 [template] // CHECK:STDOUT: %.4: i32 = int_literal 16 [template] // CHECK:STDOUT: %.5: type = int_type signed, %.4 [template] @@ -134,22 +134,22 @@ var test_f128: f128; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %.loc3_14.1: i32 = int_literal 8 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.1: Int = import_ref ir3, inst+13, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_signed.loc3: init type = call constants.%struct(%.loc3_14.1) [template = constants.%.3] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+13, loaded [template = constants.%Int] +// CHECK:STDOUT: %int.make_type_signed.loc3: init type = call constants.%Int(%.loc3_14.1) [template = constants.%.3] // CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %int.make_type_signed.loc3 [template = constants.%.3] // CHECK:STDOUT: %.loc3_14.3: type = converted %int.make_type_signed.loc3, %.loc3_14.2 [template = constants.%.3] // CHECK:STDOUT: %test_i8.var: ref i8 = var test_i8 // CHECK:STDOUT: %test_i8: ref i8 = bind_name test_i8, %test_i8.var // CHECK:STDOUT: %.loc4_15.1: i32 = int_literal 16 [template = constants.%.4] -// CHECK:STDOUT: %import_ref.2: Int = import_ref ir3, inst+13, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%struct(%.loc4_15.1) [template = constants.%.5] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+13, loaded [template = constants.%Int] +// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_15.1) [template = constants.%.5] // CHECK:STDOUT: %.loc4_15.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%.5] // CHECK:STDOUT: %.loc4_15.3: type = converted %int.make_type_signed.loc4, %.loc4_15.2 [template = constants.%.5] // CHECK:STDOUT: %test_i16.var: ref i16 = var test_i16 // CHECK:STDOUT: %test_i16: ref i16 = bind_name test_i16, %test_i16.var // CHECK:STDOUT: %.loc5_15.1: i32 = int_literal 64 [template = constants.%.6] -// CHECK:STDOUT: %import_ref.3: Int = import_ref ir3, inst+13, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%struct(%.loc5_15.1) [template = constants.%.7] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+13, loaded [template = constants.%Int] +// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_15.1) [template = constants.%.7] // CHECK:STDOUT: %.loc5_15.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%.7] // CHECK:STDOUT: %.loc5_15.3: type = converted %int.make_type_signed.loc5, %.loc5_15.2 [template = constants.%.7] // CHECK:STDOUT: %test_i64.var: ref i64 = var test_i64 @@ -162,9 +162,9 @@ var test_f128: f128; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 1 [template] -// CHECK:STDOUT: %Int: type = fn_type @Int [template] +// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int = struct_value () [template] +// CHECK:STDOUT: %Int: = struct_value () [template] // CHECK:STDOUT: %.3: type = int_type signed, %.1 [template] // CHECK:STDOUT: %.4: i32 = int_literal 15 [template] // CHECK:STDOUT: %.5: type = int_type signed, %.4 [template] @@ -185,28 +185,28 @@ var test_f128: f128; // CHECK:STDOUT: %test_i0.var: ref = var test_i0 // CHECK:STDOUT: %test_i0: ref = bind_name test_i0, %test_i0.var // CHECK:STDOUT: %.loc12_14.1: i32 = int_literal 1 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.1: Int = import_ref ir3, inst+13, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%struct(%.loc12_14.1) [template = constants.%.3] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+13, loaded [template = constants.%Int] +// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_14.1) [template = constants.%.3] // CHECK:STDOUT: %.loc12_14.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%.3] // CHECK:STDOUT: %.loc12_14.3: type = converted %int.make_type_signed.loc12, %.loc12_14.2 [template = constants.%.3] // CHECK:STDOUT: %test_i1.var: ref i1 = var test_i1 // CHECK:STDOUT: %test_i1: ref i1 = bind_name test_i1, %test_i1.var // CHECK:STDOUT: %.loc17_15.1: i32 = int_literal 15 [template = constants.%.4] -// CHECK:STDOUT: %import_ref.2: Int = import_ref ir3, inst+13, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%struct(%.loc17_15.1) [template = constants.%.5] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+13, loaded [template = constants.%Int] +// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%.loc17_15.1) [template = constants.%.5] // CHECK:STDOUT: %.loc17_15.2: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%.5] // CHECK:STDOUT: %.loc17_15.3: type = converted %int.make_type_signed.loc17, %.loc17_15.2 [template = constants.%.5] // CHECK:STDOUT: %test_i15.var: ref i15 = var test_i15 // CHECK:STDOUT: %test_i15: ref i15 = bind_name test_i15, %test_i15.var // CHECK:STDOUT: %.loc22_23.1: i32 = int_literal 1000000000 [template = constants.%.6] -// CHECK:STDOUT: %import_ref.3: Int = import_ref ir3, inst+13, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%struct(%.loc22_23.1) [template = ] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+13, loaded [template = constants.%Int] +// CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%.loc22_23.1) [template = ] // CHECK:STDOUT: %.loc22_23.2: type = value_of_initializer %int.make_type_signed.loc22 [template = ] // CHECK:STDOUT: %.loc22_23.3: type = converted %int.make_type_signed.loc22, %.loc22_23.2 [template = ] // CHECK:STDOUT: %test_i1000000000.var: ref = var test_i1000000000 // CHECK:STDOUT: %test_i1000000000: ref = bind_name test_i1000000000, %test_i1000000000.var -// CHECK:STDOUT: %import_ref.4: Int = import_ref ir3, inst+13, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_signed.loc28: init type = call constants.%struct() [template = ] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+13, loaded [template = constants.%Int] +// CHECK:STDOUT: %int.make_type_signed.loc28: init type = call constants.%Int() [template = ] // CHECK:STDOUT: %.loc28_33.1: type = value_of_initializer %int.make_type_signed.loc28 [template = ] // CHECK:STDOUT: %.loc28_33.2: type = converted %int.make_type_signed.loc28, %.loc28_33.1 [template = ] // CHECK:STDOUT: %test_i10000000000000000000.var: ref = var test_i10000000000000000000 @@ -219,9 +219,9 @@ var test_f128: f128; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 8 [template] -// CHECK:STDOUT: %UInt: type = fn_type @UInt [template] +// CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: UInt = struct_value () [template] +// CHECK:STDOUT: %UInt: = struct_value () [template] // CHECK:STDOUT: %.3: type = int_type unsigned, %.1 [template] // CHECK:STDOUT: %.4: i32 = int_literal 16 [template] // CHECK:STDOUT: %.5: type = int_type unsigned, %.4 [template] @@ -238,22 +238,22 @@ var test_f128: f128; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %.loc3_14.1: i32 = int_literal 8 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.1: UInt = import_ref ir3, inst+22, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_unsigned.loc3: init type = call constants.%struct(%.loc3_14.1) [template = constants.%.3] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+22, loaded [template = constants.%UInt] +// CHECK:STDOUT: %int.make_type_unsigned.loc3: init type = call constants.%UInt(%.loc3_14.1) [template = constants.%.3] // CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %int.make_type_unsigned.loc3 [template = constants.%.3] // CHECK:STDOUT: %.loc3_14.3: type = converted %int.make_type_unsigned.loc3, %.loc3_14.2 [template = constants.%.3] // CHECK:STDOUT: %test_u8.var: ref u8 = var test_u8 // CHECK:STDOUT: %test_u8: ref u8 = bind_name test_u8, %test_u8.var // CHECK:STDOUT: %.loc4_15.1: i32 = int_literal 16 [template = constants.%.4] -// CHECK:STDOUT: %import_ref.2: UInt = import_ref ir3, inst+22, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_unsigned.loc4: init type = call constants.%struct(%.loc4_15.1) [template = constants.%.5] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+22, loaded [template = constants.%UInt] +// CHECK:STDOUT: %int.make_type_unsigned.loc4: init type = call constants.%UInt(%.loc4_15.1) [template = constants.%.5] // CHECK:STDOUT: %.loc4_15.2: type = value_of_initializer %int.make_type_unsigned.loc4 [template = constants.%.5] // CHECK:STDOUT: %.loc4_15.3: type = converted %int.make_type_unsigned.loc4, %.loc4_15.2 [template = constants.%.5] // CHECK:STDOUT: %test_u16.var: ref u16 = var test_u16 // CHECK:STDOUT: %test_u16: ref u16 = bind_name test_u16, %test_u16.var // CHECK:STDOUT: %.loc5_15.1: i32 = int_literal 64 [template = constants.%.6] -// CHECK:STDOUT: %import_ref.3: UInt = import_ref ir3, inst+22, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_unsigned.loc5: init type = call constants.%struct(%.loc5_15.1) [template = constants.%.7] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+22, loaded [template = constants.%UInt] +// CHECK:STDOUT: %int.make_type_unsigned.loc5: init type = call constants.%UInt(%.loc5_15.1) [template = constants.%.7] // CHECK:STDOUT: %.loc5_15.2: type = value_of_initializer %int.make_type_unsigned.loc5 [template = constants.%.7] // CHECK:STDOUT: %.loc5_15.3: type = converted %int.make_type_unsigned.loc5, %.loc5_15.2 [template = constants.%.7] // CHECK:STDOUT: %test_u64.var: ref u64 = var test_u64 @@ -266,9 +266,9 @@ var test_f128: f128; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 1 [template] -// CHECK:STDOUT: %UInt: type = fn_type @UInt [template] +// CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: UInt = struct_value () [template] +// CHECK:STDOUT: %UInt: = struct_value () [template] // CHECK:STDOUT: %.3: type = int_type unsigned, %.1 [template] // CHECK:STDOUT: %.4: i32 = int_literal 15 [template] // CHECK:STDOUT: %.5: type = int_type unsigned, %.4 [template] @@ -289,28 +289,28 @@ var test_f128: f128; // CHECK:STDOUT: %test_u0.var: ref = var test_u0 // CHECK:STDOUT: %test_u0: ref = bind_name test_u0, %test_u0.var // CHECK:STDOUT: %.loc12_14.1: i32 = int_literal 1 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.1: UInt = import_ref ir3, inst+22, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_unsigned.loc12: init type = call constants.%struct(%.loc12_14.1) [template = constants.%.3] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+22, loaded [template = constants.%UInt] +// CHECK:STDOUT: %int.make_type_unsigned.loc12: init type = call constants.%UInt(%.loc12_14.1) [template = constants.%.3] // CHECK:STDOUT: %.loc12_14.2: type = value_of_initializer %int.make_type_unsigned.loc12 [template = constants.%.3] // CHECK:STDOUT: %.loc12_14.3: type = converted %int.make_type_unsigned.loc12, %.loc12_14.2 [template = constants.%.3] // CHECK:STDOUT: %test_u1.var: ref u1 = var test_u1 // CHECK:STDOUT: %test_u1: ref u1 = bind_name test_u1, %test_u1.var // CHECK:STDOUT: %.loc17_15.1: i32 = int_literal 15 [template = constants.%.4] -// CHECK:STDOUT: %import_ref.2: UInt = import_ref ir3, inst+22, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_unsigned.loc17: init type = call constants.%struct(%.loc17_15.1) [template = constants.%.5] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+22, loaded [template = constants.%UInt] +// CHECK:STDOUT: %int.make_type_unsigned.loc17: init type = call constants.%UInt(%.loc17_15.1) [template = constants.%.5] // CHECK:STDOUT: %.loc17_15.2: type = value_of_initializer %int.make_type_unsigned.loc17 [template = constants.%.5] // CHECK:STDOUT: %.loc17_15.3: type = converted %int.make_type_unsigned.loc17, %.loc17_15.2 [template = constants.%.5] // CHECK:STDOUT: %test_u15.var: ref u15 = var test_u15 // CHECK:STDOUT: %test_u15: ref u15 = bind_name test_u15, %test_u15.var // CHECK:STDOUT: %.loc22_23.1: i32 = int_literal 1000000000 [template = constants.%.6] -// CHECK:STDOUT: %import_ref.3: UInt = import_ref ir3, inst+22, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_unsigned.loc22: init type = call constants.%struct(%.loc22_23.1) [template = ] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+22, loaded [template = constants.%UInt] +// CHECK:STDOUT: %int.make_type_unsigned.loc22: init type = call constants.%UInt(%.loc22_23.1) [template = ] // CHECK:STDOUT: %.loc22_23.2: type = value_of_initializer %int.make_type_unsigned.loc22 [template = ] // CHECK:STDOUT: %.loc22_23.3: type = converted %int.make_type_unsigned.loc22, %.loc22_23.2 [template = ] // CHECK:STDOUT: %test_u1000000000.var: ref = var test_u1000000000 // CHECK:STDOUT: %test_u1000000000: ref = bind_name test_u1000000000, %test_u1000000000.var -// CHECK:STDOUT: %import_ref.4: UInt = import_ref ir3, inst+22, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_unsigned.loc28: init type = call constants.%struct() [template = ] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+22, loaded [template = constants.%UInt] +// CHECK:STDOUT: %int.make_type_unsigned.loc28: init type = call constants.%UInt() [template = ] // CHECK:STDOUT: %.loc28_33.1: type = value_of_initializer %int.make_type_unsigned.loc28 [template = ] // CHECK:STDOUT: %.loc28_33.2: type = converted %int.make_type_unsigned.loc28, %.loc28_33.1 [template = ] // CHECK:STDOUT: %test_u10000000000000000000.var: ref = var test_u10000000000000000000 diff --git a/toolchain/check/testdata/builtins/bool/make_type.carbon b/toolchain/check/testdata/builtins/bool/make_type.carbon index ef02639fde29..789701e5ae69 100644 --- a/toolchain/check/testdata/builtins/bool/make_type.carbon +++ b/toolchain/check/testdata/builtins/bool/make_type.carbon @@ -25,9 +25,9 @@ var b: Bool() = false; // CHECK:STDOUT: --- types.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Bool = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -36,7 +36,7 @@ var b: Bool() = false; // CHECK:STDOUT: .Bool = %Bool.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Bool.decl: Bool = fn_decl @Bool [template = constants.%struct] { +// CHECK:STDOUT: %Bool.decl: = fn_decl @Bool [template = constants.%Bool] { // CHECK:STDOUT: @Bool.%return: ref type = var // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -46,9 +46,9 @@ var b: Bool() = false; // CHECK:STDOUT: --- use_types.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Bool = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal false [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -58,9 +58,9 @@ var b: Bool() = false; // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: Bool = import_ref ir1, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref: = import_ref ir1, inst+3, loaded [template = constants.%Bool] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Bool.ref: Bool = name_ref Bool, %import_ref [template = constants.%struct] +// CHECK:STDOUT: %Bool.ref: = name_ref Bool, %import_ref [template = constants.%Bool] // CHECK:STDOUT: %bool.make_type: init type = call %Bool.ref() [template = bool] // CHECK:STDOUT: %.loc6_13.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc6_13.2: type = converted %bool.make_type, %.loc6_13.1 [template = bool] diff --git a/toolchain/check/testdata/builtins/float/add.carbon b/toolchain/check/testdata/builtins/float/add.carbon index 90588497bd7e..06eed1348a54 100644 --- a/toolchain/check/testdata/builtins/float/add.carbon +++ b/toolchain/check/testdata/builtins/float/add.carbon @@ -54,13 +54,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Float = struct_value () [template] -// CHECK:STDOUT: %Add: type = fn_type @Add [template] -// CHECK:STDOUT: %struct.2: Add = struct_value () [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.3: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Add.type: type = fn_type @Add [template] +// CHECK:STDOUT: %Add: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: %.3: f64 = float_literal 2.2000000000000002 [template] // CHECK:STDOUT: %.4: f64 = float_literal 2.3000000000000003 [template] // CHECK:STDOUT: %.5: f64 = float_literal 4.5 [template] @@ -74,53 +74,53 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Add.decl: Add = fn_decl @Add [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %Add.decl: = fn_decl @Add [template = constants.%Add] { // CHECK:STDOUT: %.loc2_11.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%struct.1(%.loc2_11.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%.loc2_11.1) [template = f64] // CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %float.make_type.loc2_11 [template = f64] // CHECK:STDOUT: %.loc2_11.3: type = converted %float.make_type.loc2_11, %.loc2_11.2 [template = f64] // CHECK:STDOUT: %a.loc2_8.1: f64 = param a // CHECK:STDOUT: @Add.%a: f64 = bind_name a, %a.loc2_8.1 // CHECK:STDOUT: %.loc2_19.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%struct.1(%.loc2_19.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%.loc2_19.1) [template = f64] // CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %float.make_type.loc2_19 [template = f64] // CHECK:STDOUT: %.loc2_19.3: type = converted %float.make_type.loc2_19, %.loc2_19.2 [template = f64] // CHECK:STDOUT: %b.loc2_16.1: f64 = param b // CHECK:STDOUT: @Add.%b: f64 = bind_name b, %b.loc2_16.1 // CHECK:STDOUT: %.loc2_27.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%struct.1(%.loc2_27.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%Float(%.loc2_27.1) [template = f64] // CHECK:STDOUT: %.loc2_27.2: type = value_of_initializer %float.make_type.loc2_27 [template = f64] // CHECK:STDOUT: %.loc2_27.3: type = converted %float.make_type.loc2_27, %.loc2_27.2 [template = f64] // CHECK:STDOUT: @Add.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.3] { +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %.loc4_19.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%struct.1(%.loc4_19.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%.loc4_19.1) [template = f64] // CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %float.make_type.loc4_19 [template = f64] // CHECK:STDOUT: %.loc4_19.3: type = converted %float.make_type.loc4_19, %.loc4_19.2 [template = f64] // CHECK:STDOUT: %a.loc4_16.1: f64 = param a // CHECK:STDOUT: @RuntimeCall.%a: f64 = bind_name a, %a.loc4_16.1 // CHECK:STDOUT: %.loc4_27.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%struct.1(%.loc4_27.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%.loc4_27.1) [template = f64] // CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %float.make_type.loc4_27 [template = f64] // CHECK:STDOUT: %.loc4_27.3: type = converted %float.make_type.loc4_27, %.loc4_27.2 [template = f64] // CHECK:STDOUT: %b.loc4_24.1: f64 = param b // CHECK:STDOUT: @RuntimeCall.%b: f64 = bind_name b, %b.loc4_24.1 // CHECK:STDOUT: %.loc4_35.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%struct.1(%.loc4_35.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%.loc4_35.1) [template = f64] // CHECK:STDOUT: %.loc4_35.2: type = value_of_initializer %float.make_type.loc4_35 [template = f64] // CHECK:STDOUT: %.loc4_35.3: type = converted %float.make_type.loc4_35, %.loc4_35.2 [template = f64] // CHECK:STDOUT: @RuntimeCall.%return: ref f64 = var // CHECK:STDOUT: } // CHECK:STDOUT: %.loc8_8.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.7: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %float.make_type.loc8: init type = call constants.%struct.1(%.loc8_8.1) [template = f64] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %float.make_type.loc8: init type = call constants.%Float(%.loc8_8.1) [template = f64] // CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %float.make_type.loc8 [template = f64] // CHECK:STDOUT: %.loc8_8.3: type = converted %float.make_type.loc8, %.loc8_8.2 [template = f64] // CHECK:STDOUT: %x.var: ref f64 = var x @@ -133,7 +133,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: f64, %b: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Add.ref: Add = name_ref Add, file.%Add.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Add.ref: = name_ref Add, file.%Add.decl [template = constants.%Add] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %float.add: init f64 = call %Add.ref(%a.ref, %b.ref) @@ -144,7 +144,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Add.ref: Add = name_ref Add, file.%Add.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Add.ref: = name_ref Add, file.%Add.decl [template = constants.%Add] // CHECK:STDOUT: %.loc8_18: f64 = float_literal 2.2000000000000002 [template = constants.%.3] // CHECK:STDOUT: %.loc8_23: f64 = float_literal 2.3000000000000003 [template = constants.%.4] // CHECK:STDOUT: %float.add: init f64 = call %Add.ref(%.loc8_18, %.loc8_23) [template = constants.%.5] @@ -156,25 +156,25 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Float = struct_value () [template] -// CHECK:STDOUT: %TooFew: type = fn_type @TooFew [template] -// CHECK:STDOUT: %struct.2: TooFew = struct_value () [template] -// CHECK:STDOUT: %TooMany: type = fn_type @TooMany [template] -// CHECK:STDOUT: %struct.3: TooMany = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.4: Bool = struct_value () [template] -// CHECK:STDOUT: %BadReturnType: type = fn_type @BadReturnType [template] -// CHECK:STDOUT: %struct.5: BadReturnType = struct_value () [template] -// CHECK:STDOUT: %JustRight: type = fn_type @JustRight [template] -// CHECK:STDOUT: %struct.6: JustRight = struct_value () [template] -// CHECK:STDOUT: %RuntimeCallTooFew: type = fn_type @RuntimeCallTooFew [template] -// CHECK:STDOUT: %struct.7: RuntimeCallTooFew = struct_value () [template] -// CHECK:STDOUT: %RuntimeCallTooMany: type = fn_type @RuntimeCallTooMany [template] -// CHECK:STDOUT: %struct.8: RuntimeCallTooMany = struct_value () [template] -// CHECK:STDOUT: %RuntimeCallBadReturnType: type = fn_type @RuntimeCallBadReturnType [template] -// CHECK:STDOUT: %struct.9: RuntimeCallBadReturnType = struct_value () [template] +// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] +// CHECK:STDOUT: %TooFew: = struct_value () [template] +// CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] +// CHECK:STDOUT: %TooMany: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %BadReturnType.type: type = fn_type @BadReturnType [template] +// CHECK:STDOUT: %BadReturnType: = struct_value () [template] +// CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] +// CHECK:STDOUT: %JustRight: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] +// CHECK:STDOUT: %RuntimeCallTooFew: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] +// CHECK:STDOUT: %RuntimeCallTooMany: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType.type: type = fn_type @RuntimeCallBadReturnType [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -189,154 +189,154 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: .RuntimeCallBadReturnType = %RuntimeCallBadReturnType.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TooFew.decl: TooFew = fn_decl @TooFew [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %TooFew.decl: = fn_decl @TooFew [template = constants.%TooFew] { // CHECK:STDOUT: %.loc8_14.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%struct.1(%.loc8_14.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%.loc8_14.1) [template = f64] // CHECK:STDOUT: %.loc8_14.2: type = value_of_initializer %float.make_type.loc8_14 [template = f64] // CHECK:STDOUT: %.loc8_14.3: type = converted %float.make_type.loc8_14, %.loc8_14.2 [template = f64] // CHECK:STDOUT: %a.loc8_11.1: f64 = param a // CHECK:STDOUT: @TooFew.%a: f64 = bind_name a, %a.loc8_11.1 // CHECK:STDOUT: %.loc8_22.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%struct.1(%.loc8_22.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%Float(%.loc8_22.1) [template = f64] // CHECK:STDOUT: %.loc8_22.2: type = value_of_initializer %float.make_type.loc8_22 [template = f64] // CHECK:STDOUT: %.loc8_22.3: type = converted %float.make_type.loc8_22, %.loc8_22.2 [template = f64] // CHECK:STDOUT: @TooFew.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TooMany.decl: TooMany = fn_decl @TooMany [template = constants.%struct.3] { +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %TooMany.decl: = fn_decl @TooMany [template = constants.%TooMany] { // CHECK:STDOUT: %.loc13_15.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%struct.1(%.loc13_15.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%.loc13_15.1) [template = f64] // CHECK:STDOUT: %.loc13_15.2: type = value_of_initializer %float.make_type.loc13_15 [template = f64] // CHECK:STDOUT: %.loc13_15.3: type = converted %float.make_type.loc13_15, %.loc13_15.2 [template = f64] // CHECK:STDOUT: %a.loc13_12.1: f64 = param a // CHECK:STDOUT: @TooMany.%a: f64 = bind_name a, %a.loc13_12.1 // CHECK:STDOUT: %.loc13_23.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%struct.1(%.loc13_23.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%.loc13_23.1) [template = f64] // CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %float.make_type.loc13_23 [template = f64] // CHECK:STDOUT: %.loc13_23.3: type = converted %float.make_type.loc13_23, %.loc13_23.2 [template = f64] // CHECK:STDOUT: %b.loc13_20.1: f64 = param b // CHECK:STDOUT: @TooMany.%b: f64 = bind_name b, %b.loc13_20.1 // CHECK:STDOUT: %.loc13_31.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%struct.1(%.loc13_31.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%.loc13_31.1) [template = f64] // CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %float.make_type.loc13_31 [template = f64] // CHECK:STDOUT: %.loc13_31.3: type = converted %float.make_type.loc13_31, %.loc13_31.2 [template = f64] // CHECK:STDOUT: %c.loc13_28.1: f64 = param c // CHECK:STDOUT: @TooMany.%c: f64 = bind_name c, %c.loc13_28.1 // CHECK:STDOUT: %.loc13_39.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%struct.1(%.loc13_39.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%Float(%.loc13_39.1) [template = f64] // CHECK:STDOUT: %.loc13_39.2: type = value_of_initializer %float.make_type.loc13_39 [template = f64] // CHECK:STDOUT: %.loc13_39.3: type = converted %float.make_type.loc13_39, %.loc13_39.2 [template = f64] // CHECK:STDOUT: @TooMany.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.9: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %BadReturnType.decl: BadReturnType = fn_decl @BadReturnType [template = constants.%struct.5] { +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.9: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %BadReturnType.decl: = fn_decl @BadReturnType [template = constants.%BadReturnType] { // CHECK:STDOUT: %.loc17_21.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%struct.1(%.loc17_21.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%.loc17_21.1) [template = f64] // CHECK:STDOUT: %.loc17_21.2: type = value_of_initializer %float.make_type.loc17_21 [template = f64] // CHECK:STDOUT: %.loc17_21.3: type = converted %float.make_type.loc17_21, %.loc17_21.2 [template = f64] // CHECK:STDOUT: %a.loc17_18.1: f64 = param a // CHECK:STDOUT: @BadReturnType.%a: f64 = bind_name a, %a.loc17_18.1 // CHECK:STDOUT: %.loc17_29.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%struct.1(%.loc17_29.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%.loc17_29.1) [template = f64] // CHECK:STDOUT: %.loc17_29.2: type = value_of_initializer %float.make_type.loc17_29 [template = f64] // CHECK:STDOUT: %.loc17_29.3: type = converted %float.make_type.loc17_29, %.loc17_29.2 [template = f64] // CHECK:STDOUT: %b.loc17_26.1: f64 = param b // CHECK:STDOUT: @BadReturnType.%b: f64 = bind_name b, %b.loc17_26.1 -// CHECK:STDOUT: %bool.make_type.loc17: init type = call constants.%struct.4() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc17: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc17_37.1: type = value_of_initializer %bool.make_type.loc17 [template = bool] // CHECK:STDOUT: %.loc17_37.2: type = converted %bool.make_type.loc17, %.loc17_37.1 [template = bool] // CHECK:STDOUT: @BadReturnType.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.10: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.11: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.12: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %JustRight.decl: JustRight = fn_decl @JustRight [template = constants.%struct.6] { +// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %JustRight.decl: = fn_decl @JustRight [template = constants.%JustRight] { // CHECK:STDOUT: %.loc18_17.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%struct.1(%.loc18_17.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%.loc18_17.1) [template = f64] // CHECK:STDOUT: %.loc18_17.2: type = value_of_initializer %float.make_type.loc18_17 [template = f64] // CHECK:STDOUT: %.loc18_17.3: type = converted %float.make_type.loc18_17, %.loc18_17.2 [template = f64] // CHECK:STDOUT: %a.loc18_14.1: f64 = param a // CHECK:STDOUT: @JustRight.%a: f64 = bind_name a, %a.loc18_14.1 // CHECK:STDOUT: %.loc18_25.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%struct.1(%.loc18_25.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%.loc18_25.1) [template = f64] // CHECK:STDOUT: %.loc18_25.2: type = value_of_initializer %float.make_type.loc18_25 [template = f64] // CHECK:STDOUT: %.loc18_25.3: type = converted %float.make_type.loc18_25, %.loc18_25.2 [template = f64] // CHECK:STDOUT: %b.loc18_22.1: f64 = param b // CHECK:STDOUT: @JustRight.%b: f64 = bind_name b, %b.loc18_22.1 // CHECK:STDOUT: %.loc18_33.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%struct.1(%.loc18_33.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%Float(%.loc18_33.1) [template = f64] // CHECK:STDOUT: %.loc18_33.2: type = value_of_initializer %float.make_type.loc18_33 [template = f64] // CHECK:STDOUT: %.loc18_33.3: type = converted %float.make_type.loc18_33, %.loc18_33.2 [template = f64] // CHECK:STDOUT: @JustRight.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.13: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.14: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCallTooFew.decl: RuntimeCallTooFew = fn_decl @RuntimeCallTooFew [template = constants.%struct.7] { +// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.14: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCallTooFew.decl: = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { // CHECK:STDOUT: %.loc20_25.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%struct.1(%.loc20_25.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%.loc20_25.1) [template = f64] // CHECK:STDOUT: %.loc20_25.2: type = value_of_initializer %float.make_type.loc20_25 [template = f64] // CHECK:STDOUT: %.loc20_25.3: type = converted %float.make_type.loc20_25, %.loc20_25.2 [template = f64] // CHECK:STDOUT: %a.loc20_22.1: f64 = param a // CHECK:STDOUT: @RuntimeCallTooFew.%a: f64 = bind_name a, %a.loc20_22.1 // CHECK:STDOUT: %.loc20_33.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%struct.1(%.loc20_33.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%Float(%.loc20_33.1) [template = f64] // CHECK:STDOUT: %.loc20_33.2: type = value_of_initializer %float.make_type.loc20_33 [template = f64] // CHECK:STDOUT: %.loc20_33.3: type = converted %float.make_type.loc20_33, %.loc20_33.2 [template = f64] // CHECK:STDOUT: @RuntimeCallTooFew.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.15: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.16: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.17: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.18: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCallTooMany.decl: RuntimeCallTooMany = fn_decl @RuntimeCallTooMany [template = constants.%struct.8] { +// CHECK:STDOUT: %import_ref.15: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.16: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.17: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.18: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCallTooMany.decl: = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { // CHECK:STDOUT: %.loc24_26.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%struct.1(%.loc24_26.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%.loc24_26.1) [template = f64] // CHECK:STDOUT: %.loc24_26.2: type = value_of_initializer %float.make_type.loc24_26 [template = f64] // CHECK:STDOUT: %.loc24_26.3: type = converted %float.make_type.loc24_26, %.loc24_26.2 [template = f64] // CHECK:STDOUT: %a.loc24_23.1: f64 = param a // CHECK:STDOUT: @RuntimeCallTooMany.%a: f64 = bind_name a, %a.loc24_23.1 // CHECK:STDOUT: %.loc24_34.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%struct.1(%.loc24_34.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%.loc24_34.1) [template = f64] // CHECK:STDOUT: %.loc24_34.2: type = value_of_initializer %float.make_type.loc24_34 [template = f64] // CHECK:STDOUT: %.loc24_34.3: type = converted %float.make_type.loc24_34, %.loc24_34.2 [template = f64] // CHECK:STDOUT: %b.loc24_31.1: f64 = param b // CHECK:STDOUT: @RuntimeCallTooMany.%b: f64 = bind_name b, %b.loc24_31.1 // CHECK:STDOUT: %.loc24_42.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%struct.1(%.loc24_42.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%.loc24_42.1) [template = f64] // CHECK:STDOUT: %.loc24_42.2: type = value_of_initializer %float.make_type.loc24_42 [template = f64] // CHECK:STDOUT: %.loc24_42.3: type = converted %float.make_type.loc24_42, %.loc24_42.2 [template = f64] // CHECK:STDOUT: %c.loc24_39.1: f64 = param c // CHECK:STDOUT: @RuntimeCallTooMany.%c: f64 = bind_name c, %c.loc24_39.1 // CHECK:STDOUT: %.loc24_50.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%struct.1(%.loc24_50.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%Float(%.loc24_50.1) [template = f64] // CHECK:STDOUT: %.loc24_50.2: type = value_of_initializer %float.make_type.loc24_50 [template = f64] // CHECK:STDOUT: %.loc24_50.3: type = converted %float.make_type.loc24_50, %.loc24_50.2 [template = f64] // CHECK:STDOUT: @RuntimeCallTooMany.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.19: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.20: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.21: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: RuntimeCallBadReturnType = fn_decl @RuntimeCallBadReturnType [template = constants.%struct.9] { +// CHECK:STDOUT: %import_ref.19: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.20: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.21: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { // CHECK:STDOUT: %.loc28_32.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%struct.1(%.loc28_32.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%.loc28_32.1) [template = f64] // CHECK:STDOUT: %.loc28_32.2: type = value_of_initializer %float.make_type.loc28_32 [template = f64] // CHECK:STDOUT: %.loc28_32.3: type = converted %float.make_type.loc28_32, %.loc28_32.2 [template = f64] // CHECK:STDOUT: %a.loc28_29.1: f64 = param a // CHECK:STDOUT: @RuntimeCallBadReturnType.%a: f64 = bind_name a, %a.loc28_29.1 // CHECK:STDOUT: %.loc28_40.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%struct.1(%.loc28_40.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%.loc28_40.1) [template = f64] // CHECK:STDOUT: %.loc28_40.2: type = value_of_initializer %float.make_type.loc28_40 [template = f64] // CHECK:STDOUT: %.loc28_40.3: type = converted %float.make_type.loc28_40, %.loc28_40.2 [template = f64] // CHECK:STDOUT: %b.loc28_37.1: f64 = param b // CHECK:STDOUT: @RuntimeCallBadReturnType.%b: f64 = bind_name b, %b.loc28_37.1 -// CHECK:STDOUT: %bool.make_type.loc28: init type = call constants.%struct.4() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc28: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc28_48.1: type = value_of_initializer %bool.make_type.loc28 [template = bool] // CHECK:STDOUT: %.loc28_48.2: type = converted %bool.make_type.loc28, %.loc28_48.1 [template = bool] // CHECK:STDOUT: @RuntimeCallBadReturnType.%return: ref bool = var @@ -357,7 +357,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooFew(%a: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooFew.ref: TooFew = name_ref TooFew, file.%TooFew.decl [template = constants.%struct.2] +// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %TooFew.call: init f64 = call %TooFew.ref(%a.ref) // CHECK:STDOUT: %.loc21_19.1: f64 = value_of_initializer %TooFew.call @@ -367,7 +367,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooMany(%a: f64, %b: f64, %c: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooMany.ref: TooMany = name_ref TooMany, file.%TooMany.decl [template = constants.%struct.3] +// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %c.ref: f64 = name_ref c, %c @@ -379,7 +379,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallBadReturnType(%a: f64, %b: f64) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %BadReturnType.ref: BadReturnType = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%struct.5] +// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/float/div.carbon b/toolchain/check/testdata/builtins/float/div.carbon index 3c06efbea305..e27433be9b0d 100644 --- a/toolchain/check/testdata/builtins/float/div.carbon +++ b/toolchain/check/testdata/builtins/float/div.carbon @@ -56,13 +56,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Float = struct_value () [template] -// CHECK:STDOUT: %Div: type = fn_type @Div [template] -// CHECK:STDOUT: %struct.2: Div = struct_value () [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.3: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Div.type: type = fn_type @Div [template] +// CHECK:STDOUT: %Div: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: %.3: f64 = float_literal 10 [template] // CHECK:STDOUT: %.4: f64 = float_literal 2.5 [template] // CHECK:STDOUT: %.5: f64 = float_literal 4 [template] @@ -80,63 +80,63 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: .a = %a.loc8 // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Div.decl: Div = fn_decl @Div [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %Div.decl: = fn_decl @Div [template = constants.%Div] { // CHECK:STDOUT: %.loc2_11.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%struct.1(%.loc2_11.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%.loc2_11.1) [template = f64] // CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %float.make_type.loc2_11 [template = f64] // CHECK:STDOUT: %.loc2_11.3: type = converted %float.make_type.loc2_11, %.loc2_11.2 [template = f64] // CHECK:STDOUT: %a.loc2_8.1: f64 = param a // CHECK:STDOUT: @Div.%a: f64 = bind_name a, %a.loc2_8.1 // CHECK:STDOUT: %.loc2_19.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%struct.1(%.loc2_19.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%.loc2_19.1) [template = f64] // CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %float.make_type.loc2_19 [template = f64] // CHECK:STDOUT: %.loc2_19.3: type = converted %float.make_type.loc2_19, %.loc2_19.2 [template = f64] // CHECK:STDOUT: %b.loc2_16.1: f64 = param b // CHECK:STDOUT: @Div.%b: f64 = bind_name b, %b.loc2_16.1 // CHECK:STDOUT: %.loc2_27.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%struct.1(%.loc2_27.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%Float(%.loc2_27.1) [template = f64] // CHECK:STDOUT: %.loc2_27.2: type = value_of_initializer %float.make_type.loc2_27 [template = f64] // CHECK:STDOUT: %.loc2_27.3: type = converted %float.make_type.loc2_27, %.loc2_27.2 [template = f64] // CHECK:STDOUT: @Div.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.3] { +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %.loc4_19.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%struct.1(%.loc4_19.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%.loc4_19.1) [template = f64] // CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %float.make_type.loc4_19 [template = f64] // CHECK:STDOUT: %.loc4_19.3: type = converted %float.make_type.loc4_19, %.loc4_19.2 [template = f64] // CHECK:STDOUT: %a.loc4_16.1: f64 = param a // CHECK:STDOUT: @RuntimeCall.%a: f64 = bind_name a, %a.loc4_16.1 // CHECK:STDOUT: %.loc4_27.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%struct.1(%.loc4_27.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%.loc4_27.1) [template = f64] // CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %float.make_type.loc4_27 [template = f64] // CHECK:STDOUT: %.loc4_27.3: type = converted %float.make_type.loc4_27, %.loc4_27.2 [template = f64] // CHECK:STDOUT: %b.loc4_24.1: f64 = param b // CHECK:STDOUT: @RuntimeCall.%b: f64 = bind_name b, %b.loc4_24.1 // CHECK:STDOUT: %.loc4_35.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%struct.1(%.loc4_35.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%.loc4_35.1) [template = f64] // CHECK:STDOUT: %.loc4_35.2: type = value_of_initializer %float.make_type.loc4_35 [template = f64] // CHECK:STDOUT: %.loc4_35.3: type = converted %float.make_type.loc4_35, %.loc4_35.2 [template = f64] // CHECK:STDOUT: @RuntimeCall.%return: ref f64 = var // CHECK:STDOUT: } // CHECK:STDOUT: %.loc8_8.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.7: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %float.make_type.loc8: init type = call constants.%struct.1(%.loc8_8.1) [template = f64] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %float.make_type.loc8: init type = call constants.%Float(%.loc8_8.1) [template = f64] // CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %float.make_type.loc8 [template = f64] // CHECK:STDOUT: %.loc8_8.3: type = converted %float.make_type.loc8, %.loc8_8.2 [template = f64] // CHECK:STDOUT: %a.var: ref f64 = var a // CHECK:STDOUT: %a.loc8: ref f64 = bind_name a, %a.var // CHECK:STDOUT: %.loc9_8.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.8: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %float.make_type.loc9: init type = call constants.%struct.1(%.loc9_8.1) [template = f64] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %float.make_type.loc9: init type = call constants.%Float(%.loc9_8.1) [template = f64] // CHECK:STDOUT: %.loc9_8.2: type = value_of_initializer %float.make_type.loc9 [template = f64] // CHECK:STDOUT: %.loc9_8.3: type = converted %float.make_type.loc9, %.loc9_8.2 [template = f64] -// CHECK:STDOUT: %Div.ref.loc9: Div = name_ref Div, %Div.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Div.ref.loc9: = name_ref Div, %Div.decl [template = constants.%Div] // CHECK:STDOUT: %.loc9_18: f64 = float_literal 1 [template = constants.%.6] // CHECK:STDOUT: %.loc9_23: f64 = float_literal 0 [template = constants.%.7] // CHECK:STDOUT: %float.div.loc9: init f64 = call %Div.ref.loc9(%.loc9_18, %.loc9_23) [template = constants.%.8] @@ -144,11 +144,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc9_27.2: f64 = converted %float.div.loc9, %.loc9_27.1 [template = constants.%.8] // CHECK:STDOUT: %b.loc9: f64 = bind_name b, %.loc9_27.2 // CHECK:STDOUT: %.loc10_8.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.9: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %float.make_type.loc10: init type = call constants.%struct.1(%.loc10_8.1) [template = f64] +// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %float.make_type.loc10: init type = call constants.%Float(%.loc10_8.1) [template = f64] // CHECK:STDOUT: %.loc10_8.2: type = value_of_initializer %float.make_type.loc10 [template = f64] // CHECK:STDOUT: %.loc10_8.3: type = converted %float.make_type.loc10, %.loc10_8.2 [template = f64] -// CHECK:STDOUT: %Div.ref.loc10: Div = name_ref Div, %Div.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Div.ref.loc10: = name_ref Div, %Div.decl [template = constants.%Div] // CHECK:STDOUT: %.loc10_18: f64 = float_literal 0 [template = constants.%.7] // CHECK:STDOUT: %.loc10_23: f64 = float_literal 0 [template = constants.%.7] // CHECK:STDOUT: %float.div.loc10: init f64 = call %Div.ref.loc10(%.loc10_18, %.loc10_23) [template = constants.%.9] @@ -163,7 +163,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: f64, %b: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Div.ref: Div = name_ref Div, file.%Div.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Div.ref: = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %float.div: init f64 = call %Div.ref(%a.ref, %b.ref) @@ -174,7 +174,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Div.ref: Div = name_ref Div, file.%Div.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Div.ref: = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %.loc8_18: f64 = float_literal 10 [template = constants.%.3] // CHECK:STDOUT: %.loc8_24: f64 = float_literal 2.5 [template = constants.%.4] // CHECK:STDOUT: %float.div: init f64 = call %Div.ref(%.loc8_18, %.loc8_24) [template = constants.%.5] @@ -186,25 +186,25 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Float = struct_value () [template] -// CHECK:STDOUT: %TooFew: type = fn_type @TooFew [template] -// CHECK:STDOUT: %struct.2: TooFew = struct_value () [template] -// CHECK:STDOUT: %TooMany: type = fn_type @TooMany [template] -// CHECK:STDOUT: %struct.3: TooMany = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.4: Bool = struct_value () [template] -// CHECK:STDOUT: %BadReturnType: type = fn_type @BadReturnType [template] -// CHECK:STDOUT: %struct.5: BadReturnType = struct_value () [template] -// CHECK:STDOUT: %JustRight: type = fn_type @JustRight [template] -// CHECK:STDOUT: %struct.6: JustRight = struct_value () [template] -// CHECK:STDOUT: %RuntimeCallTooFew: type = fn_type @RuntimeCallTooFew [template] -// CHECK:STDOUT: %struct.7: RuntimeCallTooFew = struct_value () [template] -// CHECK:STDOUT: %RuntimeCallTooMany: type = fn_type @RuntimeCallTooMany [template] -// CHECK:STDOUT: %struct.8: RuntimeCallTooMany = struct_value () [template] -// CHECK:STDOUT: %RuntimeCallBadReturnType: type = fn_type @RuntimeCallBadReturnType [template] -// CHECK:STDOUT: %struct.9: RuntimeCallBadReturnType = struct_value () [template] +// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] +// CHECK:STDOUT: %TooFew: = struct_value () [template] +// CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] +// CHECK:STDOUT: %TooMany: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %BadReturnType.type: type = fn_type @BadReturnType [template] +// CHECK:STDOUT: %BadReturnType: = struct_value () [template] +// CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] +// CHECK:STDOUT: %JustRight: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] +// CHECK:STDOUT: %RuntimeCallTooFew: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] +// CHECK:STDOUT: %RuntimeCallTooMany: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType.type: type = fn_type @RuntimeCallBadReturnType [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -219,154 +219,154 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: .RuntimeCallBadReturnType = %RuntimeCallBadReturnType.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TooFew.decl: TooFew = fn_decl @TooFew [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %TooFew.decl: = fn_decl @TooFew [template = constants.%TooFew] { // CHECK:STDOUT: %.loc8_14.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%struct.1(%.loc8_14.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%.loc8_14.1) [template = f64] // CHECK:STDOUT: %.loc8_14.2: type = value_of_initializer %float.make_type.loc8_14 [template = f64] // CHECK:STDOUT: %.loc8_14.3: type = converted %float.make_type.loc8_14, %.loc8_14.2 [template = f64] // CHECK:STDOUT: %a.loc8_11.1: f64 = param a // CHECK:STDOUT: @TooFew.%a: f64 = bind_name a, %a.loc8_11.1 // CHECK:STDOUT: %.loc8_22.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%struct.1(%.loc8_22.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%Float(%.loc8_22.1) [template = f64] // CHECK:STDOUT: %.loc8_22.2: type = value_of_initializer %float.make_type.loc8_22 [template = f64] // CHECK:STDOUT: %.loc8_22.3: type = converted %float.make_type.loc8_22, %.loc8_22.2 [template = f64] // CHECK:STDOUT: @TooFew.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TooMany.decl: TooMany = fn_decl @TooMany [template = constants.%struct.3] { +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %TooMany.decl: = fn_decl @TooMany [template = constants.%TooMany] { // CHECK:STDOUT: %.loc13_15.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%struct.1(%.loc13_15.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%.loc13_15.1) [template = f64] // CHECK:STDOUT: %.loc13_15.2: type = value_of_initializer %float.make_type.loc13_15 [template = f64] // CHECK:STDOUT: %.loc13_15.3: type = converted %float.make_type.loc13_15, %.loc13_15.2 [template = f64] // CHECK:STDOUT: %a.loc13_12.1: f64 = param a // CHECK:STDOUT: @TooMany.%a: f64 = bind_name a, %a.loc13_12.1 // CHECK:STDOUT: %.loc13_23.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%struct.1(%.loc13_23.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%.loc13_23.1) [template = f64] // CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %float.make_type.loc13_23 [template = f64] // CHECK:STDOUT: %.loc13_23.3: type = converted %float.make_type.loc13_23, %.loc13_23.2 [template = f64] // CHECK:STDOUT: %b.loc13_20.1: f64 = param b // CHECK:STDOUT: @TooMany.%b: f64 = bind_name b, %b.loc13_20.1 // CHECK:STDOUT: %.loc13_31.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%struct.1(%.loc13_31.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%.loc13_31.1) [template = f64] // CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %float.make_type.loc13_31 [template = f64] // CHECK:STDOUT: %.loc13_31.3: type = converted %float.make_type.loc13_31, %.loc13_31.2 [template = f64] // CHECK:STDOUT: %c.loc13_28.1: f64 = param c // CHECK:STDOUT: @TooMany.%c: f64 = bind_name c, %c.loc13_28.1 // CHECK:STDOUT: %.loc13_39.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%struct.1(%.loc13_39.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%Float(%.loc13_39.1) [template = f64] // CHECK:STDOUT: %.loc13_39.2: type = value_of_initializer %float.make_type.loc13_39 [template = f64] // CHECK:STDOUT: %.loc13_39.3: type = converted %float.make_type.loc13_39, %.loc13_39.2 [template = f64] // CHECK:STDOUT: @TooMany.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.9: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %BadReturnType.decl: BadReturnType = fn_decl @BadReturnType [template = constants.%struct.5] { +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.9: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %BadReturnType.decl: = fn_decl @BadReturnType [template = constants.%BadReturnType] { // CHECK:STDOUT: %.loc17_21.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%struct.1(%.loc17_21.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%.loc17_21.1) [template = f64] // CHECK:STDOUT: %.loc17_21.2: type = value_of_initializer %float.make_type.loc17_21 [template = f64] // CHECK:STDOUT: %.loc17_21.3: type = converted %float.make_type.loc17_21, %.loc17_21.2 [template = f64] // CHECK:STDOUT: %a.loc17_18.1: f64 = param a // CHECK:STDOUT: @BadReturnType.%a: f64 = bind_name a, %a.loc17_18.1 // CHECK:STDOUT: %.loc17_29.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%struct.1(%.loc17_29.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%.loc17_29.1) [template = f64] // CHECK:STDOUT: %.loc17_29.2: type = value_of_initializer %float.make_type.loc17_29 [template = f64] // CHECK:STDOUT: %.loc17_29.3: type = converted %float.make_type.loc17_29, %.loc17_29.2 [template = f64] // CHECK:STDOUT: %b.loc17_26.1: f64 = param b // CHECK:STDOUT: @BadReturnType.%b: f64 = bind_name b, %b.loc17_26.1 -// CHECK:STDOUT: %bool.make_type.loc17: init type = call constants.%struct.4() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc17: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc17_37.1: type = value_of_initializer %bool.make_type.loc17 [template = bool] // CHECK:STDOUT: %.loc17_37.2: type = converted %bool.make_type.loc17, %.loc17_37.1 [template = bool] // CHECK:STDOUT: @BadReturnType.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.10: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.11: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.12: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %JustRight.decl: JustRight = fn_decl @JustRight [template = constants.%struct.6] { +// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %JustRight.decl: = fn_decl @JustRight [template = constants.%JustRight] { // CHECK:STDOUT: %.loc18_17.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%struct.1(%.loc18_17.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%.loc18_17.1) [template = f64] // CHECK:STDOUT: %.loc18_17.2: type = value_of_initializer %float.make_type.loc18_17 [template = f64] // CHECK:STDOUT: %.loc18_17.3: type = converted %float.make_type.loc18_17, %.loc18_17.2 [template = f64] // CHECK:STDOUT: %a.loc18_14.1: f64 = param a // CHECK:STDOUT: @JustRight.%a: f64 = bind_name a, %a.loc18_14.1 // CHECK:STDOUT: %.loc18_25.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%struct.1(%.loc18_25.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%.loc18_25.1) [template = f64] // CHECK:STDOUT: %.loc18_25.2: type = value_of_initializer %float.make_type.loc18_25 [template = f64] // CHECK:STDOUT: %.loc18_25.3: type = converted %float.make_type.loc18_25, %.loc18_25.2 [template = f64] // CHECK:STDOUT: %b.loc18_22.1: f64 = param b // CHECK:STDOUT: @JustRight.%b: f64 = bind_name b, %b.loc18_22.1 // CHECK:STDOUT: %.loc18_33.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%struct.1(%.loc18_33.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%Float(%.loc18_33.1) [template = f64] // CHECK:STDOUT: %.loc18_33.2: type = value_of_initializer %float.make_type.loc18_33 [template = f64] // CHECK:STDOUT: %.loc18_33.3: type = converted %float.make_type.loc18_33, %.loc18_33.2 [template = f64] // CHECK:STDOUT: @JustRight.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.13: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.14: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCallTooFew.decl: RuntimeCallTooFew = fn_decl @RuntimeCallTooFew [template = constants.%struct.7] { +// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.14: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCallTooFew.decl: = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { // CHECK:STDOUT: %.loc20_25.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%struct.1(%.loc20_25.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%.loc20_25.1) [template = f64] // CHECK:STDOUT: %.loc20_25.2: type = value_of_initializer %float.make_type.loc20_25 [template = f64] // CHECK:STDOUT: %.loc20_25.3: type = converted %float.make_type.loc20_25, %.loc20_25.2 [template = f64] // CHECK:STDOUT: %a.loc20_22.1: f64 = param a // CHECK:STDOUT: @RuntimeCallTooFew.%a: f64 = bind_name a, %a.loc20_22.1 // CHECK:STDOUT: %.loc20_33.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%struct.1(%.loc20_33.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%Float(%.loc20_33.1) [template = f64] // CHECK:STDOUT: %.loc20_33.2: type = value_of_initializer %float.make_type.loc20_33 [template = f64] // CHECK:STDOUT: %.loc20_33.3: type = converted %float.make_type.loc20_33, %.loc20_33.2 [template = f64] // CHECK:STDOUT: @RuntimeCallTooFew.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.15: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.16: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.17: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.18: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCallTooMany.decl: RuntimeCallTooMany = fn_decl @RuntimeCallTooMany [template = constants.%struct.8] { +// CHECK:STDOUT: %import_ref.15: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.16: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.17: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.18: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCallTooMany.decl: = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { // CHECK:STDOUT: %.loc24_26.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%struct.1(%.loc24_26.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%.loc24_26.1) [template = f64] // CHECK:STDOUT: %.loc24_26.2: type = value_of_initializer %float.make_type.loc24_26 [template = f64] // CHECK:STDOUT: %.loc24_26.3: type = converted %float.make_type.loc24_26, %.loc24_26.2 [template = f64] // CHECK:STDOUT: %a.loc24_23.1: f64 = param a // CHECK:STDOUT: @RuntimeCallTooMany.%a: f64 = bind_name a, %a.loc24_23.1 // CHECK:STDOUT: %.loc24_34.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%struct.1(%.loc24_34.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%.loc24_34.1) [template = f64] // CHECK:STDOUT: %.loc24_34.2: type = value_of_initializer %float.make_type.loc24_34 [template = f64] // CHECK:STDOUT: %.loc24_34.3: type = converted %float.make_type.loc24_34, %.loc24_34.2 [template = f64] // CHECK:STDOUT: %b.loc24_31.1: f64 = param b // CHECK:STDOUT: @RuntimeCallTooMany.%b: f64 = bind_name b, %b.loc24_31.1 // CHECK:STDOUT: %.loc24_42.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%struct.1(%.loc24_42.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%.loc24_42.1) [template = f64] // CHECK:STDOUT: %.loc24_42.2: type = value_of_initializer %float.make_type.loc24_42 [template = f64] // CHECK:STDOUT: %.loc24_42.3: type = converted %float.make_type.loc24_42, %.loc24_42.2 [template = f64] // CHECK:STDOUT: %c.loc24_39.1: f64 = param c // CHECK:STDOUT: @RuntimeCallTooMany.%c: f64 = bind_name c, %c.loc24_39.1 // CHECK:STDOUT: %.loc24_50.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%struct.1(%.loc24_50.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%Float(%.loc24_50.1) [template = f64] // CHECK:STDOUT: %.loc24_50.2: type = value_of_initializer %float.make_type.loc24_50 [template = f64] // CHECK:STDOUT: %.loc24_50.3: type = converted %float.make_type.loc24_50, %.loc24_50.2 [template = f64] // CHECK:STDOUT: @RuntimeCallTooMany.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.19: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.20: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.21: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: RuntimeCallBadReturnType = fn_decl @RuntimeCallBadReturnType [template = constants.%struct.9] { +// CHECK:STDOUT: %import_ref.19: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.20: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.21: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { // CHECK:STDOUT: %.loc28_32.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%struct.1(%.loc28_32.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%.loc28_32.1) [template = f64] // CHECK:STDOUT: %.loc28_32.2: type = value_of_initializer %float.make_type.loc28_32 [template = f64] // CHECK:STDOUT: %.loc28_32.3: type = converted %float.make_type.loc28_32, %.loc28_32.2 [template = f64] // CHECK:STDOUT: %a.loc28_29.1: f64 = param a // CHECK:STDOUT: @RuntimeCallBadReturnType.%a: f64 = bind_name a, %a.loc28_29.1 // CHECK:STDOUT: %.loc28_40.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%struct.1(%.loc28_40.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%.loc28_40.1) [template = f64] // CHECK:STDOUT: %.loc28_40.2: type = value_of_initializer %float.make_type.loc28_40 [template = f64] // CHECK:STDOUT: %.loc28_40.3: type = converted %float.make_type.loc28_40, %.loc28_40.2 [template = f64] // CHECK:STDOUT: %b.loc28_37.1: f64 = param b // CHECK:STDOUT: @RuntimeCallBadReturnType.%b: f64 = bind_name b, %b.loc28_37.1 -// CHECK:STDOUT: %bool.make_type.loc28: init type = call constants.%struct.4() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc28: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc28_48.1: type = value_of_initializer %bool.make_type.loc28 [template = bool] // CHECK:STDOUT: %.loc28_48.2: type = converted %bool.make_type.loc28, %.loc28_48.1 [template = bool] // CHECK:STDOUT: @RuntimeCallBadReturnType.%return: ref bool = var @@ -387,7 +387,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooFew(%a: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooFew.ref: TooFew = name_ref TooFew, file.%TooFew.decl [template = constants.%struct.2] +// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %TooFew.call: init f64 = call %TooFew.ref(%a.ref) // CHECK:STDOUT: %.loc21_19.1: f64 = value_of_initializer %TooFew.call @@ -397,7 +397,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooMany(%a: f64, %b: f64, %c: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooMany.ref: TooMany = name_ref TooMany, file.%TooMany.decl [template = constants.%struct.3] +// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %c.ref: f64 = name_ref c, %c @@ -409,7 +409,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallBadReturnType(%a: f64, %b: f64) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %BadReturnType.ref: BadReturnType = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%struct.5] +// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/float/eq.carbon b/toolchain/check/testdata/builtins/float/eq.carbon index fc7566fd4fac..4287229659f6 100644 --- a/toolchain/check/testdata/builtins/float/eq.carbon +++ b/toolchain/check/testdata/builtins/float/eq.carbon @@ -37,25 +37,25 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Float = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.2: Bool = struct_value () [template] -// CHECK:STDOUT: %Eq: type = fn_type @Eq [template] -// CHECK:STDOUT: %struct.3: Eq = struct_value () [template] +// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Eq.type: type = fn_type @Eq [template] +// CHECK:STDOUT: %Eq: = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] // CHECK:STDOUT: %.3: type = struct_type {} [template] // CHECK:STDOUT: %False: type = class_type @False [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.4: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.4: type = ptr_type {} [template] // CHECK:STDOUT: %.5: f64 = float_literal 1 [template] // CHECK:STDOUT: %.6: bool = bool_literal true [template] // CHECK:STDOUT: %.7: f64 = float_literal 2 [template] // CHECK:STDOUT: %.8: bool = bool_literal false [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.5: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -68,30 +68,30 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %Eq.decl: Eq = fn_decl @Eq [template = constants.%struct.3] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Eq.decl: = fn_decl @Eq [template = constants.%Eq] { // CHECK:STDOUT: %.loc2_10.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_10: init type = call constants.%struct.1(%.loc2_10.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_10: init type = call constants.%Float(%.loc2_10.1) [template = f64] // CHECK:STDOUT: %.loc2_10.2: type = value_of_initializer %float.make_type.loc2_10 [template = f64] // CHECK:STDOUT: %.loc2_10.3: type = converted %float.make_type.loc2_10, %.loc2_10.2 [template = f64] // CHECK:STDOUT: %a.loc2_7.1: f64 = param a // CHECK:STDOUT: @Eq.%a: f64 = bind_name a, %a.loc2_7.1 // CHECK:STDOUT: %.loc2_18.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_18: init type = call constants.%struct.1(%.loc2_18.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_18: init type = call constants.%Float(%.loc2_18.1) [template = f64] // CHECK:STDOUT: %.loc2_18.2: type = value_of_initializer %float.make_type.loc2_18 [template = f64] // CHECK:STDOUT: %.loc2_18.3: type = converted %float.make_type.loc2_18, %.loc2_18.2 [template = f64] // CHECK:STDOUT: %b.loc2_15.1: f64 = param b // CHECK:STDOUT: @Eq.%b: f64 = bind_name b, %b.loc2_15.1 -// CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_26.1: type = value_of_initializer %bool.make_type.loc2 [template = bool] // CHECK:STDOUT: %.loc2_26.2: type = converted %bool.make_type.loc2, %.loc2_26.1 [template = bool] // CHECK:STDOUT: @Eq.%return: ref bool = var // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: type = class_decl @True [template = constants.%True] {} // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.4] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] // CHECK:STDOUT: %true_.loc7_6.1: True = param true_ // CHECK:STDOUT: @F.%true_: True = bind_name true_, %true_.loc7_6.1 @@ -99,23 +99,23 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: %false_.loc7_19.1: False = param false_ // CHECK:STDOUT: @F.%false_: False = bind_name false_, %false_.loc7_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.5] { +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.6: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %.loc12_19.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc12_19: init type = call constants.%struct.1(%.loc12_19.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc12_19: init type = call constants.%Float(%.loc12_19.1) [template = f64] // CHECK:STDOUT: %.loc12_19.2: type = value_of_initializer %float.make_type.loc12_19 [template = f64] // CHECK:STDOUT: %.loc12_19.3: type = converted %float.make_type.loc12_19, %.loc12_19.2 [template = f64] // CHECK:STDOUT: %a.loc12_16.1: f64 = param a // CHECK:STDOUT: @RuntimeCall.%a: f64 = bind_name a, %a.loc12_16.1 // CHECK:STDOUT: %.loc12_27.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc12_27: init type = call constants.%struct.1(%.loc12_27.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc12_27: init type = call constants.%Float(%.loc12_27.1) [template = f64] // CHECK:STDOUT: %.loc12_27.2: type = value_of_initializer %float.make_type.loc12_27 [template = f64] // CHECK:STDOUT: %.loc12_27.3: type = converted %float.make_type.loc12_27, %.loc12_27.2 [template = f64] // CHECK:STDOUT: %b.loc12_24.1: f64 = param b // CHECK:STDOUT: @RuntimeCall.%b: f64 = bind_name b, %b.loc12_24.1 -// CHECK:STDOUT: %bool.make_type.loc12: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc12: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_35.1: type = value_of_initializer %bool.make_type.loc12 [template = bool] // CHECK:STDOUT: %.loc12_35.2: type = converted %bool.make_type.loc12, %.loc12_35.1 [template = bool] // CHECK:STDOUT: @RuntimeCall.%return: ref bool = var @@ -141,7 +141,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: fn @F(%true_: True, %false_: False) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true_.ref: True = name_ref true_, %true_ -// CHECK:STDOUT: %Eq.ref.loc8: Eq = name_ref Eq, file.%Eq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Eq.ref.loc8: = name_ref Eq, file.%Eq.decl [template = constants.%Eq] // CHECK:STDOUT: %.loc8_19: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc8_24: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %float.eq.loc8: init bool = call %Eq.ref.loc8(%.loc8_19, %.loc8_24) [template = constants.%.6] @@ -160,7 +160,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: !if.expr.result.loc8: // CHECK:STDOUT: %.loc8_13.3: type = block_arg !if.expr.result.loc8 [template = constants.%True] // CHECK:STDOUT: %false_.ref: False = name_ref false_, %false_ -// CHECK:STDOUT: %Eq.ref.loc9: Eq = name_ref Eq, file.%Eq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Eq.ref.loc9: = name_ref Eq, file.%Eq.decl [template = constants.%Eq] // CHECK:STDOUT: %.loc9_20: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc9_25: f64 = float_literal 2 [template = constants.%.7] // CHECK:STDOUT: %float.eq.loc9: init bool = call %Eq.ref.loc9(%.loc9_20, %.loc9_25) [template = constants.%.8] @@ -183,7 +183,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: f64, %b: f64) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Eq.ref: Eq = name_ref Eq, file.%Eq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Eq.ref: = name_ref Eq, file.%Eq.decl [template = constants.%Eq] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %float.eq: init bool = call %Eq.ref(%a.ref, %b.ref) @@ -196,11 +196,11 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Float = struct_value () [template] -// CHECK:STDOUT: %WrongResult: type = fn_type @WrongResult [template] -// CHECK:STDOUT: %struct.2: WrongResult = struct_value () [template] +// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %WrongResult.type: type = fn_type @WrongResult [template] +// CHECK:STDOUT: %WrongResult: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -209,24 +209,24 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: .WrongResult = %WrongResult.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %WrongResult.decl: WrongResult = fn_decl @WrongResult [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %WrongResult.decl: = fn_decl @WrongResult [template = constants.%WrongResult] { // CHECK:STDOUT: %.loc7_19.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc7_19: init type = call constants.%struct.1(%.loc7_19.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc7_19: init type = call constants.%Float(%.loc7_19.1) [template = f64] // CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %float.make_type.loc7_19 [template = f64] // CHECK:STDOUT: %.loc7_19.3: type = converted %float.make_type.loc7_19, %.loc7_19.2 [template = f64] // CHECK:STDOUT: %a.loc7_16.1: f64 = param a // CHECK:STDOUT: @WrongResult.%a: f64 = bind_name a, %a.loc7_16.1 // CHECK:STDOUT: %.loc7_27.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc7_27: init type = call constants.%struct.1(%.loc7_27.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc7_27: init type = call constants.%Float(%.loc7_27.1) [template = f64] // CHECK:STDOUT: %.loc7_27.2: type = value_of_initializer %float.make_type.loc7_27 [template = f64] // CHECK:STDOUT: %.loc7_27.3: type = converted %float.make_type.loc7_27, %.loc7_27.2 [template = f64] // CHECK:STDOUT: %b.loc7_24.1: f64 = param b // CHECK:STDOUT: @WrongResult.%b: f64 = bind_name b, %b.loc7_24.1 // CHECK:STDOUT: %.loc7_35.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc7_35: init type = call constants.%struct.1(%.loc7_35.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc7_35: init type = call constants.%Float(%.loc7_35.1) [template = f64] // CHECK:STDOUT: %.loc7_35.2: type = value_of_initializer %float.make_type.loc7_35 [template = f64] // CHECK:STDOUT: %.loc7_35.3: type = converted %float.make_type.loc7_35, %.loc7_35.2 [template = f64] // CHECK:STDOUT: @WrongResult.%return: ref f64 = var diff --git a/toolchain/check/testdata/builtins/float/greater.carbon b/toolchain/check/testdata/builtins/float/greater.carbon index 5a6a5b4c8ad1..5e81fb57dd2d 100644 --- a/toolchain/check/testdata/builtins/float/greater.carbon +++ b/toolchain/check/testdata/builtins/float/greater.carbon @@ -32,20 +32,20 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Float = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.2: Bool = struct_value () [template] -// CHECK:STDOUT: %Greater: type = fn_type @Greater [template] -// CHECK:STDOUT: %struct.3: Greater = struct_value () [template] -// CHECK:STDOUT: %Negate: type = fn_type @Negate [template] -// CHECK:STDOUT: %struct.4: Negate = struct_value () [template] +// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Greater.type: type = fn_type @Greater [template] +// CHECK:STDOUT: %Greater: = struct_value () [template] +// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] +// CHECK:STDOUT: %Negate: = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] // CHECK:STDOUT: %.3: type = struct_type {} [template] // CHECK:STDOUT: %False: type = class_type @False [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.5: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.4: type = ptr_type {} [template] // CHECK:STDOUT: %.5: f64 = float_literal 1 [template] // CHECK:STDOUT: %.6: f64 = float_literal 2 [template] @@ -53,8 +53,8 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.8: f64 = float_literal 0 [template] // CHECK:STDOUT: %.9: bool = bool_literal true [template] // CHECK:STDOUT: %.10: f64 = float_literal -1 [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.6: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -68,45 +68,45 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %Greater.decl: Greater = fn_decl @Greater [template = constants.%struct.3] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Greater.decl: = fn_decl @Greater [template = constants.%Greater] { // CHECK:STDOUT: %.loc2_15.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_15: init type = call constants.%struct.1(%.loc2_15.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_15: init type = call constants.%Float(%.loc2_15.1) [template = f64] // CHECK:STDOUT: %.loc2_15.2: type = value_of_initializer %float.make_type.loc2_15 [template = f64] // CHECK:STDOUT: %.loc2_15.3: type = converted %float.make_type.loc2_15, %.loc2_15.2 [template = f64] // CHECK:STDOUT: %a.loc2_12.1: f64 = param a // CHECK:STDOUT: @Greater.%a: f64 = bind_name a, %a.loc2_12.1 // CHECK:STDOUT: %.loc2_23.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_23: init type = call constants.%struct.1(%.loc2_23.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_23: init type = call constants.%Float(%.loc2_23.1) [template = f64] // CHECK:STDOUT: %.loc2_23.2: type = value_of_initializer %float.make_type.loc2_23 [template = f64] // CHECK:STDOUT: %.loc2_23.3: type = converted %float.make_type.loc2_23, %.loc2_23.2 [template = f64] // CHECK:STDOUT: %b.loc2_20.1: f64 = param b // CHECK:STDOUT: @Greater.%b: f64 = bind_name b, %b.loc2_20.1 -// CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_31.1: type = value_of_initializer %bool.make_type.loc2 [template = bool] // CHECK:STDOUT: %.loc2_31.2: type = converted %bool.make_type.loc2, %.loc2_31.1 [template = bool] // CHECK:STDOUT: @Greater.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Negate.decl: Negate = fn_decl @Negate [template = constants.%struct.4] { +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %.loc3_14.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%struct.1(%.loc3_14.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%.loc3_14.1) [template = f64] // CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %float.make_type.loc3_14 [template = f64] // CHECK:STDOUT: %.loc3_14.3: type = converted %float.make_type.loc3_14, %.loc3_14.2 [template = f64] // CHECK:STDOUT: %a.loc3_11.1: f64 = param a // CHECK:STDOUT: @Negate.%a: f64 = bind_name a, %a.loc3_11.1 // CHECK:STDOUT: %.loc3_22.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%struct.1(%.loc3_22.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%Float(%.loc3_22.1) [template = f64] // CHECK:STDOUT: %.loc3_22.2: type = value_of_initializer %float.make_type.loc3_22 [template = f64] // CHECK:STDOUT: %.loc3_22.3: type = converted %float.make_type.loc3_22, %.loc3_22.2 [template = f64] // CHECK:STDOUT: @Negate.%return: ref f64 = var // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: type = class_decl @True [template = constants.%True] {} // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.5] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] // CHECK:STDOUT: %true_.loc8_6.1: True = param true_ // CHECK:STDOUT: @F.%true_: True = bind_name true_, %true_.loc8_6.1 @@ -114,23 +114,23 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %false_.loc8_19.1: False = param false_ // CHECK:STDOUT: @F.%false_: False = bind_name false_, %false_.loc8_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.6] { +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %.loc16_19.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%struct.1(%.loc16_19.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%.loc16_19.1) [template = f64] // CHECK:STDOUT: %.loc16_19.2: type = value_of_initializer %float.make_type.loc16_19 [template = f64] // CHECK:STDOUT: %.loc16_19.3: type = converted %float.make_type.loc16_19, %.loc16_19.2 [template = f64] // CHECK:STDOUT: %a.loc16_16.1: f64 = param a // CHECK:STDOUT: @RuntimeCall.%a: f64 = bind_name a, %a.loc16_16.1 // CHECK:STDOUT: %.loc16_27.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%struct.1(%.loc16_27.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%.loc16_27.1) [template = f64] // CHECK:STDOUT: %.loc16_27.2: type = value_of_initializer %float.make_type.loc16_27 [template = f64] // CHECK:STDOUT: %.loc16_27.3: type = converted %float.make_type.loc16_27, %.loc16_27.2 [template = f64] // CHECK:STDOUT: %b.loc16_24.1: f64 = param b // CHECK:STDOUT: @RuntimeCall.%b: f64 = bind_name b, %b.loc16_24.1 -// CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type.loc16 [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type.loc16, %.loc16_35.1 [template = bool] // CHECK:STDOUT: @RuntimeCall.%return: ref bool = var @@ -158,7 +158,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: fn @F(%true_: True, %false_: False) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %false_.ref.loc9: False = name_ref false_, %false_ -// CHECK:STDOUT: %Greater.ref.loc9: Greater = name_ref Greater, file.%Greater.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Greater.ref.loc9: = name_ref Greater, file.%Greater.decl [template = constants.%Greater] // CHECK:STDOUT: %.loc9_25: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc9_30: f64 = float_literal 2 [template = constants.%.6] // CHECK:STDOUT: %float.greater.loc9: init bool = call %Greater.ref.loc9(%.loc9_25, %.loc9_30) [template = constants.%.7] @@ -177,7 +177,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: !if.expr.result.loc9: // CHECK:STDOUT: %.loc9_14.3: type = block_arg !if.expr.result.loc9 [template = constants.%False] // CHECK:STDOUT: %false_.ref.loc10: False = name_ref false_, %false_ -// CHECK:STDOUT: %Greater.ref.loc10: Greater = name_ref Greater, file.%Greater.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Greater.ref.loc10: = name_ref Greater, file.%Greater.decl [template = constants.%Greater] // CHECK:STDOUT: %.loc10_25: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc10_30: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %float.greater.loc10: init bool = call %Greater.ref.loc10(%.loc10_25, %.loc10_30) [template = constants.%.7] @@ -196,7 +196,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: !if.expr.result.loc10: // CHECK:STDOUT: %.loc10_14.3: type = block_arg !if.expr.result.loc10 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc11: True = name_ref true_, %true_ -// CHECK:STDOUT: %Greater.ref.loc11: Greater = name_ref Greater, file.%Greater.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Greater.ref.loc11: = name_ref Greater, file.%Greater.decl [template = constants.%Greater] // CHECK:STDOUT: %.loc11_24: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc11_29: f64 = float_literal 0 [template = constants.%.8] // CHECK:STDOUT: %float.greater.loc11: init bool = call %Greater.ref.loc11(%.loc11_24, %.loc11_29) [template = constants.%.9] @@ -215,8 +215,8 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: !if.expr.result.loc11: // CHECK:STDOUT: %.loc11_13.3: type = block_arg !if.expr.result.loc11 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc12: False = name_ref false_, %false_ -// CHECK:STDOUT: %Greater.ref.loc12: Greater = name_ref Greater, file.%Greater.decl [template = constants.%struct.3] -// CHECK:STDOUT: %Negate.ref.loc12: Negate = name_ref Negate, file.%Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Greater.ref.loc12: = name_ref Greater, file.%Greater.decl [template = constants.%Greater] +// CHECK:STDOUT: %Negate.ref.loc12: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_32: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %float.negate.loc12: init f64 = call %Negate.ref.loc12(%.loc12_32) [template = constants.%.10] // CHECK:STDOUT: %.loc12_38: f64 = float_literal 0 [template = constants.%.8] @@ -238,9 +238,9 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: !if.expr.result.loc12: // CHECK:STDOUT: %.loc12_14.3: type = block_arg !if.expr.result.loc12 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc13: True = name_ref true_, %true_ -// CHECK:STDOUT: %Greater.ref.loc13: Greater = name_ref Greater, file.%Greater.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Greater.ref.loc13: = name_ref Greater, file.%Greater.decl [template = constants.%Greater] // CHECK:STDOUT: %.loc13_24: f64 = float_literal 0 [template = constants.%.8] -// CHECK:STDOUT: %Negate.ref.loc13: Negate = name_ref Negate, file.%Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Negate.ref.loc13: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc13_36: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %float.negate.loc13: init f64 = call %Negate.ref.loc13(%.loc13_36) [template = constants.%.10] // CHECK:STDOUT: %.loc13_23.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.10] @@ -265,7 +265,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: f64, %b: f64) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Greater.ref: Greater = name_ref Greater, file.%Greater.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Greater.ref: = name_ref Greater, file.%Greater.decl [template = constants.%Greater] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %float.greater: init bool = call %Greater.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/float/greater_eq.carbon b/toolchain/check/testdata/builtins/float/greater_eq.carbon index 82387eaa60b9..d46375c7d51c 100644 --- a/toolchain/check/testdata/builtins/float/greater_eq.carbon +++ b/toolchain/check/testdata/builtins/float/greater_eq.carbon @@ -32,20 +32,20 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Float = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.2: Bool = struct_value () [template] -// CHECK:STDOUT: %GreaterEq: type = fn_type @GreaterEq [template] -// CHECK:STDOUT: %struct.3: GreaterEq = struct_value () [template] -// CHECK:STDOUT: %Negate: type = fn_type @Negate [template] -// CHECK:STDOUT: %struct.4: Negate = struct_value () [template] +// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %GreaterEq.type: type = fn_type @GreaterEq [template] +// CHECK:STDOUT: %GreaterEq: = struct_value () [template] +// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] +// CHECK:STDOUT: %Negate: = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] // CHECK:STDOUT: %.3: type = struct_type {} [template] // CHECK:STDOUT: %False: type = class_type @False [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.5: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.4: type = ptr_type {} [template] // CHECK:STDOUT: %.5: f64 = float_literal 1 [template] // CHECK:STDOUT: %.6: f64 = float_literal 2 [template] @@ -53,8 +53,8 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.8: bool = bool_literal true [template] // CHECK:STDOUT: %.9: f64 = float_literal 0 [template] // CHECK:STDOUT: %.10: f64 = float_literal -1 [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.6: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -68,45 +68,45 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %GreaterEq.decl: GreaterEq = fn_decl @GreaterEq [template = constants.%struct.3] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %GreaterEq.decl: = fn_decl @GreaterEq [template = constants.%GreaterEq] { // CHECK:STDOUT: %.loc2_17.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_17: init type = call constants.%struct.1(%.loc2_17.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_17: init type = call constants.%Float(%.loc2_17.1) [template = f64] // CHECK:STDOUT: %.loc2_17.2: type = value_of_initializer %float.make_type.loc2_17 [template = f64] // CHECK:STDOUT: %.loc2_17.3: type = converted %float.make_type.loc2_17, %.loc2_17.2 [template = f64] // CHECK:STDOUT: %a.loc2_14.1: f64 = param a // CHECK:STDOUT: @GreaterEq.%a: f64 = bind_name a, %a.loc2_14.1 // CHECK:STDOUT: %.loc2_25.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_25: init type = call constants.%struct.1(%.loc2_25.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_25: init type = call constants.%Float(%.loc2_25.1) [template = f64] // CHECK:STDOUT: %.loc2_25.2: type = value_of_initializer %float.make_type.loc2_25 [template = f64] // CHECK:STDOUT: %.loc2_25.3: type = converted %float.make_type.loc2_25, %.loc2_25.2 [template = f64] // CHECK:STDOUT: %b.loc2_22.1: f64 = param b // CHECK:STDOUT: @GreaterEq.%b: f64 = bind_name b, %b.loc2_22.1 -// CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_33.1: type = value_of_initializer %bool.make_type.loc2 [template = bool] // CHECK:STDOUT: %.loc2_33.2: type = converted %bool.make_type.loc2, %.loc2_33.1 [template = bool] // CHECK:STDOUT: @GreaterEq.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Negate.decl: Negate = fn_decl @Negate [template = constants.%struct.4] { +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %.loc3_14.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%struct.1(%.loc3_14.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%.loc3_14.1) [template = f64] // CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %float.make_type.loc3_14 [template = f64] // CHECK:STDOUT: %.loc3_14.3: type = converted %float.make_type.loc3_14, %.loc3_14.2 [template = f64] // CHECK:STDOUT: %a.loc3_11.1: f64 = param a // CHECK:STDOUT: @Negate.%a: f64 = bind_name a, %a.loc3_11.1 // CHECK:STDOUT: %.loc3_22.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%struct.1(%.loc3_22.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%Float(%.loc3_22.1) [template = f64] // CHECK:STDOUT: %.loc3_22.2: type = value_of_initializer %float.make_type.loc3_22 [template = f64] // CHECK:STDOUT: %.loc3_22.3: type = converted %float.make_type.loc3_22, %.loc3_22.2 [template = f64] // CHECK:STDOUT: @Negate.%return: ref f64 = var // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: type = class_decl @True [template = constants.%True] {} // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.5] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] // CHECK:STDOUT: %true_.loc8_6.1: True = param true_ // CHECK:STDOUT: @F.%true_: True = bind_name true_, %true_.loc8_6.1 @@ -114,23 +114,23 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %false_.loc8_19.1: False = param false_ // CHECK:STDOUT: @F.%false_: False = bind_name false_, %false_.loc8_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.6] { +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %.loc16_19.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%struct.1(%.loc16_19.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%.loc16_19.1) [template = f64] // CHECK:STDOUT: %.loc16_19.2: type = value_of_initializer %float.make_type.loc16_19 [template = f64] // CHECK:STDOUT: %.loc16_19.3: type = converted %float.make_type.loc16_19, %.loc16_19.2 [template = f64] // CHECK:STDOUT: %a.loc16_16.1: f64 = param a // CHECK:STDOUT: @RuntimeCall.%a: f64 = bind_name a, %a.loc16_16.1 // CHECK:STDOUT: %.loc16_27.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%struct.1(%.loc16_27.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%.loc16_27.1) [template = f64] // CHECK:STDOUT: %.loc16_27.2: type = value_of_initializer %float.make_type.loc16_27 [template = f64] // CHECK:STDOUT: %.loc16_27.3: type = converted %float.make_type.loc16_27, %.loc16_27.2 [template = f64] // CHECK:STDOUT: %b.loc16_24.1: f64 = param b // CHECK:STDOUT: @RuntimeCall.%b: f64 = bind_name b, %b.loc16_24.1 -// CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type.loc16 [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type.loc16, %.loc16_35.1 [template = bool] // CHECK:STDOUT: @RuntimeCall.%return: ref bool = var @@ -158,7 +158,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: fn @F(%true_: True, %false_: False) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %false_.ref.loc9: False = name_ref false_, %false_ -// CHECK:STDOUT: %GreaterEq.ref.loc9: GreaterEq = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %GreaterEq.ref.loc9: = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] // CHECK:STDOUT: %.loc9_27: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc9_32: f64 = float_literal 2 [template = constants.%.6] // CHECK:STDOUT: %float.greater_eq.loc9: init bool = call %GreaterEq.ref.loc9(%.loc9_27, %.loc9_32) [template = constants.%.7] @@ -177,7 +177,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: !if.expr.result.loc9: // CHECK:STDOUT: %.loc9_14.3: type = block_arg !if.expr.result.loc9 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc10: True = name_ref true_, %true_ -// CHECK:STDOUT: %GreaterEq.ref.loc10: GreaterEq = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %GreaterEq.ref.loc10: = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] // CHECK:STDOUT: %.loc10_26: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc10_31: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %float.greater_eq.loc10: init bool = call %GreaterEq.ref.loc10(%.loc10_26, %.loc10_31) [template = constants.%.8] @@ -196,7 +196,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: !if.expr.result.loc10: // CHECK:STDOUT: %.loc10_13.3: type = block_arg !if.expr.result.loc10 [template = constants.%True] // CHECK:STDOUT: %true_.ref.loc11: True = name_ref true_, %true_ -// CHECK:STDOUT: %GreaterEq.ref.loc11: GreaterEq = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %GreaterEq.ref.loc11: = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] // CHECK:STDOUT: %.loc11_26: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc11_31: f64 = float_literal 0 [template = constants.%.9] // CHECK:STDOUT: %float.greater_eq.loc11: init bool = call %GreaterEq.ref.loc11(%.loc11_26, %.loc11_31) [template = constants.%.8] @@ -215,8 +215,8 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: !if.expr.result.loc11: // CHECK:STDOUT: %.loc11_13.3: type = block_arg !if.expr.result.loc11 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc12: False = name_ref false_, %false_ -// CHECK:STDOUT: %GreaterEq.ref.loc12: GreaterEq = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%struct.3] -// CHECK:STDOUT: %Negate.ref.loc12: Negate = name_ref Negate, file.%Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %GreaterEq.ref.loc12: = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] +// CHECK:STDOUT: %Negate.ref.loc12: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_34: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %float.negate.loc12: init f64 = call %Negate.ref.loc12(%.loc12_34) [template = constants.%.10] // CHECK:STDOUT: %.loc12_40: f64 = float_literal 0 [template = constants.%.9] @@ -238,9 +238,9 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: !if.expr.result.loc12: // CHECK:STDOUT: %.loc12_14.3: type = block_arg !if.expr.result.loc12 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc13: True = name_ref true_, %true_ -// CHECK:STDOUT: %GreaterEq.ref.loc13: GreaterEq = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %GreaterEq.ref.loc13: = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] // CHECK:STDOUT: %.loc13_26: f64 = float_literal 0 [template = constants.%.9] -// CHECK:STDOUT: %Negate.ref.loc13: Negate = name_ref Negate, file.%Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Negate.ref.loc13: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc13_38: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %float.negate.loc13: init f64 = call %Negate.ref.loc13(%.loc13_38) [template = constants.%.10] // CHECK:STDOUT: %.loc13_25.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.10] @@ -265,7 +265,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: f64, %b: f64) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %GreaterEq.ref: GreaterEq = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %GreaterEq.ref: = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %float.greater_eq: init bool = call %GreaterEq.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/float/less.carbon b/toolchain/check/testdata/builtins/float/less.carbon index 277aaffe6b77..65adea7f27ec 100644 --- a/toolchain/check/testdata/builtins/float/less.carbon +++ b/toolchain/check/testdata/builtins/float/less.carbon @@ -32,20 +32,20 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Float = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.2: Bool = struct_value () [template] -// CHECK:STDOUT: %Less: type = fn_type @Less [template] -// CHECK:STDOUT: %struct.3: Less = struct_value () [template] -// CHECK:STDOUT: %Negate: type = fn_type @Negate [template] -// CHECK:STDOUT: %struct.4: Negate = struct_value () [template] +// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Less.type: type = fn_type @Less [template] +// CHECK:STDOUT: %Less: = struct_value () [template] +// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] +// CHECK:STDOUT: %Negate: = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] // CHECK:STDOUT: %.3: type = struct_type {} [template] // CHECK:STDOUT: %False: type = class_type @False [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.5: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.4: type = ptr_type {} [template] // CHECK:STDOUT: %.5: f64 = float_literal 1 [template] // CHECK:STDOUT: %.6: f64 = float_literal 2 [template] @@ -53,8 +53,8 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.8: bool = bool_literal false [template] // CHECK:STDOUT: %.9: f64 = float_literal 0 [template] // CHECK:STDOUT: %.10: f64 = float_literal -1 [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.6: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -68,45 +68,45 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %Less.decl: Less = fn_decl @Less [template = constants.%struct.3] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Less.decl: = fn_decl @Less [template = constants.%Less] { // CHECK:STDOUT: %.loc2_12.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_12: init type = call constants.%struct.1(%.loc2_12.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_12: init type = call constants.%Float(%.loc2_12.1) [template = f64] // CHECK:STDOUT: %.loc2_12.2: type = value_of_initializer %float.make_type.loc2_12 [template = f64] // CHECK:STDOUT: %.loc2_12.3: type = converted %float.make_type.loc2_12, %.loc2_12.2 [template = f64] // CHECK:STDOUT: %a.loc2_9.1: f64 = param a // CHECK:STDOUT: @Less.%a: f64 = bind_name a, %a.loc2_9.1 // CHECK:STDOUT: %.loc2_20.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_20: init type = call constants.%struct.1(%.loc2_20.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_20: init type = call constants.%Float(%.loc2_20.1) [template = f64] // CHECK:STDOUT: %.loc2_20.2: type = value_of_initializer %float.make_type.loc2_20 [template = f64] // CHECK:STDOUT: %.loc2_20.3: type = converted %float.make_type.loc2_20, %.loc2_20.2 [template = f64] // CHECK:STDOUT: %b.loc2_17.1: f64 = param b // CHECK:STDOUT: @Less.%b: f64 = bind_name b, %b.loc2_17.1 -// CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_28.1: type = value_of_initializer %bool.make_type.loc2 [template = bool] // CHECK:STDOUT: %.loc2_28.2: type = converted %bool.make_type.loc2, %.loc2_28.1 [template = bool] // CHECK:STDOUT: @Less.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Negate.decl: Negate = fn_decl @Negate [template = constants.%struct.4] { +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %.loc3_14.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%struct.1(%.loc3_14.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%.loc3_14.1) [template = f64] // CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %float.make_type.loc3_14 [template = f64] // CHECK:STDOUT: %.loc3_14.3: type = converted %float.make_type.loc3_14, %.loc3_14.2 [template = f64] // CHECK:STDOUT: %a.loc3_11.1: f64 = param a // CHECK:STDOUT: @Negate.%a: f64 = bind_name a, %a.loc3_11.1 // CHECK:STDOUT: %.loc3_22.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%struct.1(%.loc3_22.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%Float(%.loc3_22.1) [template = f64] // CHECK:STDOUT: %.loc3_22.2: type = value_of_initializer %float.make_type.loc3_22 [template = f64] // CHECK:STDOUT: %.loc3_22.3: type = converted %float.make_type.loc3_22, %.loc3_22.2 [template = f64] // CHECK:STDOUT: @Negate.%return: ref f64 = var // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: type = class_decl @True [template = constants.%True] {} // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.5] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] // CHECK:STDOUT: %true_.loc8_6.1: True = param true_ // CHECK:STDOUT: @F.%true_: True = bind_name true_, %true_.loc8_6.1 @@ -114,23 +114,23 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %false_.loc8_19.1: False = param false_ // CHECK:STDOUT: @F.%false_: False = bind_name false_, %false_.loc8_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.6] { +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %.loc16_19.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%struct.1(%.loc16_19.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%.loc16_19.1) [template = f64] // CHECK:STDOUT: %.loc16_19.2: type = value_of_initializer %float.make_type.loc16_19 [template = f64] // CHECK:STDOUT: %.loc16_19.3: type = converted %float.make_type.loc16_19, %.loc16_19.2 [template = f64] // CHECK:STDOUT: %a.loc16_16.1: f64 = param a // CHECK:STDOUT: @RuntimeCall.%a: f64 = bind_name a, %a.loc16_16.1 // CHECK:STDOUT: %.loc16_27.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%struct.1(%.loc16_27.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%.loc16_27.1) [template = f64] // CHECK:STDOUT: %.loc16_27.2: type = value_of_initializer %float.make_type.loc16_27 [template = f64] // CHECK:STDOUT: %.loc16_27.3: type = converted %float.make_type.loc16_27, %.loc16_27.2 [template = f64] // CHECK:STDOUT: %b.loc16_24.1: f64 = param b // CHECK:STDOUT: @RuntimeCall.%b: f64 = bind_name b, %b.loc16_24.1 -// CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type.loc16 [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type.loc16, %.loc16_35.1 [template = bool] // CHECK:STDOUT: @RuntimeCall.%return: ref bool = var @@ -158,7 +158,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: fn @F(%true_: True, %false_: False) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true_.ref.loc9: True = name_ref true_, %true_ -// CHECK:STDOUT: %Less.ref.loc9: Less = name_ref Less, file.%Less.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Less.ref.loc9: = name_ref Less, file.%Less.decl [template = constants.%Less] // CHECK:STDOUT: %.loc9_21: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc9_26: f64 = float_literal 2 [template = constants.%.6] // CHECK:STDOUT: %float.less.loc9: init bool = call %Less.ref.loc9(%.loc9_21, %.loc9_26) [template = constants.%.7] @@ -177,7 +177,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: !if.expr.result.loc9: // CHECK:STDOUT: %.loc9_13.3: type = block_arg !if.expr.result.loc9 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc10: False = name_ref false_, %false_ -// CHECK:STDOUT: %Less.ref.loc10: Less = name_ref Less, file.%Less.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Less.ref.loc10: = name_ref Less, file.%Less.decl [template = constants.%Less] // CHECK:STDOUT: %.loc10_22: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc10_27: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %float.less.loc10: init bool = call %Less.ref.loc10(%.loc10_22, %.loc10_27) [template = constants.%.8] @@ -196,7 +196,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: !if.expr.result.loc10: // CHECK:STDOUT: %.loc10_14.3: type = block_arg !if.expr.result.loc10 [template = constants.%False] // CHECK:STDOUT: %false_.ref.loc11: False = name_ref false_, %false_ -// CHECK:STDOUT: %Less.ref.loc11: Less = name_ref Less, file.%Less.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Less.ref.loc11: = name_ref Less, file.%Less.decl [template = constants.%Less] // CHECK:STDOUT: %.loc11_22: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc11_27: f64 = float_literal 0 [template = constants.%.9] // CHECK:STDOUT: %float.less.loc11: init bool = call %Less.ref.loc11(%.loc11_22, %.loc11_27) [template = constants.%.8] @@ -215,8 +215,8 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: !if.expr.result.loc11: // CHECK:STDOUT: %.loc11_14.3: type = block_arg !if.expr.result.loc11 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc12: True = name_ref true_, %true_ -// CHECK:STDOUT: %Less.ref.loc12: Less = name_ref Less, file.%Less.decl [template = constants.%struct.3] -// CHECK:STDOUT: %Negate.ref.loc12: Negate = name_ref Negate, file.%Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Less.ref.loc12: = name_ref Less, file.%Less.decl [template = constants.%Less] +// CHECK:STDOUT: %Negate.ref.loc12: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_28: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %float.negate.loc12: init f64 = call %Negate.ref.loc12(%.loc12_28) [template = constants.%.10] // CHECK:STDOUT: %.loc12_34: f64 = float_literal 0 [template = constants.%.9] @@ -238,9 +238,9 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: !if.expr.result.loc12: // CHECK:STDOUT: %.loc12_13.3: type = block_arg !if.expr.result.loc12 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc13: False = name_ref false_, %false_ -// CHECK:STDOUT: %Less.ref.loc13: Less = name_ref Less, file.%Less.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Less.ref.loc13: = name_ref Less, file.%Less.decl [template = constants.%Less] // CHECK:STDOUT: %.loc13_22: f64 = float_literal 0 [template = constants.%.9] -// CHECK:STDOUT: %Negate.ref.loc13: Negate = name_ref Negate, file.%Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Negate.ref.loc13: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc13_34: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %float.negate.loc13: init f64 = call %Negate.ref.loc13(%.loc13_34) [template = constants.%.10] // CHECK:STDOUT: %.loc13_21.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.10] @@ -265,7 +265,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: f64, %b: f64) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Less.ref: Less = name_ref Less, file.%Less.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Less.ref: = name_ref Less, file.%Less.decl [template = constants.%Less] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %float.less: init bool = call %Less.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/float/less_eq.carbon b/toolchain/check/testdata/builtins/float/less_eq.carbon index 7b4fb21c0edc..d373448ed2c2 100644 --- a/toolchain/check/testdata/builtins/float/less_eq.carbon +++ b/toolchain/check/testdata/builtins/float/less_eq.carbon @@ -32,20 +32,20 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Float = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.2: Bool = struct_value () [template] -// CHECK:STDOUT: %LessEq: type = fn_type @LessEq [template] -// CHECK:STDOUT: %struct.3: LessEq = struct_value () [template] -// CHECK:STDOUT: %Negate: type = fn_type @Negate [template] -// CHECK:STDOUT: %struct.4: Negate = struct_value () [template] +// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %LessEq.type: type = fn_type @LessEq [template] +// CHECK:STDOUT: %LessEq: = struct_value () [template] +// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] +// CHECK:STDOUT: %Negate: = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] // CHECK:STDOUT: %.3: type = struct_type {} [template] // CHECK:STDOUT: %False: type = class_type @False [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.5: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.4: type = ptr_type {} [template] // CHECK:STDOUT: %.5: f64 = float_literal 1 [template] // CHECK:STDOUT: %.6: f64 = float_literal 2 [template] @@ -53,8 +53,8 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.8: f64 = float_literal 0 [template] // CHECK:STDOUT: %.9: bool = bool_literal false [template] // CHECK:STDOUT: %.10: f64 = float_literal -1 [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.6: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -68,45 +68,45 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %LessEq.decl: LessEq = fn_decl @LessEq [template = constants.%struct.3] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %LessEq.decl: = fn_decl @LessEq [template = constants.%LessEq] { // CHECK:STDOUT: %.loc2_14.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_14: init type = call constants.%struct.1(%.loc2_14.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_14: init type = call constants.%Float(%.loc2_14.1) [template = f64] // CHECK:STDOUT: %.loc2_14.2: type = value_of_initializer %float.make_type.loc2_14 [template = f64] // CHECK:STDOUT: %.loc2_14.3: type = converted %float.make_type.loc2_14, %.loc2_14.2 [template = f64] // CHECK:STDOUT: %a.loc2_11.1: f64 = param a // CHECK:STDOUT: @LessEq.%a: f64 = bind_name a, %a.loc2_11.1 // CHECK:STDOUT: %.loc2_22.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_22: init type = call constants.%struct.1(%.loc2_22.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_22: init type = call constants.%Float(%.loc2_22.1) [template = f64] // CHECK:STDOUT: %.loc2_22.2: type = value_of_initializer %float.make_type.loc2_22 [template = f64] // CHECK:STDOUT: %.loc2_22.3: type = converted %float.make_type.loc2_22, %.loc2_22.2 [template = f64] // CHECK:STDOUT: %b.loc2_19.1: f64 = param b // CHECK:STDOUT: @LessEq.%b: f64 = bind_name b, %b.loc2_19.1 -// CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_30.1: type = value_of_initializer %bool.make_type.loc2 [template = bool] // CHECK:STDOUT: %.loc2_30.2: type = converted %bool.make_type.loc2, %.loc2_30.1 [template = bool] // CHECK:STDOUT: @LessEq.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Negate.decl: Negate = fn_decl @Negate [template = constants.%struct.4] { +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %.loc3_14.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%struct.1(%.loc3_14.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%.loc3_14.1) [template = f64] // CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %float.make_type.loc3_14 [template = f64] // CHECK:STDOUT: %.loc3_14.3: type = converted %float.make_type.loc3_14, %.loc3_14.2 [template = f64] // CHECK:STDOUT: %a.loc3_11.1: f64 = param a // CHECK:STDOUT: @Negate.%a: f64 = bind_name a, %a.loc3_11.1 // CHECK:STDOUT: %.loc3_22.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%struct.1(%.loc3_22.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%Float(%.loc3_22.1) [template = f64] // CHECK:STDOUT: %.loc3_22.2: type = value_of_initializer %float.make_type.loc3_22 [template = f64] // CHECK:STDOUT: %.loc3_22.3: type = converted %float.make_type.loc3_22, %.loc3_22.2 [template = f64] // CHECK:STDOUT: @Negate.%return: ref f64 = var // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: type = class_decl @True [template = constants.%True] {} // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.5] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] // CHECK:STDOUT: %true_.loc8_6.1: True = param true_ // CHECK:STDOUT: @F.%true_: True = bind_name true_, %true_.loc8_6.1 @@ -114,23 +114,23 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %false_.loc8_19.1: False = param false_ // CHECK:STDOUT: @F.%false_: False = bind_name false_, %false_.loc8_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.6] { +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %.loc16_19.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%struct.1(%.loc16_19.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%.loc16_19.1) [template = f64] // CHECK:STDOUT: %.loc16_19.2: type = value_of_initializer %float.make_type.loc16_19 [template = f64] // CHECK:STDOUT: %.loc16_19.3: type = converted %float.make_type.loc16_19, %.loc16_19.2 [template = f64] // CHECK:STDOUT: %a.loc16_16.1: f64 = param a // CHECK:STDOUT: @RuntimeCall.%a: f64 = bind_name a, %a.loc16_16.1 // CHECK:STDOUT: %.loc16_27.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%struct.1(%.loc16_27.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%.loc16_27.1) [template = f64] // CHECK:STDOUT: %.loc16_27.2: type = value_of_initializer %float.make_type.loc16_27 [template = f64] // CHECK:STDOUT: %.loc16_27.3: type = converted %float.make_type.loc16_27, %.loc16_27.2 [template = f64] // CHECK:STDOUT: %b.loc16_24.1: f64 = param b // CHECK:STDOUT: @RuntimeCall.%b: f64 = bind_name b, %b.loc16_24.1 -// CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type.loc16 [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type.loc16, %.loc16_35.1 [template = bool] // CHECK:STDOUT: @RuntimeCall.%return: ref bool = var @@ -158,7 +158,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: fn @F(%true_: True, %false_: False) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true_.ref.loc9: True = name_ref true_, %true_ -// CHECK:STDOUT: %LessEq.ref.loc9: LessEq = name_ref LessEq, file.%LessEq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %LessEq.ref.loc9: = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] // CHECK:STDOUT: %.loc9_23: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc9_28: f64 = float_literal 2 [template = constants.%.6] // CHECK:STDOUT: %float.less_eq.loc9: init bool = call %LessEq.ref.loc9(%.loc9_23, %.loc9_28) [template = constants.%.7] @@ -177,7 +177,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: !if.expr.result.loc9: // CHECK:STDOUT: %.loc9_13.3: type = block_arg !if.expr.result.loc9 [template = constants.%True] // CHECK:STDOUT: %true_.ref.loc10: True = name_ref true_, %true_ -// CHECK:STDOUT: %LessEq.ref.loc10: LessEq = name_ref LessEq, file.%LessEq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %LessEq.ref.loc10: = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] // CHECK:STDOUT: %.loc10_23: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc10_28: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %float.less_eq.loc10: init bool = call %LessEq.ref.loc10(%.loc10_23, %.loc10_28) [template = constants.%.7] @@ -196,7 +196,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: !if.expr.result.loc10: // CHECK:STDOUT: %.loc10_13.3: type = block_arg !if.expr.result.loc10 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc11: False = name_ref false_, %false_ -// CHECK:STDOUT: %LessEq.ref.loc11: LessEq = name_ref LessEq, file.%LessEq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %LessEq.ref.loc11: = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] // CHECK:STDOUT: %.loc11_24: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc11_29: f64 = float_literal 0 [template = constants.%.8] // CHECK:STDOUT: %float.less_eq.loc11: init bool = call %LessEq.ref.loc11(%.loc11_24, %.loc11_29) [template = constants.%.9] @@ -215,8 +215,8 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: !if.expr.result.loc11: // CHECK:STDOUT: %.loc11_14.3: type = block_arg !if.expr.result.loc11 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc12: True = name_ref true_, %true_ -// CHECK:STDOUT: %LessEq.ref.loc12: LessEq = name_ref LessEq, file.%LessEq.decl [template = constants.%struct.3] -// CHECK:STDOUT: %Negate.ref.loc12: Negate = name_ref Negate, file.%Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %LessEq.ref.loc12: = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] +// CHECK:STDOUT: %Negate.ref.loc12: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_30: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %float.negate.loc12: init f64 = call %Negate.ref.loc12(%.loc12_30) [template = constants.%.10] // CHECK:STDOUT: %.loc12_36: f64 = float_literal 0 [template = constants.%.8] @@ -238,9 +238,9 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: !if.expr.result.loc12: // CHECK:STDOUT: %.loc12_13.3: type = block_arg !if.expr.result.loc12 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc13: False = name_ref false_, %false_ -// CHECK:STDOUT: %LessEq.ref.loc13: LessEq = name_ref LessEq, file.%LessEq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %LessEq.ref.loc13: = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] // CHECK:STDOUT: %.loc13_24: f64 = float_literal 0 [template = constants.%.8] -// CHECK:STDOUT: %Negate.ref.loc13: Negate = name_ref Negate, file.%Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Negate.ref.loc13: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc13_36: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %float.negate.loc13: init f64 = call %Negate.ref.loc13(%.loc13_36) [template = constants.%.10] // CHECK:STDOUT: %.loc13_23.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.10] @@ -265,7 +265,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: f64, %b: f64) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %LessEq.ref: LessEq = name_ref LessEq, file.%LessEq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %LessEq.ref: = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %float.less_eq: init bool = call %LessEq.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/float/make_type.carbon b/toolchain/check/testdata/builtins/float/make_type.carbon index fbcf4713683a..935a29a6314e 100644 --- a/toolchain/check/testdata/builtins/float/make_type.carbon +++ b/toolchain/check/testdata/builtins/float/make_type.carbon @@ -47,11 +47,11 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: --- types.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] -// CHECK:STDOUT: %struct.2: Float = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] +// CHECK:STDOUT: %Float: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -60,9 +60,9 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: .Float = %Float.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Float.decl: Float = fn_decl @Float [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Float.decl: = fn_decl @Float [template = constants.%Float] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_16.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_16.2: type = converted %int.make_type_32, %.loc4_16.1 [template = i32] // CHECK:STDOUT: %size.loc4_10.1: i32 = param size @@ -78,15 +78,15 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: --- use_types.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Float: type = fn_type @Float [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Float = struct_value () [template] +// CHECK:STDOUT: %Float: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 64 [template] // CHECK:STDOUT: %.3: f64 = float_literal 0 [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %GetFloat: type = fn_type @GetFloat [template] -// CHECK:STDOUT: %struct.3: GetFloat = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %GetFloat.type: type = fn_type @GetFloat [template] +// CHECK:STDOUT: %GetFloat: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -96,18 +96,18 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: .f = %f // CHECK:STDOUT: .GetFloat = %GetFloat.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: Float = import_ref ir1, inst+14, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+14, loaded [template = constants.%Float] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Float.ref: Float = name_ref Float, %import_ref.1 [template = constants.%struct.1] +// CHECK:STDOUT: %Float.ref: = name_ref Float, %import_ref.1 [template = constants.%Float] // CHECK:STDOUT: %.loc6_14: i32 = int_literal 64 [template = constants.%.2] // CHECK:STDOUT: %float.make_type: init type = call %Float.ref(%.loc6_14) [template = f64] // CHECK:STDOUT: %.loc6_16.1: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc6_16.2: type = converted %float.make_type, %.loc6_16.1 [template = f64] // CHECK:STDOUT: %f.var: ref f64 = var f // CHECK:STDOUT: %f: ref f64 = bind_name f, %f.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %GetFloat.decl: GetFloat = fn_decl @GetFloat [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %GetFloat.decl: = fn_decl @GetFloat [template = constants.%GetFloat] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_23.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc8_23.2: type = converted %int.make_type_32, %.loc8_23.1 [template = i32] // CHECK:STDOUT: %dyn_size.loc8_13.1: i32 = param dyn_size @@ -122,7 +122,7 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: // CHECK:STDOUT: fn @GetFloat(%dyn_size: i32) -> type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Float.ref: Float = name_ref Float, file.%import_ref.1 [template = constants.%struct.1] +// CHECK:STDOUT: %Float.ref: = name_ref Float, file.%import_ref.1 [template = constants.%Float] // CHECK:STDOUT: %dyn_size.ref: i32 = name_ref dyn_size, %dyn_size // CHECK:STDOUT: %float.make_type: init type = call %Float.ref(%dyn_size.ref) // CHECK:STDOUT: %.loc9_25.1: type = value_of_initializer %float.make_type @@ -140,12 +140,12 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: --- fail_invalid_size.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Float: type = fn_type @Float [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Float = struct_value () [template] +// CHECK:STDOUT: %Float: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 32 [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 64 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -157,22 +157,22 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: .dyn_size = %dyn_size // CHECK:STDOUT: .dyn = %dyn // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: Float = import_ref ir1, inst+14, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+14, loaded [template = constants.%Float] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Float.ref.loc10: Float = name_ref Float, %import_ref.1 [template = constants.%struct.1] +// CHECK:STDOUT: %Float.ref.loc10: = name_ref Float, %import_ref.1 [template = constants.%Float] // CHECK:STDOUT: %.loc10_26: i32 = int_literal 32 [template = constants.%.2] // CHECK:STDOUT: %float.make_type.loc10: init type = call %Float.ref.loc10(%.loc10_26) [template = ] // CHECK:STDOUT: %.loc10_28.1: type = value_of_initializer %float.make_type.loc10 [template = ] // CHECK:STDOUT: %.loc10_28.2: type = converted %float.make_type.loc10, %.loc10_28.1 [template = ] // CHECK:STDOUT: %invalid_float.var: ref = var invalid_float // CHECK:STDOUT: %invalid_float: ref = bind_name invalid_float, %invalid_float.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_15.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_15.2: type = converted %int.make_type_32, %.loc12_15.1 [template = i32] // CHECK:STDOUT: %dyn_size.var: ref i32 = var dyn_size // CHECK:STDOUT: %dyn_size: ref i32 = bind_name dyn_size, %dyn_size.var -// CHECK:STDOUT: %Float.ref.loc16: Float = name_ref Float, %import_ref.1 [template = constants.%struct.1] +// CHECK:STDOUT: %Float.ref.loc16: = name_ref Float, %import_ref.1 [template = constants.%Float] // CHECK:STDOUT: %dyn_size.ref: ref i32 = name_ref dyn_size, %dyn_size // CHECK:STDOUT: %.loc16_16: i32 = bind_value %dyn_size.ref // CHECK:STDOUT: %float.make_type.loc16: init type = call %Float.ref.loc16(%.loc16_16) diff --git a/toolchain/check/testdata/builtins/float/mul.carbon b/toolchain/check/testdata/builtins/float/mul.carbon index 015011f4a2a9..f014b47ee4bd 100644 --- a/toolchain/check/testdata/builtins/float/mul.carbon +++ b/toolchain/check/testdata/builtins/float/mul.carbon @@ -54,13 +54,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Float = struct_value () [template] -// CHECK:STDOUT: %Mul: type = fn_type @Mul [template] -// CHECK:STDOUT: %struct.2: Mul = struct_value () [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.3: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Mul.type: type = fn_type @Mul [template] +// CHECK:STDOUT: %Mul: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: %.3: f64 = float_literal 2 [template] // CHECK:STDOUT: %.4: f64 = float_literal 0.5 [template] // CHECK:STDOUT: %.5: f64 = float_literal 1 [template] @@ -74,53 +74,53 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Mul.decl: Mul = fn_decl @Mul [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %Mul.decl: = fn_decl @Mul [template = constants.%Mul] { // CHECK:STDOUT: %.loc2_11.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%struct.1(%.loc2_11.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%.loc2_11.1) [template = f64] // CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %float.make_type.loc2_11 [template = f64] // CHECK:STDOUT: %.loc2_11.3: type = converted %float.make_type.loc2_11, %.loc2_11.2 [template = f64] // CHECK:STDOUT: %a.loc2_8.1: f64 = param a // CHECK:STDOUT: @Mul.%a: f64 = bind_name a, %a.loc2_8.1 // CHECK:STDOUT: %.loc2_19.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%struct.1(%.loc2_19.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%.loc2_19.1) [template = f64] // CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %float.make_type.loc2_19 [template = f64] // CHECK:STDOUT: %.loc2_19.3: type = converted %float.make_type.loc2_19, %.loc2_19.2 [template = f64] // CHECK:STDOUT: %b.loc2_16.1: f64 = param b // CHECK:STDOUT: @Mul.%b: f64 = bind_name b, %b.loc2_16.1 // CHECK:STDOUT: %.loc2_27.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%struct.1(%.loc2_27.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%Float(%.loc2_27.1) [template = f64] // CHECK:STDOUT: %.loc2_27.2: type = value_of_initializer %float.make_type.loc2_27 [template = f64] // CHECK:STDOUT: %.loc2_27.3: type = converted %float.make_type.loc2_27, %.loc2_27.2 [template = f64] // CHECK:STDOUT: @Mul.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.3] { +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %.loc4_19.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%struct.1(%.loc4_19.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%.loc4_19.1) [template = f64] // CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %float.make_type.loc4_19 [template = f64] // CHECK:STDOUT: %.loc4_19.3: type = converted %float.make_type.loc4_19, %.loc4_19.2 [template = f64] // CHECK:STDOUT: %a.loc4_16.1: f64 = param a // CHECK:STDOUT: @RuntimeCall.%a: f64 = bind_name a, %a.loc4_16.1 // CHECK:STDOUT: %.loc4_27.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%struct.1(%.loc4_27.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%.loc4_27.1) [template = f64] // CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %float.make_type.loc4_27 [template = f64] // CHECK:STDOUT: %.loc4_27.3: type = converted %float.make_type.loc4_27, %.loc4_27.2 [template = f64] // CHECK:STDOUT: %b.loc4_24.1: f64 = param b // CHECK:STDOUT: @RuntimeCall.%b: f64 = bind_name b, %b.loc4_24.1 // CHECK:STDOUT: %.loc4_35.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%struct.1(%.loc4_35.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%.loc4_35.1) [template = f64] // CHECK:STDOUT: %.loc4_35.2: type = value_of_initializer %float.make_type.loc4_35 [template = f64] // CHECK:STDOUT: %.loc4_35.3: type = converted %float.make_type.loc4_35, %.loc4_35.2 [template = f64] // CHECK:STDOUT: @RuntimeCall.%return: ref f64 = var // CHECK:STDOUT: } // CHECK:STDOUT: %.loc8_8.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.7: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %float.make_type.loc8: init type = call constants.%struct.1(%.loc8_8.1) [template = f64] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %float.make_type.loc8: init type = call constants.%Float(%.loc8_8.1) [template = f64] // CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %float.make_type.loc8 [template = f64] // CHECK:STDOUT: %.loc8_8.3: type = converted %float.make_type.loc8, %.loc8_8.2 [template = f64] // CHECK:STDOUT: %x.var: ref f64 = var x @@ -133,7 +133,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: f64, %b: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mul.ref: Mul = name_ref Mul, file.%Mul.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Mul.ref: = name_ref Mul, file.%Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %float.mul: init f64 = call %Mul.ref(%a.ref, %b.ref) @@ -144,7 +144,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mul.ref: Mul = name_ref Mul, file.%Mul.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Mul.ref: = name_ref Mul, file.%Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %.loc8_18: f64 = float_literal 2 [template = constants.%.3] // CHECK:STDOUT: %.loc8_23: f64 = float_literal 0.5 [template = constants.%.4] // CHECK:STDOUT: %float.mul: init f64 = call %Mul.ref(%.loc8_18, %.loc8_23) [template = constants.%.5] @@ -156,25 +156,25 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Float = struct_value () [template] -// CHECK:STDOUT: %TooFew: type = fn_type @TooFew [template] -// CHECK:STDOUT: %struct.2: TooFew = struct_value () [template] -// CHECK:STDOUT: %TooMany: type = fn_type @TooMany [template] -// CHECK:STDOUT: %struct.3: TooMany = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.4: Bool = struct_value () [template] -// CHECK:STDOUT: %BadReturnType: type = fn_type @BadReturnType [template] -// CHECK:STDOUT: %struct.5: BadReturnType = struct_value () [template] -// CHECK:STDOUT: %JustRight: type = fn_type @JustRight [template] -// CHECK:STDOUT: %struct.6: JustRight = struct_value () [template] -// CHECK:STDOUT: %RuntimeCallTooFew: type = fn_type @RuntimeCallTooFew [template] -// CHECK:STDOUT: %struct.7: RuntimeCallTooFew = struct_value () [template] -// CHECK:STDOUT: %RuntimeCallTooMany: type = fn_type @RuntimeCallTooMany [template] -// CHECK:STDOUT: %struct.8: RuntimeCallTooMany = struct_value () [template] -// CHECK:STDOUT: %RuntimeCallBadReturnType: type = fn_type @RuntimeCallBadReturnType [template] -// CHECK:STDOUT: %struct.9: RuntimeCallBadReturnType = struct_value () [template] +// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] +// CHECK:STDOUT: %TooFew: = struct_value () [template] +// CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] +// CHECK:STDOUT: %TooMany: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %BadReturnType.type: type = fn_type @BadReturnType [template] +// CHECK:STDOUT: %BadReturnType: = struct_value () [template] +// CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] +// CHECK:STDOUT: %JustRight: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] +// CHECK:STDOUT: %RuntimeCallTooFew: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] +// CHECK:STDOUT: %RuntimeCallTooMany: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType.type: type = fn_type @RuntimeCallBadReturnType [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -189,154 +189,154 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: .RuntimeCallBadReturnType = %RuntimeCallBadReturnType.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TooFew.decl: TooFew = fn_decl @TooFew [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %TooFew.decl: = fn_decl @TooFew [template = constants.%TooFew] { // CHECK:STDOUT: %.loc8_14.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%struct.1(%.loc8_14.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%.loc8_14.1) [template = f64] // CHECK:STDOUT: %.loc8_14.2: type = value_of_initializer %float.make_type.loc8_14 [template = f64] // CHECK:STDOUT: %.loc8_14.3: type = converted %float.make_type.loc8_14, %.loc8_14.2 [template = f64] // CHECK:STDOUT: %a.loc8_11.1: f64 = param a // CHECK:STDOUT: @TooFew.%a: f64 = bind_name a, %a.loc8_11.1 // CHECK:STDOUT: %.loc8_22.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%struct.1(%.loc8_22.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%Float(%.loc8_22.1) [template = f64] // CHECK:STDOUT: %.loc8_22.2: type = value_of_initializer %float.make_type.loc8_22 [template = f64] // CHECK:STDOUT: %.loc8_22.3: type = converted %float.make_type.loc8_22, %.loc8_22.2 [template = f64] // CHECK:STDOUT: @TooFew.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TooMany.decl: TooMany = fn_decl @TooMany [template = constants.%struct.3] { +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %TooMany.decl: = fn_decl @TooMany [template = constants.%TooMany] { // CHECK:STDOUT: %.loc13_15.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%struct.1(%.loc13_15.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%.loc13_15.1) [template = f64] // CHECK:STDOUT: %.loc13_15.2: type = value_of_initializer %float.make_type.loc13_15 [template = f64] // CHECK:STDOUT: %.loc13_15.3: type = converted %float.make_type.loc13_15, %.loc13_15.2 [template = f64] // CHECK:STDOUT: %a.loc13_12.1: f64 = param a // CHECK:STDOUT: @TooMany.%a: f64 = bind_name a, %a.loc13_12.1 // CHECK:STDOUT: %.loc13_23.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%struct.1(%.loc13_23.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%.loc13_23.1) [template = f64] // CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %float.make_type.loc13_23 [template = f64] // CHECK:STDOUT: %.loc13_23.3: type = converted %float.make_type.loc13_23, %.loc13_23.2 [template = f64] // CHECK:STDOUT: %b.loc13_20.1: f64 = param b // CHECK:STDOUT: @TooMany.%b: f64 = bind_name b, %b.loc13_20.1 // CHECK:STDOUT: %.loc13_31.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%struct.1(%.loc13_31.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%.loc13_31.1) [template = f64] // CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %float.make_type.loc13_31 [template = f64] // CHECK:STDOUT: %.loc13_31.3: type = converted %float.make_type.loc13_31, %.loc13_31.2 [template = f64] // CHECK:STDOUT: %c.loc13_28.1: f64 = param c // CHECK:STDOUT: @TooMany.%c: f64 = bind_name c, %c.loc13_28.1 // CHECK:STDOUT: %.loc13_39.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%struct.1(%.loc13_39.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%Float(%.loc13_39.1) [template = f64] // CHECK:STDOUT: %.loc13_39.2: type = value_of_initializer %float.make_type.loc13_39 [template = f64] // CHECK:STDOUT: %.loc13_39.3: type = converted %float.make_type.loc13_39, %.loc13_39.2 [template = f64] // CHECK:STDOUT: @TooMany.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.9: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %BadReturnType.decl: BadReturnType = fn_decl @BadReturnType [template = constants.%struct.5] { +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.9: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %BadReturnType.decl: = fn_decl @BadReturnType [template = constants.%BadReturnType] { // CHECK:STDOUT: %.loc17_21.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%struct.1(%.loc17_21.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%.loc17_21.1) [template = f64] // CHECK:STDOUT: %.loc17_21.2: type = value_of_initializer %float.make_type.loc17_21 [template = f64] // CHECK:STDOUT: %.loc17_21.3: type = converted %float.make_type.loc17_21, %.loc17_21.2 [template = f64] // CHECK:STDOUT: %a.loc17_18.1: f64 = param a // CHECK:STDOUT: @BadReturnType.%a: f64 = bind_name a, %a.loc17_18.1 // CHECK:STDOUT: %.loc17_29.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%struct.1(%.loc17_29.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%.loc17_29.1) [template = f64] // CHECK:STDOUT: %.loc17_29.2: type = value_of_initializer %float.make_type.loc17_29 [template = f64] // CHECK:STDOUT: %.loc17_29.3: type = converted %float.make_type.loc17_29, %.loc17_29.2 [template = f64] // CHECK:STDOUT: %b.loc17_26.1: f64 = param b // CHECK:STDOUT: @BadReturnType.%b: f64 = bind_name b, %b.loc17_26.1 -// CHECK:STDOUT: %bool.make_type.loc17: init type = call constants.%struct.4() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc17: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc17_37.1: type = value_of_initializer %bool.make_type.loc17 [template = bool] // CHECK:STDOUT: %.loc17_37.2: type = converted %bool.make_type.loc17, %.loc17_37.1 [template = bool] // CHECK:STDOUT: @BadReturnType.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.10: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.11: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.12: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %JustRight.decl: JustRight = fn_decl @JustRight [template = constants.%struct.6] { +// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %JustRight.decl: = fn_decl @JustRight [template = constants.%JustRight] { // CHECK:STDOUT: %.loc18_17.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%struct.1(%.loc18_17.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%.loc18_17.1) [template = f64] // CHECK:STDOUT: %.loc18_17.2: type = value_of_initializer %float.make_type.loc18_17 [template = f64] // CHECK:STDOUT: %.loc18_17.3: type = converted %float.make_type.loc18_17, %.loc18_17.2 [template = f64] // CHECK:STDOUT: %a.loc18_14.1: f64 = param a // CHECK:STDOUT: @JustRight.%a: f64 = bind_name a, %a.loc18_14.1 // CHECK:STDOUT: %.loc18_25.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%struct.1(%.loc18_25.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%.loc18_25.1) [template = f64] // CHECK:STDOUT: %.loc18_25.2: type = value_of_initializer %float.make_type.loc18_25 [template = f64] // CHECK:STDOUT: %.loc18_25.3: type = converted %float.make_type.loc18_25, %.loc18_25.2 [template = f64] // CHECK:STDOUT: %b.loc18_22.1: f64 = param b // CHECK:STDOUT: @JustRight.%b: f64 = bind_name b, %b.loc18_22.1 // CHECK:STDOUT: %.loc18_33.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%struct.1(%.loc18_33.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%Float(%.loc18_33.1) [template = f64] // CHECK:STDOUT: %.loc18_33.2: type = value_of_initializer %float.make_type.loc18_33 [template = f64] // CHECK:STDOUT: %.loc18_33.3: type = converted %float.make_type.loc18_33, %.loc18_33.2 [template = f64] // CHECK:STDOUT: @JustRight.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.13: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.14: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCallTooFew.decl: RuntimeCallTooFew = fn_decl @RuntimeCallTooFew [template = constants.%struct.7] { +// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.14: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCallTooFew.decl: = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { // CHECK:STDOUT: %.loc20_25.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%struct.1(%.loc20_25.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%.loc20_25.1) [template = f64] // CHECK:STDOUT: %.loc20_25.2: type = value_of_initializer %float.make_type.loc20_25 [template = f64] // CHECK:STDOUT: %.loc20_25.3: type = converted %float.make_type.loc20_25, %.loc20_25.2 [template = f64] // CHECK:STDOUT: %a.loc20_22.1: f64 = param a // CHECK:STDOUT: @RuntimeCallTooFew.%a: f64 = bind_name a, %a.loc20_22.1 // CHECK:STDOUT: %.loc20_33.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%struct.1(%.loc20_33.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%Float(%.loc20_33.1) [template = f64] // CHECK:STDOUT: %.loc20_33.2: type = value_of_initializer %float.make_type.loc20_33 [template = f64] // CHECK:STDOUT: %.loc20_33.3: type = converted %float.make_type.loc20_33, %.loc20_33.2 [template = f64] // CHECK:STDOUT: @RuntimeCallTooFew.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.15: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.16: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.17: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.18: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCallTooMany.decl: RuntimeCallTooMany = fn_decl @RuntimeCallTooMany [template = constants.%struct.8] { +// CHECK:STDOUT: %import_ref.15: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.16: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.17: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.18: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCallTooMany.decl: = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { // CHECK:STDOUT: %.loc24_26.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%struct.1(%.loc24_26.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%.loc24_26.1) [template = f64] // CHECK:STDOUT: %.loc24_26.2: type = value_of_initializer %float.make_type.loc24_26 [template = f64] // CHECK:STDOUT: %.loc24_26.3: type = converted %float.make_type.loc24_26, %.loc24_26.2 [template = f64] // CHECK:STDOUT: %a.loc24_23.1: f64 = param a // CHECK:STDOUT: @RuntimeCallTooMany.%a: f64 = bind_name a, %a.loc24_23.1 // CHECK:STDOUT: %.loc24_34.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%struct.1(%.loc24_34.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%.loc24_34.1) [template = f64] // CHECK:STDOUT: %.loc24_34.2: type = value_of_initializer %float.make_type.loc24_34 [template = f64] // CHECK:STDOUT: %.loc24_34.3: type = converted %float.make_type.loc24_34, %.loc24_34.2 [template = f64] // CHECK:STDOUT: %b.loc24_31.1: f64 = param b // CHECK:STDOUT: @RuntimeCallTooMany.%b: f64 = bind_name b, %b.loc24_31.1 // CHECK:STDOUT: %.loc24_42.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%struct.1(%.loc24_42.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%.loc24_42.1) [template = f64] // CHECK:STDOUT: %.loc24_42.2: type = value_of_initializer %float.make_type.loc24_42 [template = f64] // CHECK:STDOUT: %.loc24_42.3: type = converted %float.make_type.loc24_42, %.loc24_42.2 [template = f64] // CHECK:STDOUT: %c.loc24_39.1: f64 = param c // CHECK:STDOUT: @RuntimeCallTooMany.%c: f64 = bind_name c, %c.loc24_39.1 // CHECK:STDOUT: %.loc24_50.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%struct.1(%.loc24_50.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%Float(%.loc24_50.1) [template = f64] // CHECK:STDOUT: %.loc24_50.2: type = value_of_initializer %float.make_type.loc24_50 [template = f64] // CHECK:STDOUT: %.loc24_50.3: type = converted %float.make_type.loc24_50, %.loc24_50.2 [template = f64] // CHECK:STDOUT: @RuntimeCallTooMany.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.19: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.20: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.21: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: RuntimeCallBadReturnType = fn_decl @RuntimeCallBadReturnType [template = constants.%struct.9] { +// CHECK:STDOUT: %import_ref.19: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.20: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.21: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { // CHECK:STDOUT: %.loc28_32.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%struct.1(%.loc28_32.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%.loc28_32.1) [template = f64] // CHECK:STDOUT: %.loc28_32.2: type = value_of_initializer %float.make_type.loc28_32 [template = f64] // CHECK:STDOUT: %.loc28_32.3: type = converted %float.make_type.loc28_32, %.loc28_32.2 [template = f64] // CHECK:STDOUT: %a.loc28_29.1: f64 = param a // CHECK:STDOUT: @RuntimeCallBadReturnType.%a: f64 = bind_name a, %a.loc28_29.1 // CHECK:STDOUT: %.loc28_40.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%struct.1(%.loc28_40.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%.loc28_40.1) [template = f64] // CHECK:STDOUT: %.loc28_40.2: type = value_of_initializer %float.make_type.loc28_40 [template = f64] // CHECK:STDOUT: %.loc28_40.3: type = converted %float.make_type.loc28_40, %.loc28_40.2 [template = f64] // CHECK:STDOUT: %b.loc28_37.1: f64 = param b // CHECK:STDOUT: @RuntimeCallBadReturnType.%b: f64 = bind_name b, %b.loc28_37.1 -// CHECK:STDOUT: %bool.make_type.loc28: init type = call constants.%struct.4() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc28: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc28_48.1: type = value_of_initializer %bool.make_type.loc28 [template = bool] // CHECK:STDOUT: %.loc28_48.2: type = converted %bool.make_type.loc28, %.loc28_48.1 [template = bool] // CHECK:STDOUT: @RuntimeCallBadReturnType.%return: ref bool = var @@ -357,7 +357,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooFew(%a: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooFew.ref: TooFew = name_ref TooFew, file.%TooFew.decl [template = constants.%struct.2] +// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %TooFew.call: init f64 = call %TooFew.ref(%a.ref) // CHECK:STDOUT: %.loc21_19.1: f64 = value_of_initializer %TooFew.call @@ -367,7 +367,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooMany(%a: f64, %b: f64, %c: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooMany.ref: TooMany = name_ref TooMany, file.%TooMany.decl [template = constants.%struct.3] +// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %c.ref: f64 = name_ref c, %c @@ -379,7 +379,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallBadReturnType(%a: f64, %b: f64) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %BadReturnType.ref: BadReturnType = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%struct.5] +// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/float/negate.carbon b/toolchain/check/testdata/builtins/float/negate.carbon index 79ee46b767eb..fef69a1bdc83 100644 --- a/toolchain/check/testdata/builtins/float/negate.carbon +++ b/toolchain/check/testdata/builtins/float/negate.carbon @@ -75,13 +75,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Float = struct_value () [template] -// CHECK:STDOUT: %Negate: type = fn_type @Negate [template] -// CHECK:STDOUT: %struct.2: Negate = struct_value () [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.3: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] +// CHECK:STDOUT: %Negate: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: %.3: f64 = float_literal 1.5 [template] // CHECK:STDOUT: %.4: f64 = float_literal -1.5 [template] // CHECK:STDOUT: } @@ -93,49 +93,49 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Negate.decl: Negate = fn_decl @Negate [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { // CHECK:STDOUT: %.loc2_14.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_14: init type = call constants.%struct.1(%.loc2_14.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_14: init type = call constants.%Float(%.loc2_14.1) [template = f64] // CHECK:STDOUT: %.loc2_14.2: type = value_of_initializer %float.make_type.loc2_14 [template = f64] // CHECK:STDOUT: %.loc2_14.3: type = converted %float.make_type.loc2_14, %.loc2_14.2 [template = f64] // CHECK:STDOUT: %a.loc2_11.1: f64 = param a // CHECK:STDOUT: @Negate.%a: f64 = bind_name a, %a.loc2_11.1 // CHECK:STDOUT: %.loc2_22.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_22: init type = call constants.%struct.1(%.loc2_22.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_22: init type = call constants.%Float(%.loc2_22.1) [template = f64] // CHECK:STDOUT: %.loc2_22.2: type = value_of_initializer %float.make_type.loc2_22 [template = f64] // CHECK:STDOUT: %.loc2_22.3: type = converted %float.make_type.loc2_22, %.loc2_22.2 [template = f64] // CHECK:STDOUT: @Negate.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.3] { +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %.loc4_19.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%struct.1(%.loc4_19.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%.loc4_19.1) [template = f64] // CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %float.make_type.loc4_19 [template = f64] // CHECK:STDOUT: %.loc4_19.3: type = converted %float.make_type.loc4_19, %.loc4_19.2 [template = f64] // CHECK:STDOUT: %a.loc4_16.1: f64 = param a // CHECK:STDOUT: @RuntimeCall.%a: f64 = bind_name a, %a.loc4_16.1 // CHECK:STDOUT: %.loc4_27.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%struct.1(%.loc4_27.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%.loc4_27.1) [template = f64] // CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %float.make_type.loc4_27 [template = f64] // CHECK:STDOUT: %.loc4_27.3: type = converted %float.make_type.loc4_27, %.loc4_27.2 [template = f64] // CHECK:STDOUT: %b.loc4_24.1: f64 = param b // CHECK:STDOUT: @RuntimeCall.%b: f64 = bind_name b, %b.loc4_24.1 // CHECK:STDOUT: %.loc4_35.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%struct.1(%.loc4_35.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%.loc4_35.1) [template = f64] // CHECK:STDOUT: %.loc4_35.2: type = value_of_initializer %float.make_type.loc4_35 [template = f64] // CHECK:STDOUT: %.loc4_35.3: type = converted %float.make_type.loc4_35, %.loc4_35.2 [template = f64] // CHECK:STDOUT: @RuntimeCall.%return: ref f64 = var // CHECK:STDOUT: } // CHECK:STDOUT: %.loc8_8.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.6: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %float.make_type.loc8: init type = call constants.%struct.1(%.loc8_8.1) [template = f64] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %float.make_type.loc8: init type = call constants.%Float(%.loc8_8.1) [template = f64] // CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %float.make_type.loc8 [template = f64] // CHECK:STDOUT: %.loc8_8.3: type = converted %float.make_type.loc8, %.loc8_8.2 [template = f64] -// CHECK:STDOUT: %Negate.ref: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Negate.ref: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc8_21: f64 = float_literal 1.5 [template = constants.%.3] // CHECK:STDOUT: %float.negate: init f64 = call %Negate.ref(%.loc8_21) [template = constants.%.4] // CHECK:STDOUT: %.loc8_25.1: f64 = value_of_initializer %float.negate [template = constants.%.4] @@ -149,7 +149,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: f64, %b: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Negate.ref: Negate = name_ref Negate, file.%Negate.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Negate.ref: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %float.negate: init f64 = call %Negate.ref(%a.ref) // CHECK:STDOUT: %.loc5_19.1: f64 = value_of_initializer %float.negate @@ -161,25 +161,25 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Float = struct_value () [template] -// CHECK:STDOUT: %TooFew: type = fn_type @TooFew [template] -// CHECK:STDOUT: %struct.2: TooFew = struct_value () [template] -// CHECK:STDOUT: %TooMany: type = fn_type @TooMany [template] -// CHECK:STDOUT: %struct.3: TooMany = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.4: Bool = struct_value () [template] -// CHECK:STDOUT: %BadReturnType: type = fn_type @BadReturnType [template] -// CHECK:STDOUT: %struct.5: BadReturnType = struct_value () [template] -// CHECK:STDOUT: %JustRight: type = fn_type @JustRight [template] -// CHECK:STDOUT: %struct.6: JustRight = struct_value () [template] -// CHECK:STDOUT: %RuntimeCallTooFew: type = fn_type @RuntimeCallTooFew [template] -// CHECK:STDOUT: %struct.7: RuntimeCallTooFew = struct_value () [template] -// CHECK:STDOUT: %RuntimeCallTooMany: type = fn_type @RuntimeCallTooMany [template] -// CHECK:STDOUT: %struct.8: RuntimeCallTooMany = struct_value () [template] -// CHECK:STDOUT: %RuntimeCallBadReturnType: type = fn_type @RuntimeCallBadReturnType [template] -// CHECK:STDOUT: %struct.9: RuntimeCallBadReturnType = struct_value () [template] +// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] +// CHECK:STDOUT: %TooFew: = struct_value () [template] +// CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] +// CHECK:STDOUT: %TooMany: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %BadReturnType.type: type = fn_type @BadReturnType [template] +// CHECK:STDOUT: %BadReturnType: = struct_value () [template] +// CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] +// CHECK:STDOUT: %JustRight: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] +// CHECK:STDOUT: %RuntimeCallTooFew: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] +// CHECK:STDOUT: %RuntimeCallTooMany: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType.type: type = fn_type @RuntimeCallBadReturnType [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -194,126 +194,126 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: .RuntimeCallBadReturnType = %RuntimeCallBadReturnType.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TooFew.decl: TooFew = fn_decl @TooFew [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %TooFew.decl: = fn_decl @TooFew [template = constants.%TooFew] { // CHECK:STDOUT: %.loc8_16.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc8: init type = call constants.%struct.1(%.loc8_16.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc8: init type = call constants.%Float(%.loc8_16.1) [template = f64] // CHECK:STDOUT: %.loc8_16.2: type = value_of_initializer %float.make_type.loc8 [template = f64] // CHECK:STDOUT: %.loc8_16.3: type = converted %float.make_type.loc8, %.loc8_16.2 [template = f64] // CHECK:STDOUT: @TooFew.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TooMany.decl: TooMany = fn_decl @TooMany [template = constants.%struct.3] { +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %TooMany.decl: = fn_decl @TooMany [template = constants.%TooMany] { // CHECK:STDOUT: %.loc13_15.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%struct.1(%.loc13_15.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%.loc13_15.1) [template = f64] // CHECK:STDOUT: %.loc13_15.2: type = value_of_initializer %float.make_type.loc13_15 [template = f64] // CHECK:STDOUT: %.loc13_15.3: type = converted %float.make_type.loc13_15, %.loc13_15.2 [template = f64] // CHECK:STDOUT: %a.loc13_12.1: f64 = param a // CHECK:STDOUT: @TooMany.%a: f64 = bind_name a, %a.loc13_12.1 // CHECK:STDOUT: %.loc13_23.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%struct.1(%.loc13_23.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%.loc13_23.1) [template = f64] // CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %float.make_type.loc13_23 [template = f64] // CHECK:STDOUT: %.loc13_23.3: type = converted %float.make_type.loc13_23, %.loc13_23.2 [template = f64] // CHECK:STDOUT: %b.loc13_20.1: f64 = param b // CHECK:STDOUT: @TooMany.%b: f64 = bind_name b, %b.loc13_20.1 // CHECK:STDOUT: %.loc13_31.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%struct.1(%.loc13_31.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%.loc13_31.1) [template = f64] // CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %float.make_type.loc13_31 [template = f64] // CHECK:STDOUT: %.loc13_31.3: type = converted %float.make_type.loc13_31, %.loc13_31.2 [template = f64] // CHECK:STDOUT: @TooMany.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %BadReturnType.decl: BadReturnType = fn_decl @BadReturnType [template = constants.%struct.5] { +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.6: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %BadReturnType.decl: = fn_decl @BadReturnType [template = constants.%BadReturnType] { // CHECK:STDOUT: %.loc18_21.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc18: init type = call constants.%struct.1(%.loc18_21.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc18: init type = call constants.%Float(%.loc18_21.1) [template = f64] // CHECK:STDOUT: %.loc18_21.2: type = value_of_initializer %float.make_type.loc18 [template = f64] // CHECK:STDOUT: %.loc18_21.3: type = converted %float.make_type.loc18, %.loc18_21.2 [template = f64] // CHECK:STDOUT: %a.loc18_18.1: f64 = param a // CHECK:STDOUT: @BadReturnType.%a: f64 = bind_name a, %a.loc18_18.1 -// CHECK:STDOUT: %bool.make_type.loc18: init type = call constants.%struct.4() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc18: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_29.1: type = value_of_initializer %bool.make_type.loc18 [template = bool] // CHECK:STDOUT: %.loc18_29.2: type = converted %bool.make_type.loc18, %.loc18_29.1 [template = bool] // CHECK:STDOUT: @BadReturnType.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %JustRight.decl: JustRight = fn_decl @JustRight [template = constants.%struct.6] { +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %JustRight.decl: = fn_decl @JustRight [template = constants.%JustRight] { // CHECK:STDOUT: %.loc19_17.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc19_17: init type = call constants.%struct.1(%.loc19_17.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc19_17: init type = call constants.%Float(%.loc19_17.1) [template = f64] // CHECK:STDOUT: %.loc19_17.2: type = value_of_initializer %float.make_type.loc19_17 [template = f64] // CHECK:STDOUT: %.loc19_17.3: type = converted %float.make_type.loc19_17, %.loc19_17.2 [template = f64] // CHECK:STDOUT: %a.loc19_14.1: f64 = param a // CHECK:STDOUT: @JustRight.%a: f64 = bind_name a, %a.loc19_14.1 // CHECK:STDOUT: %.loc19_25.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc19_25: init type = call constants.%struct.1(%.loc19_25.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc19_25: init type = call constants.%Float(%.loc19_25.1) [template = f64] // CHECK:STDOUT: %.loc19_25.2: type = value_of_initializer %float.make_type.loc19_25 [template = f64] // CHECK:STDOUT: %.loc19_25.3: type = converted %float.make_type.loc19_25, %.loc19_25.2 [template = f64] // CHECK:STDOUT: @JustRight.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.10: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCallTooFew.decl: RuntimeCallTooFew = fn_decl @RuntimeCallTooFew [template = constants.%struct.7] { +// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCallTooFew.decl: = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { // CHECK:STDOUT: %.loc21_25.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc21_25: init type = call constants.%struct.1(%.loc21_25.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc21_25: init type = call constants.%Float(%.loc21_25.1) [template = f64] // CHECK:STDOUT: %.loc21_25.2: type = value_of_initializer %float.make_type.loc21_25 [template = f64] // CHECK:STDOUT: %.loc21_25.3: type = converted %float.make_type.loc21_25, %.loc21_25.2 [template = f64] // CHECK:STDOUT: %a.loc21_22.1: f64 = param a // CHECK:STDOUT: @RuntimeCallTooFew.%a: f64 = bind_name a, %a.loc21_22.1 // CHECK:STDOUT: %.loc21_33.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc21_33: init type = call constants.%struct.1(%.loc21_33.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc21_33: init type = call constants.%Float(%.loc21_33.1) [template = f64] // CHECK:STDOUT: %.loc21_33.2: type = value_of_initializer %float.make_type.loc21_33 [template = f64] // CHECK:STDOUT: %.loc21_33.3: type = converted %float.make_type.loc21_33, %.loc21_33.2 [template = f64] // CHECK:STDOUT: @RuntimeCallTooFew.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.11: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.12: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.13: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.14: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCallTooMany.decl: RuntimeCallTooMany = fn_decl @RuntimeCallTooMany [template = constants.%struct.8] { +// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.14: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCallTooMany.decl: = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { // CHECK:STDOUT: %.loc32_26.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc32_26: init type = call constants.%struct.1(%.loc32_26.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc32_26: init type = call constants.%Float(%.loc32_26.1) [template = f64] // CHECK:STDOUT: %.loc32_26.2: type = value_of_initializer %float.make_type.loc32_26 [template = f64] // CHECK:STDOUT: %.loc32_26.3: type = converted %float.make_type.loc32_26, %.loc32_26.2 [template = f64] // CHECK:STDOUT: %a.loc32_23.1: f64 = param a // CHECK:STDOUT: @RuntimeCallTooMany.%a: f64 = bind_name a, %a.loc32_23.1 // CHECK:STDOUT: %.loc32_34.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc32_34: init type = call constants.%struct.1(%.loc32_34.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc32_34: init type = call constants.%Float(%.loc32_34.1) [template = f64] // CHECK:STDOUT: %.loc32_34.2: type = value_of_initializer %float.make_type.loc32_34 [template = f64] // CHECK:STDOUT: %.loc32_34.3: type = converted %float.make_type.loc32_34, %.loc32_34.2 [template = f64] // CHECK:STDOUT: %b.loc32_31.1: f64 = param b // CHECK:STDOUT: @RuntimeCallTooMany.%b: f64 = bind_name b, %b.loc32_31.1 // CHECK:STDOUT: %.loc32_42.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc32_42: init type = call constants.%struct.1(%.loc32_42.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc32_42: init type = call constants.%Float(%.loc32_42.1) [template = f64] // CHECK:STDOUT: %.loc32_42.2: type = value_of_initializer %float.make_type.loc32_42 [template = f64] // CHECK:STDOUT: %.loc32_42.3: type = converted %float.make_type.loc32_42, %.loc32_42.2 [template = f64] // CHECK:STDOUT: %c.loc32_39.1: f64 = param c // CHECK:STDOUT: @RuntimeCallTooMany.%c: f64 = bind_name c, %c.loc32_39.1 // CHECK:STDOUT: %.loc32_50.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc32_50: init type = call constants.%struct.1(%.loc32_50.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc32_50: init type = call constants.%Float(%.loc32_50.1) [template = f64] // CHECK:STDOUT: %.loc32_50.2: type = value_of_initializer %float.make_type.loc32_50 [template = f64] // CHECK:STDOUT: %.loc32_50.3: type = converted %float.make_type.loc32_50, %.loc32_50.2 [template = f64] // CHECK:STDOUT: @RuntimeCallTooMany.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.15: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.16: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.17: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: RuntimeCallBadReturnType = fn_decl @RuntimeCallBadReturnType [template = constants.%struct.9] { +// CHECK:STDOUT: %import_ref.15: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.16: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.17: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { // CHECK:STDOUT: %.loc43_32.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc43_32: init type = call constants.%struct.1(%.loc43_32.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc43_32: init type = call constants.%Float(%.loc43_32.1) [template = f64] // CHECK:STDOUT: %.loc43_32.2: type = value_of_initializer %float.make_type.loc43_32 [template = f64] // CHECK:STDOUT: %.loc43_32.3: type = converted %float.make_type.loc43_32, %.loc43_32.2 [template = f64] // CHECK:STDOUT: %a.loc43_29.1: f64 = param a // CHECK:STDOUT: @RuntimeCallBadReturnType.%a: f64 = bind_name a, %a.loc43_29.1 // CHECK:STDOUT: %.loc43_40.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc43_40: init type = call constants.%struct.1(%.loc43_40.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc43_40: init type = call constants.%Float(%.loc43_40.1) [template = f64] // CHECK:STDOUT: %.loc43_40.2: type = value_of_initializer %float.make_type.loc43_40 [template = f64] // CHECK:STDOUT: %.loc43_40.3: type = converted %float.make_type.loc43_40, %.loc43_40.2 [template = f64] // CHECK:STDOUT: %b.loc43_37.1: f64 = param b // CHECK:STDOUT: @RuntimeCallBadReturnType.%b: f64 = bind_name b, %b.loc43_37.1 -// CHECK:STDOUT: %bool.make_type.loc43: init type = call constants.%struct.4() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc43: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc43_48.1: type = value_of_initializer %bool.make_type.loc43 [template = bool] // CHECK:STDOUT: %.loc43_48.2: type = converted %bool.make_type.loc43, %.loc43_48.1 [template = bool] // CHECK:STDOUT: @RuntimeCallBadReturnType.%return: ref bool = var @@ -334,7 +334,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooFew(%a: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooFew.ref: TooFew = name_ref TooFew, file.%TooFew.decl [template = constants.%struct.2] +// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %TooFew.call: init f64 = call %TooFew.ref() [template = ] // CHECK:STDOUT: %.loc29_19.1: f64 = value_of_initializer %TooFew.call [template = ] @@ -344,7 +344,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooMany(%a: f64, %b: f64, %c: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooMany.ref: TooMany = name_ref TooMany, file.%TooMany.decl [template = constants.%struct.3] +// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %c.ref: f64 = name_ref c, %c @@ -356,7 +356,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallBadReturnType(%a: f64, %b: f64) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %BadReturnType.ref: BadReturnType = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%struct.5] +// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref() [template = ] diff --git a/toolchain/check/testdata/builtins/float/neq.carbon b/toolchain/check/testdata/builtins/float/neq.carbon index 34f1a689db1a..1ec6cd16f254 100644 --- a/toolchain/check/testdata/builtins/float/neq.carbon +++ b/toolchain/check/testdata/builtins/float/neq.carbon @@ -37,25 +37,25 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Float = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.2: Bool = struct_value () [template] -// CHECK:STDOUT: %Neq: type = fn_type @Neq [template] -// CHECK:STDOUT: %struct.3: Neq = struct_value () [template] +// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Neq.type: type = fn_type @Neq [template] +// CHECK:STDOUT: %Neq: = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] // CHECK:STDOUT: %.3: type = struct_type {} [template] // CHECK:STDOUT: %False: type = class_type @False [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.4: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.4: type = ptr_type {} [template] // CHECK:STDOUT: %.5: f64 = float_literal 1 [template] // CHECK:STDOUT: %.6: f64 = float_literal 2 [template] // CHECK:STDOUT: %.7: bool = bool_literal true [template] // CHECK:STDOUT: %.8: bool = bool_literal false [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.5: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -68,30 +68,30 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %Neq.decl: Neq = fn_decl @Neq [template = constants.%struct.3] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Neq.decl: = fn_decl @Neq [template = constants.%Neq] { // CHECK:STDOUT: %.loc2_11.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%struct.1(%.loc2_11.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%.loc2_11.1) [template = f64] // CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %float.make_type.loc2_11 [template = f64] // CHECK:STDOUT: %.loc2_11.3: type = converted %float.make_type.loc2_11, %.loc2_11.2 [template = f64] // CHECK:STDOUT: %a.loc2_8.1: f64 = param a // CHECK:STDOUT: @Neq.%a: f64 = bind_name a, %a.loc2_8.1 // CHECK:STDOUT: %.loc2_19.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%struct.1(%.loc2_19.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%.loc2_19.1) [template = f64] // CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %float.make_type.loc2_19 [template = f64] // CHECK:STDOUT: %.loc2_19.3: type = converted %float.make_type.loc2_19, %.loc2_19.2 [template = f64] // CHECK:STDOUT: %b.loc2_16.1: f64 = param b // CHECK:STDOUT: @Neq.%b: f64 = bind_name b, %b.loc2_16.1 -// CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %bool.make_type.loc2 [template = bool] // CHECK:STDOUT: %.loc2_27.2: type = converted %bool.make_type.loc2, %.loc2_27.1 [template = bool] // CHECK:STDOUT: @Neq.%return: ref bool = var // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: type = class_decl @True [template = constants.%True] {} // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.4] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] // CHECK:STDOUT: %true_.loc7_6.1: True = param true_ // CHECK:STDOUT: @F.%true_: True = bind_name true_, %true_.loc7_6.1 @@ -99,23 +99,23 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: %false_.loc7_19.1: False = param false_ // CHECK:STDOUT: @F.%false_: False = bind_name false_, %false_.loc7_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.5] { +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.6: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %.loc12_19.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc12_19: init type = call constants.%struct.1(%.loc12_19.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc12_19: init type = call constants.%Float(%.loc12_19.1) [template = f64] // CHECK:STDOUT: %.loc12_19.2: type = value_of_initializer %float.make_type.loc12_19 [template = f64] // CHECK:STDOUT: %.loc12_19.3: type = converted %float.make_type.loc12_19, %.loc12_19.2 [template = f64] // CHECK:STDOUT: %a.loc12_16.1: f64 = param a // CHECK:STDOUT: @RuntimeCall.%a: f64 = bind_name a, %a.loc12_16.1 // CHECK:STDOUT: %.loc12_27.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc12_27: init type = call constants.%struct.1(%.loc12_27.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc12_27: init type = call constants.%Float(%.loc12_27.1) [template = f64] // CHECK:STDOUT: %.loc12_27.2: type = value_of_initializer %float.make_type.loc12_27 [template = f64] // CHECK:STDOUT: %.loc12_27.3: type = converted %float.make_type.loc12_27, %.loc12_27.2 [template = f64] // CHECK:STDOUT: %b.loc12_24.1: f64 = param b // CHECK:STDOUT: @RuntimeCall.%b: f64 = bind_name b, %b.loc12_24.1 -// CHECK:STDOUT: %bool.make_type.loc12: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc12: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_35.1: type = value_of_initializer %bool.make_type.loc12 [template = bool] // CHECK:STDOUT: %.loc12_35.2: type = converted %bool.make_type.loc12, %.loc12_35.1 [template = bool] // CHECK:STDOUT: @RuntimeCall.%return: ref bool = var @@ -141,7 +141,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: fn @F(%true_: True, %false_: False) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true_.ref: True = name_ref true_, %true_ -// CHECK:STDOUT: %Neq.ref.loc8: Neq = name_ref Neq, file.%Neq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Neq.ref.loc8: = name_ref Neq, file.%Neq.decl [template = constants.%Neq] // CHECK:STDOUT: %.loc8_20: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc8_25: f64 = float_literal 2 [template = constants.%.6] // CHECK:STDOUT: %float.neq.loc8: init bool = call %Neq.ref.loc8(%.loc8_20, %.loc8_25) [template = constants.%.7] @@ -160,7 +160,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: !if.expr.result.loc8: // CHECK:STDOUT: %.loc8_13.3: type = block_arg !if.expr.result.loc8 [template = constants.%True] // CHECK:STDOUT: %false_.ref: False = name_ref false_, %false_ -// CHECK:STDOUT: %Neq.ref.loc9: Neq = name_ref Neq, file.%Neq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Neq.ref.loc9: = name_ref Neq, file.%Neq.decl [template = constants.%Neq] // CHECK:STDOUT: %.loc9_21: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc9_26: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %float.neq.loc9: init bool = call %Neq.ref.loc9(%.loc9_21, %.loc9_26) [template = constants.%.8] @@ -183,7 +183,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: f64, %b: f64) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Neq.ref: Neq = name_ref Neq, file.%Neq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Neq.ref: = name_ref Neq, file.%Neq.decl [template = constants.%Neq] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %float.neq: init bool = call %Neq.ref(%a.ref, %b.ref) @@ -196,11 +196,11 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Float = struct_value () [template] -// CHECK:STDOUT: %WrongResult: type = fn_type @WrongResult [template] -// CHECK:STDOUT: %struct.2: WrongResult = struct_value () [template] +// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %WrongResult.type: type = fn_type @WrongResult [template] +// CHECK:STDOUT: %WrongResult: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -209,24 +209,24 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: .WrongResult = %WrongResult.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %WrongResult.decl: WrongResult = fn_decl @WrongResult [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %WrongResult.decl: = fn_decl @WrongResult [template = constants.%WrongResult] { // CHECK:STDOUT: %.loc7_19.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc7_19: init type = call constants.%struct.1(%.loc7_19.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc7_19: init type = call constants.%Float(%.loc7_19.1) [template = f64] // CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %float.make_type.loc7_19 [template = f64] // CHECK:STDOUT: %.loc7_19.3: type = converted %float.make_type.loc7_19, %.loc7_19.2 [template = f64] // CHECK:STDOUT: %a.loc7_16.1: f64 = param a // CHECK:STDOUT: @WrongResult.%a: f64 = bind_name a, %a.loc7_16.1 // CHECK:STDOUT: %.loc7_27.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc7_27: init type = call constants.%struct.1(%.loc7_27.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc7_27: init type = call constants.%Float(%.loc7_27.1) [template = f64] // CHECK:STDOUT: %.loc7_27.2: type = value_of_initializer %float.make_type.loc7_27 [template = f64] // CHECK:STDOUT: %.loc7_27.3: type = converted %float.make_type.loc7_27, %.loc7_27.2 [template = f64] // CHECK:STDOUT: %b.loc7_24.1: f64 = param b // CHECK:STDOUT: @WrongResult.%b: f64 = bind_name b, %b.loc7_24.1 // CHECK:STDOUT: %.loc7_35.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc7_35: init type = call constants.%struct.1(%.loc7_35.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc7_35: init type = call constants.%Float(%.loc7_35.1) [template = f64] // CHECK:STDOUT: %.loc7_35.2: type = value_of_initializer %float.make_type.loc7_35 [template = f64] // CHECK:STDOUT: %.loc7_35.3: type = converted %float.make_type.loc7_35, %.loc7_35.2 [template = f64] // CHECK:STDOUT: @WrongResult.%return: ref f64 = var diff --git a/toolchain/check/testdata/builtins/float/sub.carbon b/toolchain/check/testdata/builtins/float/sub.carbon index 1b0e16f140a0..ae876c8d59a4 100644 --- a/toolchain/check/testdata/builtins/float/sub.carbon +++ b/toolchain/check/testdata/builtins/float/sub.carbon @@ -54,13 +54,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Float = struct_value () [template] -// CHECK:STDOUT: %Sub: type = fn_type @Sub [template] -// CHECK:STDOUT: %struct.2: Sub = struct_value () [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.3: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] +// CHECK:STDOUT: %Sub: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: %.3: f64 = float_literal 2 [template] // CHECK:STDOUT: %.4: f64 = float_literal 0.5 [template] // CHECK:STDOUT: %.5: f64 = float_literal 1.5 [template] @@ -74,53 +74,53 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Sub.decl: Sub = fn_decl @Sub [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %Sub.decl: = fn_decl @Sub [template = constants.%Sub] { // CHECK:STDOUT: %.loc2_11.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%struct.1(%.loc2_11.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%.loc2_11.1) [template = f64] // CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %float.make_type.loc2_11 [template = f64] // CHECK:STDOUT: %.loc2_11.3: type = converted %float.make_type.loc2_11, %.loc2_11.2 [template = f64] // CHECK:STDOUT: %a.loc2_8.1: f64 = param a // CHECK:STDOUT: @Sub.%a: f64 = bind_name a, %a.loc2_8.1 // CHECK:STDOUT: %.loc2_19.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%struct.1(%.loc2_19.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%.loc2_19.1) [template = f64] // CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %float.make_type.loc2_19 [template = f64] // CHECK:STDOUT: %.loc2_19.3: type = converted %float.make_type.loc2_19, %.loc2_19.2 [template = f64] // CHECK:STDOUT: %b.loc2_16.1: f64 = param b // CHECK:STDOUT: @Sub.%b: f64 = bind_name b, %b.loc2_16.1 // CHECK:STDOUT: %.loc2_27.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%struct.1(%.loc2_27.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%Float(%.loc2_27.1) [template = f64] // CHECK:STDOUT: %.loc2_27.2: type = value_of_initializer %float.make_type.loc2_27 [template = f64] // CHECK:STDOUT: %.loc2_27.3: type = converted %float.make_type.loc2_27, %.loc2_27.2 [template = f64] // CHECK:STDOUT: @Sub.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.3] { +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %.loc4_19.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%struct.1(%.loc4_19.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%.loc4_19.1) [template = f64] // CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %float.make_type.loc4_19 [template = f64] // CHECK:STDOUT: %.loc4_19.3: type = converted %float.make_type.loc4_19, %.loc4_19.2 [template = f64] // CHECK:STDOUT: %a.loc4_16.1: f64 = param a // CHECK:STDOUT: @RuntimeCall.%a: f64 = bind_name a, %a.loc4_16.1 // CHECK:STDOUT: %.loc4_27.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%struct.1(%.loc4_27.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%.loc4_27.1) [template = f64] // CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %float.make_type.loc4_27 [template = f64] // CHECK:STDOUT: %.loc4_27.3: type = converted %float.make_type.loc4_27, %.loc4_27.2 [template = f64] // CHECK:STDOUT: %b.loc4_24.1: f64 = param b // CHECK:STDOUT: @RuntimeCall.%b: f64 = bind_name b, %b.loc4_24.1 // CHECK:STDOUT: %.loc4_35.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%struct.1(%.loc4_35.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%.loc4_35.1) [template = f64] // CHECK:STDOUT: %.loc4_35.2: type = value_of_initializer %float.make_type.loc4_35 [template = f64] // CHECK:STDOUT: %.loc4_35.3: type = converted %float.make_type.loc4_35, %.loc4_35.2 [template = f64] // CHECK:STDOUT: @RuntimeCall.%return: ref f64 = var // CHECK:STDOUT: } // CHECK:STDOUT: %.loc8_8.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.7: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %float.make_type.loc8: init type = call constants.%struct.1(%.loc8_8.1) [template = f64] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %float.make_type.loc8: init type = call constants.%Float(%.loc8_8.1) [template = f64] // CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %float.make_type.loc8 [template = f64] // CHECK:STDOUT: %.loc8_8.3: type = converted %float.make_type.loc8, %.loc8_8.2 [template = f64] // CHECK:STDOUT: %x.var: ref f64 = var x @@ -133,7 +133,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: f64, %b: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Sub.ref: Sub = name_ref Sub, file.%Sub.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Sub.ref: = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %float.sub: init f64 = call %Sub.ref(%a.ref, %b.ref) @@ -144,7 +144,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Sub.ref: Sub = name_ref Sub, file.%Sub.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Sub.ref: = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %.loc8_18: f64 = float_literal 2 [template = constants.%.3] // CHECK:STDOUT: %.loc8_23: f64 = float_literal 0.5 [template = constants.%.4] // CHECK:STDOUT: %float.sub: init f64 = call %Sub.ref(%.loc8_18, %.loc8_23) [template = constants.%.5] @@ -156,25 +156,25 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Float = struct_value () [template] -// CHECK:STDOUT: %TooFew: type = fn_type @TooFew [template] -// CHECK:STDOUT: %struct.2: TooFew = struct_value () [template] -// CHECK:STDOUT: %TooMany: type = fn_type @TooMany [template] -// CHECK:STDOUT: %struct.3: TooMany = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.4: Bool = struct_value () [template] -// CHECK:STDOUT: %BadReturnType: type = fn_type @BadReturnType [template] -// CHECK:STDOUT: %struct.5: BadReturnType = struct_value () [template] -// CHECK:STDOUT: %JustRight: type = fn_type @JustRight [template] -// CHECK:STDOUT: %struct.6: JustRight = struct_value () [template] -// CHECK:STDOUT: %RuntimeCallTooFew: type = fn_type @RuntimeCallTooFew [template] -// CHECK:STDOUT: %struct.7: RuntimeCallTooFew = struct_value () [template] -// CHECK:STDOUT: %RuntimeCallTooMany: type = fn_type @RuntimeCallTooMany [template] -// CHECK:STDOUT: %struct.8: RuntimeCallTooMany = struct_value () [template] -// CHECK:STDOUT: %RuntimeCallBadReturnType: type = fn_type @RuntimeCallBadReturnType [template] -// CHECK:STDOUT: %struct.9: RuntimeCallBadReturnType = struct_value () [template] +// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] +// CHECK:STDOUT: %TooFew: = struct_value () [template] +// CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] +// CHECK:STDOUT: %TooMany: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %BadReturnType.type: type = fn_type @BadReturnType [template] +// CHECK:STDOUT: %BadReturnType: = struct_value () [template] +// CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] +// CHECK:STDOUT: %JustRight: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] +// CHECK:STDOUT: %RuntimeCallTooFew: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] +// CHECK:STDOUT: %RuntimeCallTooMany: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType.type: type = fn_type @RuntimeCallBadReturnType [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -189,154 +189,154 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: .RuntimeCallBadReturnType = %RuntimeCallBadReturnType.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TooFew.decl: TooFew = fn_decl @TooFew [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %TooFew.decl: = fn_decl @TooFew [template = constants.%TooFew] { // CHECK:STDOUT: %.loc8_14.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%struct.1(%.loc8_14.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%.loc8_14.1) [template = f64] // CHECK:STDOUT: %.loc8_14.2: type = value_of_initializer %float.make_type.loc8_14 [template = f64] // CHECK:STDOUT: %.loc8_14.3: type = converted %float.make_type.loc8_14, %.loc8_14.2 [template = f64] // CHECK:STDOUT: %a.loc8_11.1: f64 = param a // CHECK:STDOUT: @TooFew.%a: f64 = bind_name a, %a.loc8_11.1 // CHECK:STDOUT: %.loc8_22.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%struct.1(%.loc8_22.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%Float(%.loc8_22.1) [template = f64] // CHECK:STDOUT: %.loc8_22.2: type = value_of_initializer %float.make_type.loc8_22 [template = f64] // CHECK:STDOUT: %.loc8_22.3: type = converted %float.make_type.loc8_22, %.loc8_22.2 [template = f64] // CHECK:STDOUT: @TooFew.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TooMany.decl: TooMany = fn_decl @TooMany [template = constants.%struct.3] { +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %TooMany.decl: = fn_decl @TooMany [template = constants.%TooMany] { // CHECK:STDOUT: %.loc13_15.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%struct.1(%.loc13_15.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%.loc13_15.1) [template = f64] // CHECK:STDOUT: %.loc13_15.2: type = value_of_initializer %float.make_type.loc13_15 [template = f64] // CHECK:STDOUT: %.loc13_15.3: type = converted %float.make_type.loc13_15, %.loc13_15.2 [template = f64] // CHECK:STDOUT: %a.loc13_12.1: f64 = param a // CHECK:STDOUT: @TooMany.%a: f64 = bind_name a, %a.loc13_12.1 // CHECK:STDOUT: %.loc13_23.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%struct.1(%.loc13_23.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%.loc13_23.1) [template = f64] // CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %float.make_type.loc13_23 [template = f64] // CHECK:STDOUT: %.loc13_23.3: type = converted %float.make_type.loc13_23, %.loc13_23.2 [template = f64] // CHECK:STDOUT: %b.loc13_20.1: f64 = param b // CHECK:STDOUT: @TooMany.%b: f64 = bind_name b, %b.loc13_20.1 // CHECK:STDOUT: %.loc13_31.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%struct.1(%.loc13_31.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%.loc13_31.1) [template = f64] // CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %float.make_type.loc13_31 [template = f64] // CHECK:STDOUT: %.loc13_31.3: type = converted %float.make_type.loc13_31, %.loc13_31.2 [template = f64] // CHECK:STDOUT: %c.loc13_28.1: f64 = param c // CHECK:STDOUT: @TooMany.%c: f64 = bind_name c, %c.loc13_28.1 // CHECK:STDOUT: %.loc13_39.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%struct.1(%.loc13_39.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%Float(%.loc13_39.1) [template = f64] // CHECK:STDOUT: %.loc13_39.2: type = value_of_initializer %float.make_type.loc13_39 [template = f64] // CHECK:STDOUT: %.loc13_39.3: type = converted %float.make_type.loc13_39, %.loc13_39.2 [template = f64] // CHECK:STDOUT: @TooMany.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.9: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %BadReturnType.decl: BadReturnType = fn_decl @BadReturnType [template = constants.%struct.5] { +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.9: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %BadReturnType.decl: = fn_decl @BadReturnType [template = constants.%BadReturnType] { // CHECK:STDOUT: %.loc17_21.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%struct.1(%.loc17_21.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%.loc17_21.1) [template = f64] // CHECK:STDOUT: %.loc17_21.2: type = value_of_initializer %float.make_type.loc17_21 [template = f64] // CHECK:STDOUT: %.loc17_21.3: type = converted %float.make_type.loc17_21, %.loc17_21.2 [template = f64] // CHECK:STDOUT: %a.loc17_18.1: f64 = param a // CHECK:STDOUT: @BadReturnType.%a: f64 = bind_name a, %a.loc17_18.1 // CHECK:STDOUT: %.loc17_29.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%struct.1(%.loc17_29.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%.loc17_29.1) [template = f64] // CHECK:STDOUT: %.loc17_29.2: type = value_of_initializer %float.make_type.loc17_29 [template = f64] // CHECK:STDOUT: %.loc17_29.3: type = converted %float.make_type.loc17_29, %.loc17_29.2 [template = f64] // CHECK:STDOUT: %b.loc17_26.1: f64 = param b // CHECK:STDOUT: @BadReturnType.%b: f64 = bind_name b, %b.loc17_26.1 -// CHECK:STDOUT: %bool.make_type.loc17: init type = call constants.%struct.4() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc17: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc17_37.1: type = value_of_initializer %bool.make_type.loc17 [template = bool] // CHECK:STDOUT: %.loc17_37.2: type = converted %bool.make_type.loc17, %.loc17_37.1 [template = bool] // CHECK:STDOUT: @BadReturnType.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.10: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.11: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.12: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %JustRight.decl: JustRight = fn_decl @JustRight [template = constants.%struct.6] { +// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %JustRight.decl: = fn_decl @JustRight [template = constants.%JustRight] { // CHECK:STDOUT: %.loc18_17.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%struct.1(%.loc18_17.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%.loc18_17.1) [template = f64] // CHECK:STDOUT: %.loc18_17.2: type = value_of_initializer %float.make_type.loc18_17 [template = f64] // CHECK:STDOUT: %.loc18_17.3: type = converted %float.make_type.loc18_17, %.loc18_17.2 [template = f64] // CHECK:STDOUT: %a.loc18_14.1: f64 = param a // CHECK:STDOUT: @JustRight.%a: f64 = bind_name a, %a.loc18_14.1 // CHECK:STDOUT: %.loc18_25.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%struct.1(%.loc18_25.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%.loc18_25.1) [template = f64] // CHECK:STDOUT: %.loc18_25.2: type = value_of_initializer %float.make_type.loc18_25 [template = f64] // CHECK:STDOUT: %.loc18_25.3: type = converted %float.make_type.loc18_25, %.loc18_25.2 [template = f64] // CHECK:STDOUT: %b.loc18_22.1: f64 = param b // CHECK:STDOUT: @JustRight.%b: f64 = bind_name b, %b.loc18_22.1 // CHECK:STDOUT: %.loc18_33.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%struct.1(%.loc18_33.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%Float(%.loc18_33.1) [template = f64] // CHECK:STDOUT: %.loc18_33.2: type = value_of_initializer %float.make_type.loc18_33 [template = f64] // CHECK:STDOUT: %.loc18_33.3: type = converted %float.make_type.loc18_33, %.loc18_33.2 [template = f64] // CHECK:STDOUT: @JustRight.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.13: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.14: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCallTooFew.decl: RuntimeCallTooFew = fn_decl @RuntimeCallTooFew [template = constants.%struct.7] { +// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.14: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCallTooFew.decl: = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { // CHECK:STDOUT: %.loc20_25.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%struct.1(%.loc20_25.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%.loc20_25.1) [template = f64] // CHECK:STDOUT: %.loc20_25.2: type = value_of_initializer %float.make_type.loc20_25 [template = f64] // CHECK:STDOUT: %.loc20_25.3: type = converted %float.make_type.loc20_25, %.loc20_25.2 [template = f64] // CHECK:STDOUT: %a.loc20_22.1: f64 = param a // CHECK:STDOUT: @RuntimeCallTooFew.%a: f64 = bind_name a, %a.loc20_22.1 // CHECK:STDOUT: %.loc20_33.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%struct.1(%.loc20_33.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%Float(%.loc20_33.1) [template = f64] // CHECK:STDOUT: %.loc20_33.2: type = value_of_initializer %float.make_type.loc20_33 [template = f64] // CHECK:STDOUT: %.loc20_33.3: type = converted %float.make_type.loc20_33, %.loc20_33.2 [template = f64] // CHECK:STDOUT: @RuntimeCallTooFew.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.15: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.16: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.17: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.18: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCallTooMany.decl: RuntimeCallTooMany = fn_decl @RuntimeCallTooMany [template = constants.%struct.8] { +// CHECK:STDOUT: %import_ref.15: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.16: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.17: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.18: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %RuntimeCallTooMany.decl: = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { // CHECK:STDOUT: %.loc24_26.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%struct.1(%.loc24_26.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%.loc24_26.1) [template = f64] // CHECK:STDOUT: %.loc24_26.2: type = value_of_initializer %float.make_type.loc24_26 [template = f64] // CHECK:STDOUT: %.loc24_26.3: type = converted %float.make_type.loc24_26, %.loc24_26.2 [template = f64] // CHECK:STDOUT: %a.loc24_23.1: f64 = param a // CHECK:STDOUT: @RuntimeCallTooMany.%a: f64 = bind_name a, %a.loc24_23.1 // CHECK:STDOUT: %.loc24_34.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%struct.1(%.loc24_34.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%.loc24_34.1) [template = f64] // CHECK:STDOUT: %.loc24_34.2: type = value_of_initializer %float.make_type.loc24_34 [template = f64] // CHECK:STDOUT: %.loc24_34.3: type = converted %float.make_type.loc24_34, %.loc24_34.2 [template = f64] // CHECK:STDOUT: %b.loc24_31.1: f64 = param b // CHECK:STDOUT: @RuntimeCallTooMany.%b: f64 = bind_name b, %b.loc24_31.1 // CHECK:STDOUT: %.loc24_42.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%struct.1(%.loc24_42.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%.loc24_42.1) [template = f64] // CHECK:STDOUT: %.loc24_42.2: type = value_of_initializer %float.make_type.loc24_42 [template = f64] // CHECK:STDOUT: %.loc24_42.3: type = converted %float.make_type.loc24_42, %.loc24_42.2 [template = f64] // CHECK:STDOUT: %c.loc24_39.1: f64 = param c // CHECK:STDOUT: @RuntimeCallTooMany.%c: f64 = bind_name c, %c.loc24_39.1 // CHECK:STDOUT: %.loc24_50.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%struct.1(%.loc24_50.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%Float(%.loc24_50.1) [template = f64] // CHECK:STDOUT: %.loc24_50.2: type = value_of_initializer %float.make_type.loc24_50 [template = f64] // CHECK:STDOUT: %.loc24_50.3: type = converted %float.make_type.loc24_50, %.loc24_50.2 [template = f64] // CHECK:STDOUT: @RuntimeCallTooMany.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.19: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.20: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.21: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: RuntimeCallBadReturnType = fn_decl @RuntimeCallBadReturnType [template = constants.%struct.9] { +// CHECK:STDOUT: %import_ref.19: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.20: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.21: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { // CHECK:STDOUT: %.loc28_32.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%struct.1(%.loc28_32.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%.loc28_32.1) [template = f64] // CHECK:STDOUT: %.loc28_32.2: type = value_of_initializer %float.make_type.loc28_32 [template = f64] // CHECK:STDOUT: %.loc28_32.3: type = converted %float.make_type.loc28_32, %.loc28_32.2 [template = f64] // CHECK:STDOUT: %a.loc28_29.1: f64 = param a // CHECK:STDOUT: @RuntimeCallBadReturnType.%a: f64 = bind_name a, %a.loc28_29.1 // CHECK:STDOUT: %.loc28_40.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%struct.1(%.loc28_40.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%.loc28_40.1) [template = f64] // CHECK:STDOUT: %.loc28_40.2: type = value_of_initializer %float.make_type.loc28_40 [template = f64] // CHECK:STDOUT: %.loc28_40.3: type = converted %float.make_type.loc28_40, %.loc28_40.2 [template = f64] // CHECK:STDOUT: %b.loc28_37.1: f64 = param b // CHECK:STDOUT: @RuntimeCallBadReturnType.%b: f64 = bind_name b, %b.loc28_37.1 -// CHECK:STDOUT: %bool.make_type.loc28: init type = call constants.%struct.4() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc28: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc28_48.1: type = value_of_initializer %bool.make_type.loc28 [template = bool] // CHECK:STDOUT: %.loc28_48.2: type = converted %bool.make_type.loc28, %.loc28_48.1 [template = bool] // CHECK:STDOUT: @RuntimeCallBadReturnType.%return: ref bool = var @@ -357,7 +357,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooFew(%a: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooFew.ref: TooFew = name_ref TooFew, file.%TooFew.decl [template = constants.%struct.2] +// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %TooFew.call: init f64 = call %TooFew.ref(%a.ref) // CHECK:STDOUT: %.loc21_19.1: f64 = value_of_initializer %TooFew.call @@ -367,7 +367,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooMany(%a: f64, %b: f64, %c: f64) -> f64 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooMany.ref: TooMany = name_ref TooMany, file.%TooMany.decl [template = constants.%struct.3] +// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %c.ref: f64 = name_ref c, %c @@ -379,7 +379,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallBadReturnType(%a: f64, %b: f64) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %BadReturnType.ref: BadReturnType = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%struct.5] +// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/and.carbon b/toolchain/check/testdata/builtins/int/and.carbon index 4c37ec7c144f..3422f2fad451 100644 --- a/toolchain/check/testdata/builtins/int/and.carbon +++ b/toolchain/check/testdata/builtins/int/and.carbon @@ -22,18 +22,18 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: --- int_and.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %And: type = fn_type @And [template] -// CHECK:STDOUT: %struct.2: And = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %And.type: type = fn_type @And [template] +// CHECK:STDOUT: %And: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 12 [template] // CHECK:STDOUT: %.3: i32 = int_literal 10 [template] // CHECK:STDOUT: %.4: i32 = int_literal 8 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] // CHECK:STDOUT: %.6: type = ptr_type [i32; 8] [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.3: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -44,28 +44,28 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %And.decl: And = fn_decl @And [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %And.decl: = fn_decl @And [template = constants.%And] { +// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] // CHECK:STDOUT: %a.loc2_8.1: i32 = param a // CHECK:STDOUT: @And.%a: i32 = bind_name a, %a.loc2_8.1 -// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] // CHECK:STDOUT: %b.loc2_16.1: i32 = param b // CHECK:STDOUT: @And.%b: i32 = bind_name b, %b.loc2_16.1 -// CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_32.loc2_27 [template = i32] // CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_32.loc2_27, %.loc2_27.1 [template = i32] // CHECK:STDOUT: @And.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %And.ref: And = name_ref And, %And.decl [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %And.ref: = name_ref And, %And.decl [template = constants.%And] // CHECK:STDOUT: %.loc4_20: i32 = int_literal 12 [template = constants.%.2] // CHECK:STDOUT: %.loc4_24: i32 = int_literal 10 [template = constants.%.3] // CHECK:STDOUT: %int.and: init i32 = call %And.ref(%.loc4_20, %.loc4_24) [template = constants.%.4] @@ -74,8 +74,8 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %.loc4_27: type = array_type %int.and, i32 [template = constants.%.5] // CHECK:STDOUT: %arr.var: ref [i32; 8] = var arr // CHECK:STDOUT: %arr: ref [i32; 8] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 8 [template = constants.%.4] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] @@ -84,21 +84,21 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %arr.ref: ref [i32; 8] = name_ref arr, %arr // CHECK:STDOUT: %.loc5_24: [i32; 8]* = addr_of %arr.ref // CHECK:STDOUT: %arr_p: [i32; 8]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] // CHECK:STDOUT: %a.loc7_16.1: i32 = param a // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 -// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] // CHECK:STDOUT: %b.loc7_24.1: i32 = param b // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 -// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] // CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_32.loc7_35, %.loc7_35.1 [template = i32] // CHECK:STDOUT: @RuntimeCall.%return: ref i32 = var @@ -111,7 +111,7 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %And.ref: And = name_ref And, file.%And.decl [template = constants.%struct.2] +// CHECK:STDOUT: %And.ref: = name_ref And, file.%And.decl [template = constants.%And] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.and: init i32 = call %And.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/complement.carbon b/toolchain/check/testdata/builtins/int/complement.carbon index f0378d792fdb..8ca0e26980f4 100644 --- a/toolchain/check/testdata/builtins/int/complement.carbon +++ b/toolchain/check/testdata/builtins/int/complement.carbon @@ -23,21 +23,21 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: --- int_complement.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Complement: type = fn_type @Complement [template] -// CHECK:STDOUT: %struct.2: Complement = struct_value () [template] -// CHECK:STDOUT: %And: type = fn_type @And [template] -// CHECK:STDOUT: %struct.3: And = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Complement.type: type = fn_type @Complement [template] +// CHECK:STDOUT: %Complement: = struct_value () [template] +// CHECK:STDOUT: %And.type: type = fn_type @And [template] +// CHECK:STDOUT: %And: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1193046 [template] // CHECK:STDOUT: %.3: i32 = int_literal -1193047 [template] // CHECK:STDOUT: %.4: i32 = int_literal 16777215 [template] // CHECK:STDOUT: %.5: i32 = int_literal 15584169 [template] // CHECK:STDOUT: %.6: type = array_type %.5, i32 [template] // CHECK:STDOUT: %.7: type = ptr_type [i32; 15584169] [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.4: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -49,42 +49,42 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Complement.decl: Complement = fn_decl @Complement [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc2_18: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Complement.decl: = fn_decl @Complement [template = constants.%Complement] { +// CHECK:STDOUT: %int.make_type_32.loc2_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_18.1: type = value_of_initializer %int.make_type_32.loc2_18 [template = i32] // CHECK:STDOUT: %.loc2_18.2: type = converted %int.make_type_32.loc2_18, %.loc2_18.1 [template = i32] // CHECK:STDOUT: %a.loc2_15.1: i32 = param a // CHECK:STDOUT: @Complement.%a: i32 = bind_name a, %a.loc2_15.1 -// CHECK:STDOUT: %int.make_type_32.loc2_26: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_26.1: type = value_of_initializer %int.make_type_32.loc2_26 [template = i32] // CHECK:STDOUT: %.loc2_26.2: type = converted %int.make_type_32.loc2_26, %.loc2_26.1 [template = i32] // CHECK:STDOUT: @Complement.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %And.decl: And = fn_decl @And [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc3_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %And.decl: = fn_decl @And [template = constants.%And] { +// CHECK:STDOUT: %int.make_type_32.loc3_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_11.1: type = value_of_initializer %int.make_type_32.loc3_11 [template = i32] // CHECK:STDOUT: %.loc3_11.2: type = converted %int.make_type_32.loc3_11, %.loc3_11.1 [template = i32] // CHECK:STDOUT: %a.loc3_8.1: i32 = param a // CHECK:STDOUT: @And.%a: i32 = bind_name a, %a.loc3_8.1 -// CHECK:STDOUT: %int.make_type_32.loc3_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc3_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_19.1: type = value_of_initializer %int.make_type_32.loc3_19 [template = i32] // CHECK:STDOUT: %.loc3_19.2: type = converted %int.make_type_32.loc3_19, %.loc3_19.1 [template = i32] // CHECK:STDOUT: %b.loc3_16.1: i32 = param b // CHECK:STDOUT: @And.%b: i32 = bind_name b, %b.loc3_16.1 -// CHECK:STDOUT: %int.make_type_32.loc3_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc3_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_27.1: type = value_of_initializer %int.make_type_32.loc3_27 [template = i32] // CHECK:STDOUT: %.loc3_27.2: type = converted %int.make_type_32.loc3_27, %.loc3_27.1 [template = i32] // CHECK:STDOUT: @And.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %And.ref: And = name_ref And, %And.decl [template = constants.%struct.3] -// CHECK:STDOUT: %Complement.ref: Complement = name_ref Complement, %Complement.decl [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %And.ref: = name_ref And, %And.decl [template = constants.%And] +// CHECK:STDOUT: %Complement.ref: = name_ref Complement, %Complement.decl [template = constants.%Complement] // CHECK:STDOUT: %.loc5_31: i32 = int_literal 1193046 [template = constants.%.2] // CHECK:STDOUT: %int.complement: init i32 = call %Complement.ref(%.loc5_31) [template = constants.%.3] // CHECK:STDOUT: %.loc5_42: i32 = int_literal 16777215 [template = constants.%.4] @@ -96,8 +96,8 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: %.loc5_51: type = array_type %int.and, i32 [template = constants.%.6] // CHECK:STDOUT: %arr.var: ref [i32; 15584169] = var arr // CHECK:STDOUT: %arr: ref [i32; 15584169] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_18: i32 = int_literal 15584169 [template = constants.%.5] // CHECK:STDOUT: %.loc6_13.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_13.2: type = converted %int.make_type_32.loc6, %.loc6_13.1 [template = i32] @@ -106,15 +106,15 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: %arr.ref: ref [i32; 15584169] = name_ref arr, %arr // CHECK:STDOUT: %.loc6_31: [i32; 15584169]* = addr_of %arr.ref // CHECK:STDOUT: %arr_p: [i32; 15584169]* = bind_name arr_p, %.loc6_31 -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.9: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32.loc8_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %int.make_type_32.loc8_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_19.1: type = value_of_initializer %int.make_type_32.loc8_19 [template = i32] // CHECK:STDOUT: %.loc8_19.2: type = converted %int.make_type_32.loc8_19, %.loc8_19.1 [template = i32] // CHECK:STDOUT: %a.loc8_16.1: i32 = param a // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc8_16.1 -// CHECK:STDOUT: %int.make_type_32.loc8_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc8_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_27.1: type = value_of_initializer %int.make_type_32.loc8_27 [template = i32] // CHECK:STDOUT: %.loc8_27.2: type = converted %int.make_type_32.loc8_27, %.loc8_27.1 [template = i32] // CHECK:STDOUT: @RuntimeCall.%return: ref i32 = var @@ -129,7 +129,7 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Complement.ref: Complement = name_ref Complement, file.%Complement.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Complement.ref: = name_ref Complement, file.%Complement.decl [template = constants.%Complement] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %int.complement: init i32 = call %Complement.ref(%a.ref) // CHECK:STDOUT: %.loc9_23.1: i32 = value_of_initializer %int.complement diff --git a/toolchain/check/testdata/builtins/int/eq.carbon b/toolchain/check/testdata/builtins/int/eq.carbon index 386c89d26854..375e30b65f22 100644 --- a/toolchain/check/testdata/builtins/int/eq.carbon +++ b/toolchain/check/testdata/builtins/int/eq.carbon @@ -36,25 +36,25 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: --- int_eq.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.2: Bool = struct_value () [template] -// CHECK:STDOUT: %Eq: type = fn_type @Eq [template] -// CHECK:STDOUT: %struct.3: Eq = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Eq.type: type = fn_type @Eq [template] +// CHECK:STDOUT: %Eq: = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %False: type = class_type @False [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.4: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: bool = bool_literal true [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] // CHECK:STDOUT: %.7: bool = bool_literal false [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.5: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -67,28 +67,28 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %Eq.decl: Eq = fn_decl @Eq [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc2_10: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Eq.decl: = fn_decl @Eq [template = constants.%Eq] { +// CHECK:STDOUT: %int.make_type_32.loc2_10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_10.1: type = value_of_initializer %int.make_type_32.loc2_10 [template = i32] // CHECK:STDOUT: %.loc2_10.2: type = converted %int.make_type_32.loc2_10, %.loc2_10.1 [template = i32] // CHECK:STDOUT: %a.loc2_7.1: i32 = param a // CHECK:STDOUT: @Eq.%a: i32 = bind_name a, %a.loc2_7.1 -// CHECK:STDOUT: %int.make_type_32.loc2_18: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_18.1: type = value_of_initializer %int.make_type_32.loc2_18 [template = i32] // CHECK:STDOUT: %.loc2_18.2: type = converted %int.make_type_32.loc2_18, %.loc2_18.1 [template = i32] // CHECK:STDOUT: %b.loc2_15.1: i32 = param b // CHECK:STDOUT: @Eq.%b: i32 = bind_name b, %b.loc2_15.1 -// CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_26.1: type = value_of_initializer %bool.make_type.loc2 [template = bool] // CHECK:STDOUT: %.loc2_26.2: type = converted %bool.make_type.loc2, %.loc2_26.1 [template = bool] // CHECK:STDOUT: @Eq.%return: ref bool = var // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: type = class_decl @True [template = constants.%True] {} // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.4] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] // CHECK:STDOUT: %true_.loc7_6.1: True = param true_ // CHECK:STDOUT: @F.%true_: True = bind_name true_, %true_.loc7_6.1 @@ -96,21 +96,21 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: %false_.loc7_19.1: False = param false_ // CHECK:STDOUT: @F.%false_: False = bind_name false_, %false_.loc7_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.5] { -// CHECK:STDOUT: %int.make_type_32.loc12_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %int.make_type_32.loc12_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_19.1: type = value_of_initializer %int.make_type_32.loc12_19 [template = i32] // CHECK:STDOUT: %.loc12_19.2: type = converted %int.make_type_32.loc12_19, %.loc12_19.1 [template = i32] // CHECK:STDOUT: %a.loc12_16.1: i32 = param a // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc12_16.1 -// CHECK:STDOUT: %int.make_type_32.loc12_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_27.1: type = value_of_initializer %int.make_type_32.loc12_27 [template = i32] // CHECK:STDOUT: %.loc12_27.2: type = converted %int.make_type_32.loc12_27, %.loc12_27.1 [template = i32] // CHECK:STDOUT: %b.loc12_24.1: i32 = param b // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc12_24.1 -// CHECK:STDOUT: %bool.make_type.loc12: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc12: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_35.1: type = value_of_initializer %bool.make_type.loc12 [template = bool] // CHECK:STDOUT: %.loc12_35.2: type = converted %bool.make_type.loc12, %.loc12_35.1 [template = bool] // CHECK:STDOUT: @RuntimeCall.%return: ref bool = var @@ -136,7 +136,7 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: fn @F(%true_: True, %false_: False) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true_.ref: True = name_ref true_, %true_ -// CHECK:STDOUT: %Eq.ref.loc8: Eq = name_ref Eq, file.%Eq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Eq.ref.loc8: = name_ref Eq, file.%Eq.decl [template = constants.%Eq] // CHECK:STDOUT: %.loc8_19: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc8_22: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.eq.loc8: init bool = call %Eq.ref.loc8(%.loc8_19, %.loc8_22) [template = constants.%.5] @@ -155,7 +155,7 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: !if.expr.result.loc8: // CHECK:STDOUT: %.loc8_13.3: type = block_arg !if.expr.result.loc8 [template = constants.%True] // CHECK:STDOUT: %false_.ref: False = name_ref false_, %false_ -// CHECK:STDOUT: %Eq.ref.loc9: Eq = name_ref Eq, file.%Eq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Eq.ref.loc9: = name_ref Eq, file.%Eq.decl [template = constants.%Eq] // CHECK:STDOUT: %.loc9_20: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc9_23: i32 = int_literal 2 [template = constants.%.6] // CHECK:STDOUT: %int.eq.loc9: init bool = call %Eq.ref.loc9(%.loc9_20, %.loc9_23) [template = constants.%.7] @@ -178,7 +178,7 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Eq.ref: Eq = name_ref Eq, file.%Eq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Eq.ref: = name_ref Eq, file.%Eq.decl [template = constants.%Eq] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.eq: init bool = call %Eq.ref(%a.ref, %b.ref) @@ -190,11 +190,11 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: --- fail_bad_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %WrongResult: type = fn_type @WrongResult [template] -// CHECK:STDOUT: %struct.2: WrongResult = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %WrongResult.type: type = fn_type @WrongResult [template] +// CHECK:STDOUT: %WrongResult: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -203,21 +203,21 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: .WrongResult = %WrongResult.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %WrongResult.decl: WrongResult = fn_decl @WrongResult [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %WrongResult.decl: = fn_decl @WrongResult [template = constants.%WrongResult] { +// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] // CHECK:STDOUT: %a.loc7_16.1: i32 = param a // CHECK:STDOUT: @WrongResult.%a: i32 = bind_name a, %a.loc7_16.1 -// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] // CHECK:STDOUT: %b.loc7_24.1: i32 = param b // CHECK:STDOUT: @WrongResult.%b: i32 = bind_name b, %b.loc7_24.1 -// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] // CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_32.loc7_35, %.loc7_35.1 [template = i32] // CHECK:STDOUT: @WrongResult.%return: ref i32 = var diff --git a/toolchain/check/testdata/builtins/int/greater.carbon b/toolchain/check/testdata/builtins/int/greater.carbon index 94fe10a91523..e0139b63238a 100644 --- a/toolchain/check/testdata/builtins/int/greater.carbon +++ b/toolchain/check/testdata/builtins/int/greater.carbon @@ -31,20 +31,20 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: --- int_greater.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.2: Bool = struct_value () [template] -// CHECK:STDOUT: %Greater: type = fn_type @Greater [template] -// CHECK:STDOUT: %struct.3: Greater = struct_value () [template] -// CHECK:STDOUT: %Negate: type = fn_type @Negate [template] -// CHECK:STDOUT: %struct.4: Negate = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Greater.type: type = fn_type @Greater [template] +// CHECK:STDOUT: %Greater: = struct_value () [template] +// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] +// CHECK:STDOUT: %Negate: = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %False: type = class_type @False [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.5: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: i32 = int_literal 2 [template] @@ -52,8 +52,8 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.7: i32 = int_literal 0 [template] // CHECK:STDOUT: %.8: bool = bool_literal true [template] // CHECK:STDOUT: %.9: i32 = int_literal -1 [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.6: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -67,41 +67,41 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %Greater.decl: Greater = fn_decl @Greater [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc2_15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Greater.decl: = fn_decl @Greater [template = constants.%Greater] { +// CHECK:STDOUT: %int.make_type_32.loc2_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_15.1: type = value_of_initializer %int.make_type_32.loc2_15 [template = i32] // CHECK:STDOUT: %.loc2_15.2: type = converted %int.make_type_32.loc2_15, %.loc2_15.1 [template = i32] // CHECK:STDOUT: %a.loc2_12.1: i32 = param a // CHECK:STDOUT: @Greater.%a: i32 = bind_name a, %a.loc2_12.1 -// CHECK:STDOUT: %int.make_type_32.loc2_23: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_23.1: type = value_of_initializer %int.make_type_32.loc2_23 [template = i32] // CHECK:STDOUT: %.loc2_23.2: type = converted %int.make_type_32.loc2_23, %.loc2_23.1 [template = i32] // CHECK:STDOUT: %b.loc2_20.1: i32 = param b // CHECK:STDOUT: @Greater.%b: i32 = bind_name b, %b.loc2_20.1 -// CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_31.1: type = value_of_initializer %bool.make_type.loc2 [template = bool] // CHECK:STDOUT: %.loc2_31.2: type = converted %bool.make_type.loc2, %.loc2_31.1 [template = bool] // CHECK:STDOUT: @Greater.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Negate.decl: Negate = fn_decl @Negate [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32.loc3_14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %int.make_type_32.loc3_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %int.make_type_32.loc3_14 [template = i32] // CHECK:STDOUT: %.loc3_14.2: type = converted %int.make_type_32.loc3_14, %.loc3_14.1 [template = i32] // CHECK:STDOUT: %a.loc3_11.1: i32 = param a // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc3_11.1 -// CHECK:STDOUT: %int.make_type_32.loc3_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc3_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_22.1: type = value_of_initializer %int.make_type_32.loc3_22 [template = i32] // CHECK:STDOUT: %.loc3_22.2: type = converted %int.make_type_32.loc3_22, %.loc3_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: type = class_decl @True [template = constants.%True] {} // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.5] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] // CHECK:STDOUT: %true_.loc8_6.1: True = param true_ // CHECK:STDOUT: @F.%true_: True = bind_name true_, %true_.loc8_6.1 @@ -109,21 +109,21 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %false_.loc8_19.1: False = param false_ // CHECK:STDOUT: @F.%false_: False = bind_name false_, %false_.loc8_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.6] { -// CHECK:STDOUT: %int.make_type_32.loc16_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %int.make_type_32.loc16_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_32.loc16_19 [template = i32] // CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_32.loc16_19, %.loc16_19.1 [template = i32] // CHECK:STDOUT: %a.loc16_16.1: i32 = param a // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc16_16.1 -// CHECK:STDOUT: %int.make_type_32.loc16_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc16_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %int.make_type_32.loc16_27 [template = i32] // CHECK:STDOUT: %.loc16_27.2: type = converted %int.make_type_32.loc16_27, %.loc16_27.1 [template = i32] // CHECK:STDOUT: %b.loc16_24.1: i32 = param b // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc16_24.1 -// CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type.loc16 [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type.loc16, %.loc16_35.1 [template = bool] // CHECK:STDOUT: @RuntimeCall.%return: ref bool = var @@ -151,7 +151,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: fn @F(%true_: True, %false_: False) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %false_.ref.loc9: False = name_ref false_, %false_ -// CHECK:STDOUT: %Greater.ref.loc9: Greater = name_ref Greater, file.%Greater.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Greater.ref.loc9: = name_ref Greater, file.%Greater.decl [template = constants.%Greater] // CHECK:STDOUT: %.loc9_25: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc9_28: i32 = int_literal 2 [template = constants.%.5] // CHECK:STDOUT: %int.greater.loc9: init bool = call %Greater.ref.loc9(%.loc9_25, %.loc9_28) [template = constants.%.6] @@ -170,7 +170,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !if.expr.result.loc9: // CHECK:STDOUT: %.loc9_14.3: type = block_arg !if.expr.result.loc9 [template = constants.%False] // CHECK:STDOUT: %false_.ref.loc10: False = name_ref false_, %false_ -// CHECK:STDOUT: %Greater.ref.loc10: Greater = name_ref Greater, file.%Greater.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Greater.ref.loc10: = name_ref Greater, file.%Greater.decl [template = constants.%Greater] // CHECK:STDOUT: %.loc10_25: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc10_28: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.greater.loc10: init bool = call %Greater.ref.loc10(%.loc10_25, %.loc10_28) [template = constants.%.6] @@ -189,7 +189,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !if.expr.result.loc10: // CHECK:STDOUT: %.loc10_14.3: type = block_arg !if.expr.result.loc10 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc11: True = name_ref true_, %true_ -// CHECK:STDOUT: %Greater.ref.loc11: Greater = name_ref Greater, file.%Greater.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Greater.ref.loc11: = name_ref Greater, file.%Greater.decl [template = constants.%Greater] // CHECK:STDOUT: %.loc11_24: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc11_27: i32 = int_literal 0 [template = constants.%.7] // CHECK:STDOUT: %int.greater.loc11: init bool = call %Greater.ref.loc11(%.loc11_24, %.loc11_27) [template = constants.%.8] @@ -208,8 +208,8 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !if.expr.result.loc11: // CHECK:STDOUT: %.loc11_13.3: type = block_arg !if.expr.result.loc11 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc12: False = name_ref false_, %false_ -// CHECK:STDOUT: %Greater.ref.loc12: Greater = name_ref Greater, file.%Greater.decl [template = constants.%struct.3] -// CHECK:STDOUT: %Negate.ref.loc12: Negate = name_ref Negate, file.%Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Greater.ref.loc12: = name_ref Greater, file.%Greater.decl [template = constants.%Greater] +// CHECK:STDOUT: %Negate.ref.loc12: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_32: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.snegate.loc12: init i32 = call %Negate.ref.loc12(%.loc12_32) [template = constants.%.9] // CHECK:STDOUT: %.loc12_36: i32 = int_literal 0 [template = constants.%.7] @@ -231,9 +231,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !if.expr.result.loc12: // CHECK:STDOUT: %.loc12_14.3: type = block_arg !if.expr.result.loc12 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc13: True = name_ref true_, %true_ -// CHECK:STDOUT: %Greater.ref.loc13: Greater = name_ref Greater, file.%Greater.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Greater.ref.loc13: = name_ref Greater, file.%Greater.decl [template = constants.%Greater] // CHECK:STDOUT: %.loc13_24: i32 = int_literal 0 [template = constants.%.7] -// CHECK:STDOUT: %Negate.ref.loc13: Negate = name_ref Negate, file.%Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Negate.ref.loc13: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc13_34: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.snegate.loc13: init i32 = call %Negate.ref.loc13(%.loc13_34) [template = constants.%.9] // CHECK:STDOUT: %.loc13_23.1: i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.9] @@ -258,7 +258,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Greater.ref: Greater = name_ref Greater, file.%Greater.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Greater.ref: = name_ref Greater, file.%Greater.decl [template = constants.%Greater] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.greater: init bool = call %Greater.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/greater_eq.carbon b/toolchain/check/testdata/builtins/int/greater_eq.carbon index bfa666353e81..707f69518fe4 100644 --- a/toolchain/check/testdata/builtins/int/greater_eq.carbon +++ b/toolchain/check/testdata/builtins/int/greater_eq.carbon @@ -31,20 +31,20 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: --- int_greater_eq.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.2: Bool = struct_value () [template] -// CHECK:STDOUT: %GreaterEq: type = fn_type @GreaterEq [template] -// CHECK:STDOUT: %struct.3: GreaterEq = struct_value () [template] -// CHECK:STDOUT: %Negate: type = fn_type @Negate [template] -// CHECK:STDOUT: %struct.4: Negate = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %GreaterEq.type: type = fn_type @GreaterEq [template] +// CHECK:STDOUT: %GreaterEq: = struct_value () [template] +// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] +// CHECK:STDOUT: %Negate: = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %False: type = class_type @False [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.5: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: i32 = int_literal 2 [template] @@ -52,8 +52,8 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.7: bool = bool_literal true [template] // CHECK:STDOUT: %.8: i32 = int_literal 0 [template] // CHECK:STDOUT: %.9: i32 = int_literal -1 [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.6: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -67,41 +67,41 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %GreaterEq.decl: GreaterEq = fn_decl @GreaterEq [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc2_17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %GreaterEq.decl: = fn_decl @GreaterEq [template = constants.%GreaterEq] { +// CHECK:STDOUT: %int.make_type_32.loc2_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_17.1: type = value_of_initializer %int.make_type_32.loc2_17 [template = i32] // CHECK:STDOUT: %.loc2_17.2: type = converted %int.make_type_32.loc2_17, %.loc2_17.1 [template = i32] // CHECK:STDOUT: %a.loc2_14.1: i32 = param a // CHECK:STDOUT: @GreaterEq.%a: i32 = bind_name a, %a.loc2_14.1 -// CHECK:STDOUT: %int.make_type_32.loc2_25: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_25.1: type = value_of_initializer %int.make_type_32.loc2_25 [template = i32] // CHECK:STDOUT: %.loc2_25.2: type = converted %int.make_type_32.loc2_25, %.loc2_25.1 [template = i32] // CHECK:STDOUT: %b.loc2_22.1: i32 = param b // CHECK:STDOUT: @GreaterEq.%b: i32 = bind_name b, %b.loc2_22.1 -// CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_33.1: type = value_of_initializer %bool.make_type.loc2 [template = bool] // CHECK:STDOUT: %.loc2_33.2: type = converted %bool.make_type.loc2, %.loc2_33.1 [template = bool] // CHECK:STDOUT: @GreaterEq.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Negate.decl: Negate = fn_decl @Negate [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32.loc3_14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %int.make_type_32.loc3_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %int.make_type_32.loc3_14 [template = i32] // CHECK:STDOUT: %.loc3_14.2: type = converted %int.make_type_32.loc3_14, %.loc3_14.1 [template = i32] // CHECK:STDOUT: %a.loc3_11.1: i32 = param a // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc3_11.1 -// CHECK:STDOUT: %int.make_type_32.loc3_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc3_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_22.1: type = value_of_initializer %int.make_type_32.loc3_22 [template = i32] // CHECK:STDOUT: %.loc3_22.2: type = converted %int.make_type_32.loc3_22, %.loc3_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: type = class_decl @True [template = constants.%True] {} // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.5] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] // CHECK:STDOUT: %true_.loc8_6.1: True = param true_ // CHECK:STDOUT: @F.%true_: True = bind_name true_, %true_.loc8_6.1 @@ -109,21 +109,21 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %false_.loc8_19.1: False = param false_ // CHECK:STDOUT: @F.%false_: False = bind_name false_, %false_.loc8_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.6] { -// CHECK:STDOUT: %int.make_type_32.loc16_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %int.make_type_32.loc16_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_32.loc16_19 [template = i32] // CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_32.loc16_19, %.loc16_19.1 [template = i32] // CHECK:STDOUT: %a.loc16_16.1: i32 = param a // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc16_16.1 -// CHECK:STDOUT: %int.make_type_32.loc16_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc16_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %int.make_type_32.loc16_27 [template = i32] // CHECK:STDOUT: %.loc16_27.2: type = converted %int.make_type_32.loc16_27, %.loc16_27.1 [template = i32] // CHECK:STDOUT: %b.loc16_24.1: i32 = param b // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc16_24.1 -// CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type.loc16 [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type.loc16, %.loc16_35.1 [template = bool] // CHECK:STDOUT: @RuntimeCall.%return: ref bool = var @@ -151,7 +151,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: fn @F(%true_: True, %false_: False) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %false_.ref.loc9: False = name_ref false_, %false_ -// CHECK:STDOUT: %GreaterEq.ref.loc9: GreaterEq = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %GreaterEq.ref.loc9: = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] // CHECK:STDOUT: %.loc9_27: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc9_30: i32 = int_literal 2 [template = constants.%.5] // CHECK:STDOUT: %int.greater_eq.loc9: init bool = call %GreaterEq.ref.loc9(%.loc9_27, %.loc9_30) [template = constants.%.6] @@ -170,7 +170,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !if.expr.result.loc9: // CHECK:STDOUT: %.loc9_14.3: type = block_arg !if.expr.result.loc9 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc10: True = name_ref true_, %true_ -// CHECK:STDOUT: %GreaterEq.ref.loc10: GreaterEq = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %GreaterEq.ref.loc10: = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] // CHECK:STDOUT: %.loc10_26: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc10_29: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.greater_eq.loc10: init bool = call %GreaterEq.ref.loc10(%.loc10_26, %.loc10_29) [template = constants.%.7] @@ -189,7 +189,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !if.expr.result.loc10: // CHECK:STDOUT: %.loc10_13.3: type = block_arg !if.expr.result.loc10 [template = constants.%True] // CHECK:STDOUT: %true_.ref.loc11: True = name_ref true_, %true_ -// CHECK:STDOUT: %GreaterEq.ref.loc11: GreaterEq = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %GreaterEq.ref.loc11: = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] // CHECK:STDOUT: %.loc11_26: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc11_29: i32 = int_literal 0 [template = constants.%.8] // CHECK:STDOUT: %int.greater_eq.loc11: init bool = call %GreaterEq.ref.loc11(%.loc11_26, %.loc11_29) [template = constants.%.7] @@ -208,8 +208,8 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !if.expr.result.loc11: // CHECK:STDOUT: %.loc11_13.3: type = block_arg !if.expr.result.loc11 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc12: False = name_ref false_, %false_ -// CHECK:STDOUT: %GreaterEq.ref.loc12: GreaterEq = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%struct.3] -// CHECK:STDOUT: %Negate.ref.loc12: Negate = name_ref Negate, file.%Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %GreaterEq.ref.loc12: = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] +// CHECK:STDOUT: %Negate.ref.loc12: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_34: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.snegate.loc12: init i32 = call %Negate.ref.loc12(%.loc12_34) [template = constants.%.9] // CHECK:STDOUT: %.loc12_38: i32 = int_literal 0 [template = constants.%.8] @@ -231,9 +231,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !if.expr.result.loc12: // CHECK:STDOUT: %.loc12_14.3: type = block_arg !if.expr.result.loc12 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc13: True = name_ref true_, %true_ -// CHECK:STDOUT: %GreaterEq.ref.loc13: GreaterEq = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %GreaterEq.ref.loc13: = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] // CHECK:STDOUT: %.loc13_26: i32 = int_literal 0 [template = constants.%.8] -// CHECK:STDOUT: %Negate.ref.loc13: Negate = name_ref Negate, file.%Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Negate.ref.loc13: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc13_36: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.snegate.loc13: init i32 = call %Negate.ref.loc13(%.loc13_36) [template = constants.%.9] // CHECK:STDOUT: %.loc13_25.1: i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.9] @@ -258,7 +258,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %GreaterEq.ref: GreaterEq = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %GreaterEq.ref: = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.greater_eq: init bool = call %GreaterEq.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/left_shift.carbon b/toolchain/check/testdata/builtins/int/left_shift.carbon index 4ff5ae588788..716f5af47a4d 100644 --- a/toolchain/check/testdata/builtins/int/left_shift.carbon +++ b/toolchain/check/testdata/builtins/int/left_shift.carbon @@ -66,18 +66,18 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: --- int_left_shift.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %LeftShift: type = fn_type @LeftShift [template] -// CHECK:STDOUT: %struct.2: LeftShift = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %LeftShift.type: type = fn_type @LeftShift [template] +// CHECK:STDOUT: %LeftShift: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 5 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 20 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] // CHECK:STDOUT: %.6: type = ptr_type [i32; 20] [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.3: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -88,28 +88,28 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %LeftShift.decl: LeftShift = fn_decl @LeftShift [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc2_17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %LeftShift.decl: = fn_decl @LeftShift [template = constants.%LeftShift] { +// CHECK:STDOUT: %int.make_type_32.loc2_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_17.1: type = value_of_initializer %int.make_type_32.loc2_17 [template = i32] // CHECK:STDOUT: %.loc2_17.2: type = converted %int.make_type_32.loc2_17, %.loc2_17.1 [template = i32] // CHECK:STDOUT: %a.loc2_14.1: i32 = param a // CHECK:STDOUT: @LeftShift.%a: i32 = bind_name a, %a.loc2_14.1 -// CHECK:STDOUT: %int.make_type_32.loc2_25: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_25.1: type = value_of_initializer %int.make_type_32.loc2_25 [template = i32] // CHECK:STDOUT: %.loc2_25.2: type = converted %int.make_type_32.loc2_25, %.loc2_25.1 [template = i32] // CHECK:STDOUT: %b.loc2_22.1: i32 = param b // CHECK:STDOUT: @LeftShift.%b: i32 = bind_name b, %b.loc2_22.1 -// CHECK:STDOUT: %int.make_type_32.loc2_33: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_33.1: type = value_of_initializer %int.make_type_32.loc2_33 [template = i32] // CHECK:STDOUT: %.loc2_33.2: type = converted %int.make_type_32.loc2_33, %.loc2_33.1 [template = i32] // CHECK:STDOUT: @LeftShift.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %LeftShift.ref: LeftShift = name_ref LeftShift, %LeftShift.decl [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %LeftShift.ref: = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %.loc4_26: i32 = int_literal 5 [template = constants.%.2] // CHECK:STDOUT: %.loc4_29: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.left_shift: init i32 = call %LeftShift.ref(%.loc4_26, %.loc4_29) [template = constants.%.4] @@ -118,8 +118,8 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %.loc4_31: type = array_type %int.left_shift, i32 [template = constants.%.5] // CHECK:STDOUT: %arr.var: ref [i32; 20] = var arr // CHECK:STDOUT: %arr: ref [i32; 20] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 20 [template = constants.%.4] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] @@ -128,21 +128,21 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %arr.ref: ref [i32; 20] = name_ref arr, %arr // CHECK:STDOUT: %.loc5_25: [i32; 20]* = addr_of %arr.ref // CHECK:STDOUT: %arr_p: [i32; 20]* = bind_name arr_p, %.loc5_25 -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] // CHECK:STDOUT: %a.loc7_16.1: i32 = param a // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 -// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] // CHECK:STDOUT: %b.loc7_24.1: i32 = param b // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 -// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] // CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_32.loc7_35, %.loc7_35.1 [template = i32] // CHECK:STDOUT: @RuntimeCall.%return: ref i32 = var @@ -155,7 +155,7 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %LeftShift.ref: LeftShift = name_ref LeftShift, file.%LeftShift.decl [template = constants.%struct.2] +// CHECK:STDOUT: %LeftShift.ref: = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.left_shift: init i32 = call %LeftShift.ref(%a.ref, %b.ref) @@ -167,13 +167,13 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: --- fail_bad_shift.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %LeftShift: type = fn_type @LeftShift [template] -// CHECK:STDOUT: %struct.2: LeftShift = struct_value () [template] -// CHECK:STDOUT: %Negate: type = fn_type @Negate [template] -// CHECK:STDOUT: %struct.3: Negate = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %LeftShift.type: type = fn_type @LeftShift [template] +// CHECK:STDOUT: %LeftShift: = struct_value () [template] +// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] +// CHECK:STDOUT: %Negate: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 31 [template] // CHECK:STDOUT: %.4: i32 = int_literal -2147483648 [template] @@ -191,122 +191,122 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: .Negate = %Negate.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %LeftShift.decl: LeftShift = fn_decl @LeftShift [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc4_17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %LeftShift.decl: = fn_decl @LeftShift [template = constants.%LeftShift] { +// CHECK:STDOUT: %int.make_type_32.loc4_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_17.1: type = value_of_initializer %int.make_type_32.loc4_17 [template = i32] // CHECK:STDOUT: %.loc4_17.2: type = converted %int.make_type_32.loc4_17, %.loc4_17.1 [template = i32] // CHECK:STDOUT: %a.loc4_14.1: i32 = param a // CHECK:STDOUT: @LeftShift.%a: i32 = bind_name a, %a.loc4_14.1 -// CHECK:STDOUT: %int.make_type_32.loc4_25: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_25.1: type = value_of_initializer %int.make_type_32.loc4_25 [template = i32] // CHECK:STDOUT: %.loc4_25.2: type = converted %int.make_type_32.loc4_25, %.loc4_25.1 [template = i32] // CHECK:STDOUT: %b.loc4_22.1: i32 = param b // CHECK:STDOUT: @LeftShift.%b: i32 = bind_name b, %b.loc4_22.1 -// CHECK:STDOUT: %int.make_type_32.loc4_33: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_33.1: type = value_of_initializer %int.make_type_32.loc4_33 [template = i32] // CHECK:STDOUT: %.loc4_33.2: type = converted %int.make_type_32.loc4_33, %.loc4_33.1 [template = i32] // CHECK:STDOUT: @LeftShift.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Negate.decl: Negate = fn_decl @Negate [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc5_14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %int.make_type_32.loc5_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_14.1: type = value_of_initializer %int.make_type_32.loc5_14 [template = i32] // CHECK:STDOUT: %.loc5_14.2: type = converted %int.make_type_32.loc5_14, %.loc5_14.1 [template = i32] // CHECK:STDOUT: %a.loc5_11.1: i32 = param a // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc5_11.1 -// CHECK:STDOUT: %int.make_type_32.loc5_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc5_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_22.1: type = value_of_initializer %int.make_type_32.loc5_22 [template = i32] // CHECK:STDOUT: %.loc5_22.2: type = converted %int.make_type_32.loc5_22, %.loc5_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_13.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_13.2: type = converted %int.make_type_32.loc8, %.loc8_13.1 [template = i32] -// CHECK:STDOUT: %LeftShift.ref.loc8: LeftShift = name_ref LeftShift, %LeftShift.decl [template = constants.%struct.2] +// CHECK:STDOUT: %LeftShift.ref.loc8: = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %.loc8_29: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc8_32: i32 = int_literal 31 [template = constants.%.3] // CHECK:STDOUT: %int.left_shift.loc8: init i32 = call %LeftShift.ref.loc8(%.loc8_29, %.loc8_32) [template = constants.%.4] // CHECK:STDOUT: %.loc8_35.1: i32 = value_of_initializer %int.left_shift.loc8 [template = constants.%.4] // CHECK:STDOUT: %.loc8_35.2: i32 = converted %int.left_shift.loc8, %.loc8_35.1 [template = constants.%.4] // CHECK:STDOUT: %size_1: i32 = bind_name size_1, %.loc8_35.2 -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_13.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_13.2: type = converted %int.make_type_32.loc13, %.loc13_13.1 [template = i32] -// CHECK:STDOUT: %LeftShift.ref.loc13: LeftShift = name_ref LeftShift, %LeftShift.decl [template = constants.%struct.2] +// CHECK:STDOUT: %LeftShift.ref.loc13: = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %.loc13_29: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc13_32: i32 = int_literal 32 [template = constants.%.5] // CHECK:STDOUT: %int.left_shift.loc13: init i32 = call %LeftShift.ref.loc13(%.loc13_29, %.loc13_32) [template = ] // CHECK:STDOUT: %.loc13_35.1: i32 = value_of_initializer %int.left_shift.loc13 [template = ] // CHECK:STDOUT: %.loc13_35.2: i32 = converted %int.left_shift.loc13, %.loc13_35.1 [template = ] // CHECK:STDOUT: %size_2: i32 = bind_name size_2, %.loc13_35.2 -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_13.1: type = value_of_initializer %int.make_type_32.loc18 [template = i32] // CHECK:STDOUT: %.loc18_13.2: type = converted %int.make_type_32.loc18, %.loc18_13.1 [template = i32] -// CHECK:STDOUT: %LeftShift.ref.loc18: LeftShift = name_ref LeftShift, %LeftShift.decl [template = constants.%struct.2] +// CHECK:STDOUT: %LeftShift.ref.loc18: = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %.loc18_29: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc18_32: i32 = int_literal 33 [template = constants.%.6] // CHECK:STDOUT: %int.left_shift.loc18: init i32 = call %LeftShift.ref.loc18(%.loc18_29, %.loc18_32) [template = ] // CHECK:STDOUT: %.loc18_35.1: i32 = value_of_initializer %int.left_shift.loc18 [template = ] // CHECK:STDOUT: %.loc18_35.2: i32 = converted %int.left_shift.loc18, %.loc18_35.1 [template = ] // CHECK:STDOUT: %size_3: i32 = bind_name size_3, %.loc18_35.2 -// CHECK:STDOUT: %import_ref.9: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_17.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_17.2: type = converted %int.make_type_32.loc21, %.loc21_17.1 [template = i32] -// CHECK:STDOUT: %LeftShift.ref.loc21: LeftShift = name_ref LeftShift, %LeftShift.decl [template = constants.%struct.2] +// CHECK:STDOUT: %LeftShift.ref.loc21: = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %.loc21_33: i32 = int_literal 1000 [template = constants.%.7] // CHECK:STDOUT: %.loc21_39: i32 = int_literal 31 [template = constants.%.3] // CHECK:STDOUT: %int.left_shift.loc21: init i32 = call %LeftShift.ref.loc21(%.loc21_33, %.loc21_39) [template = constants.%.8] // CHECK:STDOUT: %.loc21_42.1: i32 = value_of_initializer %int.left_shift.loc21 [template = constants.%.8] // CHECK:STDOUT: %.loc21_42.2: i32 = converted %int.left_shift.loc21, %.loc21_42.1 [template = constants.%.8] // CHECK:STDOUT: %overflow_1: i32 = bind_name overflow_1, %.loc21_42.2 -// CHECK:STDOUT: %import_ref.10: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc26: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc26_17.1: type = value_of_initializer %int.make_type_32.loc26 [template = i32] // CHECK:STDOUT: %.loc26_17.2: type = converted %int.make_type_32.loc26, %.loc26_17.1 [template = i32] -// CHECK:STDOUT: %LeftShift.ref.loc26: LeftShift = name_ref LeftShift, %LeftShift.decl [template = constants.%struct.2] +// CHECK:STDOUT: %LeftShift.ref.loc26: = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %.loc26_33: i32 = int_literal 1000 [template = constants.%.7] // CHECK:STDOUT: %.loc26_39: i32 = int_literal 32 [template = constants.%.5] // CHECK:STDOUT: %int.left_shift.loc26: init i32 = call %LeftShift.ref.loc26(%.loc26_33, %.loc26_39) [template = ] // CHECK:STDOUT: %.loc26_42.1: i32 = value_of_initializer %int.left_shift.loc26 [template = ] // CHECK:STDOUT: %.loc26_42.2: i32 = converted %int.left_shift.loc26, %.loc26_42.1 [template = ] // CHECK:STDOUT: %overflow_2: i32 = bind_name overflow_2, %.loc26_42.2 -// CHECK:STDOUT: %import_ref.11: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc29: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc29: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc29_20.1: type = value_of_initializer %int.make_type_32.loc29 [template = i32] // CHECK:STDOUT: %.loc29_20.2: type = converted %int.make_type_32.loc29, %.loc29_20.1 [template = i32] -// CHECK:STDOUT: %LeftShift.ref.loc29: LeftShift = name_ref LeftShift, %LeftShift.decl [template = constants.%struct.2] +// CHECK:STDOUT: %LeftShift.ref.loc29: = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %.loc29_36: i32 = int_literal 0 [template = constants.%.8] // CHECK:STDOUT: %.loc29_39: i32 = int_literal 31 [template = constants.%.3] // CHECK:STDOUT: %int.left_shift.loc29: init i32 = call %LeftShift.ref.loc29(%.loc29_36, %.loc29_39) [template = constants.%.8] // CHECK:STDOUT: %.loc29_42.1: i32 = value_of_initializer %int.left_shift.loc29 [template = constants.%.8] // CHECK:STDOUT: %.loc29_42.2: i32 = converted %int.left_shift.loc29, %.loc29_42.1 [template = constants.%.8] // CHECK:STDOUT: %no_overflow_1: i32 = bind_name no_overflow_1, %.loc29_42.2 -// CHECK:STDOUT: %import_ref.12: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc34: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc34_20.1: type = value_of_initializer %int.make_type_32.loc34 [template = i32] // CHECK:STDOUT: %.loc34_20.2: type = converted %int.make_type_32.loc34, %.loc34_20.1 [template = i32] -// CHECK:STDOUT: %LeftShift.ref.loc34: LeftShift = name_ref LeftShift, %LeftShift.decl [template = constants.%struct.2] +// CHECK:STDOUT: %LeftShift.ref.loc34: = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %.loc34_36: i32 = int_literal 0 [template = constants.%.8] // CHECK:STDOUT: %.loc34_39: i32 = int_literal 32 [template = constants.%.5] // CHECK:STDOUT: %int.left_shift.loc34: init i32 = call %LeftShift.ref.loc34(%.loc34_36, %.loc34_39) [template = ] // CHECK:STDOUT: %.loc34_42.1: i32 = value_of_initializer %int.left_shift.loc34 [template = ] // CHECK:STDOUT: %.loc34_42.2: i32 = converted %int.left_shift.loc34, %.loc34_42.1 [template = ] // CHECK:STDOUT: %no_overflow_2: i32 = bind_name no_overflow_2, %.loc34_42.2 -// CHECK:STDOUT: %import_ref.13: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc40: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc40: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc40_15.1: type = value_of_initializer %int.make_type_32.loc40 [template = i32] // CHECK:STDOUT: %.loc40_15.2: type = converted %int.make_type_32.loc40, %.loc40_15.1 [template = i32] -// CHECK:STDOUT: %LeftShift.ref.loc40: LeftShift = name_ref LeftShift, %LeftShift.decl [template = constants.%struct.2] +// CHECK:STDOUT: %LeftShift.ref.loc40: = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %.loc40_31: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %Negate.ref: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Negate.ref: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc40_41: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %int.snegate: init i32 = call %Negate.ref(%.loc40_41) [template = constants.%.9] // CHECK:STDOUT: %.loc40_30.1: i32 = value_of_initializer %int.snegate [template = constants.%.9] diff --git a/toolchain/check/testdata/builtins/int/less.carbon b/toolchain/check/testdata/builtins/int/less.carbon index 00dad4e97c23..03624e1ccd7f 100644 --- a/toolchain/check/testdata/builtins/int/less.carbon +++ b/toolchain/check/testdata/builtins/int/less.carbon @@ -31,20 +31,20 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: --- int_less.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.2: Bool = struct_value () [template] -// CHECK:STDOUT: %Less: type = fn_type @Less [template] -// CHECK:STDOUT: %struct.3: Less = struct_value () [template] -// CHECK:STDOUT: %Negate: type = fn_type @Negate [template] -// CHECK:STDOUT: %struct.4: Negate = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Less.type: type = fn_type @Less [template] +// CHECK:STDOUT: %Less: = struct_value () [template] +// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] +// CHECK:STDOUT: %Negate: = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %False: type = class_type @False [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.5: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: i32 = int_literal 2 [template] @@ -52,8 +52,8 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.7: bool = bool_literal false [template] // CHECK:STDOUT: %.8: i32 = int_literal 0 [template] // CHECK:STDOUT: %.9: i32 = int_literal -1 [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.6: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -67,41 +67,41 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %Less.decl: Less = fn_decl @Less [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc2_12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Less.decl: = fn_decl @Less [template = constants.%Less] { +// CHECK:STDOUT: %int.make_type_32.loc2_12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_12.1: type = value_of_initializer %int.make_type_32.loc2_12 [template = i32] // CHECK:STDOUT: %.loc2_12.2: type = converted %int.make_type_32.loc2_12, %.loc2_12.1 [template = i32] // CHECK:STDOUT: %a.loc2_9.1: i32 = param a // CHECK:STDOUT: @Less.%a: i32 = bind_name a, %a.loc2_9.1 -// CHECK:STDOUT: %int.make_type_32.loc2_20: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_20.1: type = value_of_initializer %int.make_type_32.loc2_20 [template = i32] // CHECK:STDOUT: %.loc2_20.2: type = converted %int.make_type_32.loc2_20, %.loc2_20.1 [template = i32] // CHECK:STDOUT: %b.loc2_17.1: i32 = param b // CHECK:STDOUT: @Less.%b: i32 = bind_name b, %b.loc2_17.1 -// CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_28.1: type = value_of_initializer %bool.make_type.loc2 [template = bool] // CHECK:STDOUT: %.loc2_28.2: type = converted %bool.make_type.loc2, %.loc2_28.1 [template = bool] // CHECK:STDOUT: @Less.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Negate.decl: Negate = fn_decl @Negate [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32.loc3_14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %int.make_type_32.loc3_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %int.make_type_32.loc3_14 [template = i32] // CHECK:STDOUT: %.loc3_14.2: type = converted %int.make_type_32.loc3_14, %.loc3_14.1 [template = i32] // CHECK:STDOUT: %a.loc3_11.1: i32 = param a // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc3_11.1 -// CHECK:STDOUT: %int.make_type_32.loc3_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc3_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_22.1: type = value_of_initializer %int.make_type_32.loc3_22 [template = i32] // CHECK:STDOUT: %.loc3_22.2: type = converted %int.make_type_32.loc3_22, %.loc3_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: type = class_decl @True [template = constants.%True] {} // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.5] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] // CHECK:STDOUT: %true_.loc8_6.1: True = param true_ // CHECK:STDOUT: @F.%true_: True = bind_name true_, %true_.loc8_6.1 @@ -109,21 +109,21 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %false_.loc8_19.1: False = param false_ // CHECK:STDOUT: @F.%false_: False = bind_name false_, %false_.loc8_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.6] { -// CHECK:STDOUT: %int.make_type_32.loc16_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %int.make_type_32.loc16_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_32.loc16_19 [template = i32] // CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_32.loc16_19, %.loc16_19.1 [template = i32] // CHECK:STDOUT: %a.loc16_16.1: i32 = param a // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc16_16.1 -// CHECK:STDOUT: %int.make_type_32.loc16_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc16_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %int.make_type_32.loc16_27 [template = i32] // CHECK:STDOUT: %.loc16_27.2: type = converted %int.make_type_32.loc16_27, %.loc16_27.1 [template = i32] // CHECK:STDOUT: %b.loc16_24.1: i32 = param b // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc16_24.1 -// CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type.loc16 [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type.loc16, %.loc16_35.1 [template = bool] // CHECK:STDOUT: @RuntimeCall.%return: ref bool = var @@ -151,7 +151,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: fn @F(%true_: True, %false_: False) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true_.ref.loc9: True = name_ref true_, %true_ -// CHECK:STDOUT: %Less.ref.loc9: Less = name_ref Less, file.%Less.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Less.ref.loc9: = name_ref Less, file.%Less.decl [template = constants.%Less] // CHECK:STDOUT: %.loc9_21: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc9_24: i32 = int_literal 2 [template = constants.%.5] // CHECK:STDOUT: %int.less.loc9: init bool = call %Less.ref.loc9(%.loc9_21, %.loc9_24) [template = constants.%.6] @@ -170,7 +170,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !if.expr.result.loc9: // CHECK:STDOUT: %.loc9_13.3: type = block_arg !if.expr.result.loc9 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc10: False = name_ref false_, %false_ -// CHECK:STDOUT: %Less.ref.loc10: Less = name_ref Less, file.%Less.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Less.ref.loc10: = name_ref Less, file.%Less.decl [template = constants.%Less] // CHECK:STDOUT: %.loc10_22: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc10_25: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.less.loc10: init bool = call %Less.ref.loc10(%.loc10_22, %.loc10_25) [template = constants.%.7] @@ -189,7 +189,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !if.expr.result.loc10: // CHECK:STDOUT: %.loc10_14.3: type = block_arg !if.expr.result.loc10 [template = constants.%False] // CHECK:STDOUT: %false_.ref.loc11: False = name_ref false_, %false_ -// CHECK:STDOUT: %Less.ref.loc11: Less = name_ref Less, file.%Less.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Less.ref.loc11: = name_ref Less, file.%Less.decl [template = constants.%Less] // CHECK:STDOUT: %.loc11_22: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc11_25: i32 = int_literal 0 [template = constants.%.8] // CHECK:STDOUT: %int.less.loc11: init bool = call %Less.ref.loc11(%.loc11_22, %.loc11_25) [template = constants.%.7] @@ -208,8 +208,8 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !if.expr.result.loc11: // CHECK:STDOUT: %.loc11_14.3: type = block_arg !if.expr.result.loc11 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc12: True = name_ref true_, %true_ -// CHECK:STDOUT: %Less.ref.loc12: Less = name_ref Less, file.%Less.decl [template = constants.%struct.3] -// CHECK:STDOUT: %Negate.ref.loc12: Negate = name_ref Negate, file.%Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Less.ref.loc12: = name_ref Less, file.%Less.decl [template = constants.%Less] +// CHECK:STDOUT: %Negate.ref.loc12: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_28: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.snegate.loc12: init i32 = call %Negate.ref.loc12(%.loc12_28) [template = constants.%.9] // CHECK:STDOUT: %.loc12_32: i32 = int_literal 0 [template = constants.%.8] @@ -231,9 +231,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !if.expr.result.loc12: // CHECK:STDOUT: %.loc12_13.3: type = block_arg !if.expr.result.loc12 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc13: False = name_ref false_, %false_ -// CHECK:STDOUT: %Less.ref.loc13: Less = name_ref Less, file.%Less.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Less.ref.loc13: = name_ref Less, file.%Less.decl [template = constants.%Less] // CHECK:STDOUT: %.loc13_22: i32 = int_literal 0 [template = constants.%.8] -// CHECK:STDOUT: %Negate.ref.loc13: Negate = name_ref Negate, file.%Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Negate.ref.loc13: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc13_32: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.snegate.loc13: init i32 = call %Negate.ref.loc13(%.loc13_32) [template = constants.%.9] // CHECK:STDOUT: %.loc13_21.1: i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.9] @@ -258,7 +258,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Less.ref: Less = name_ref Less, file.%Less.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Less.ref: = name_ref Less, file.%Less.decl [template = constants.%Less] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.less: init bool = call %Less.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/less_eq.carbon b/toolchain/check/testdata/builtins/int/less_eq.carbon index 8a49c113c818..4ebeb7833eff 100644 --- a/toolchain/check/testdata/builtins/int/less_eq.carbon +++ b/toolchain/check/testdata/builtins/int/less_eq.carbon @@ -31,20 +31,20 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: --- int_less_eq.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.2: Bool = struct_value () [template] -// CHECK:STDOUT: %LessEq: type = fn_type @LessEq [template] -// CHECK:STDOUT: %struct.3: LessEq = struct_value () [template] -// CHECK:STDOUT: %Negate: type = fn_type @Negate [template] -// CHECK:STDOUT: %struct.4: Negate = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %LessEq.type: type = fn_type @LessEq [template] +// CHECK:STDOUT: %LessEq: = struct_value () [template] +// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] +// CHECK:STDOUT: %Negate: = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %False: type = class_type @False [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.5: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: i32 = int_literal 2 [template] @@ -52,8 +52,8 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.7: i32 = int_literal 0 [template] // CHECK:STDOUT: %.8: bool = bool_literal false [template] // CHECK:STDOUT: %.9: i32 = int_literal -1 [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.6: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -67,41 +67,41 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %LessEq.decl: LessEq = fn_decl @LessEq [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc2_14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %LessEq.decl: = fn_decl @LessEq [template = constants.%LessEq] { +// CHECK:STDOUT: %int.make_type_32.loc2_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_14.1: type = value_of_initializer %int.make_type_32.loc2_14 [template = i32] // CHECK:STDOUT: %.loc2_14.2: type = converted %int.make_type_32.loc2_14, %.loc2_14.1 [template = i32] // CHECK:STDOUT: %a.loc2_11.1: i32 = param a // CHECK:STDOUT: @LessEq.%a: i32 = bind_name a, %a.loc2_11.1 -// CHECK:STDOUT: %int.make_type_32.loc2_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_22.1: type = value_of_initializer %int.make_type_32.loc2_22 [template = i32] // CHECK:STDOUT: %.loc2_22.2: type = converted %int.make_type_32.loc2_22, %.loc2_22.1 [template = i32] // CHECK:STDOUT: %b.loc2_19.1: i32 = param b // CHECK:STDOUT: @LessEq.%b: i32 = bind_name b, %b.loc2_19.1 -// CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_30.1: type = value_of_initializer %bool.make_type.loc2 [template = bool] // CHECK:STDOUT: %.loc2_30.2: type = converted %bool.make_type.loc2, %.loc2_30.1 [template = bool] // CHECK:STDOUT: @LessEq.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Negate.decl: Negate = fn_decl @Negate [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32.loc3_14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %int.make_type_32.loc3_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %int.make_type_32.loc3_14 [template = i32] // CHECK:STDOUT: %.loc3_14.2: type = converted %int.make_type_32.loc3_14, %.loc3_14.1 [template = i32] // CHECK:STDOUT: %a.loc3_11.1: i32 = param a // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc3_11.1 -// CHECK:STDOUT: %int.make_type_32.loc3_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc3_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_22.1: type = value_of_initializer %int.make_type_32.loc3_22 [template = i32] // CHECK:STDOUT: %.loc3_22.2: type = converted %int.make_type_32.loc3_22, %.loc3_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: type = class_decl @True [template = constants.%True] {} // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.5] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] // CHECK:STDOUT: %true_.loc8_6.1: True = param true_ // CHECK:STDOUT: @F.%true_: True = bind_name true_, %true_.loc8_6.1 @@ -109,21 +109,21 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %false_.loc8_19.1: False = param false_ // CHECK:STDOUT: @F.%false_: False = bind_name false_, %false_.loc8_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.6] { -// CHECK:STDOUT: %int.make_type_32.loc16_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %int.make_type_32.loc16_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_32.loc16_19 [template = i32] // CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_32.loc16_19, %.loc16_19.1 [template = i32] // CHECK:STDOUT: %a.loc16_16.1: i32 = param a // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc16_16.1 -// CHECK:STDOUT: %int.make_type_32.loc16_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc16_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %int.make_type_32.loc16_27 [template = i32] // CHECK:STDOUT: %.loc16_27.2: type = converted %int.make_type_32.loc16_27, %.loc16_27.1 [template = i32] // CHECK:STDOUT: %b.loc16_24.1: i32 = param b // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc16_24.1 -// CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type.loc16 [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type.loc16, %.loc16_35.1 [template = bool] // CHECK:STDOUT: @RuntimeCall.%return: ref bool = var @@ -151,7 +151,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: fn @F(%true_: True, %false_: False) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true_.ref.loc9: True = name_ref true_, %true_ -// CHECK:STDOUT: %LessEq.ref.loc9: LessEq = name_ref LessEq, file.%LessEq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %LessEq.ref.loc9: = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] // CHECK:STDOUT: %.loc9_23: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc9_26: i32 = int_literal 2 [template = constants.%.5] // CHECK:STDOUT: %int.less_eq.loc9: init bool = call %LessEq.ref.loc9(%.loc9_23, %.loc9_26) [template = constants.%.6] @@ -170,7 +170,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !if.expr.result.loc9: // CHECK:STDOUT: %.loc9_13.3: type = block_arg !if.expr.result.loc9 [template = constants.%True] // CHECK:STDOUT: %true_.ref.loc10: True = name_ref true_, %true_ -// CHECK:STDOUT: %LessEq.ref.loc10: LessEq = name_ref LessEq, file.%LessEq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %LessEq.ref.loc10: = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] // CHECK:STDOUT: %.loc10_23: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc10_26: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.less_eq.loc10: init bool = call %LessEq.ref.loc10(%.loc10_23, %.loc10_26) [template = constants.%.6] @@ -189,7 +189,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !if.expr.result.loc10: // CHECK:STDOUT: %.loc10_13.3: type = block_arg !if.expr.result.loc10 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc11: False = name_ref false_, %false_ -// CHECK:STDOUT: %LessEq.ref.loc11: LessEq = name_ref LessEq, file.%LessEq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %LessEq.ref.loc11: = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] // CHECK:STDOUT: %.loc11_24: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc11_27: i32 = int_literal 0 [template = constants.%.7] // CHECK:STDOUT: %int.less_eq.loc11: init bool = call %LessEq.ref.loc11(%.loc11_24, %.loc11_27) [template = constants.%.8] @@ -208,8 +208,8 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !if.expr.result.loc11: // CHECK:STDOUT: %.loc11_14.3: type = block_arg !if.expr.result.loc11 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc12: True = name_ref true_, %true_ -// CHECK:STDOUT: %LessEq.ref.loc12: LessEq = name_ref LessEq, file.%LessEq.decl [template = constants.%struct.3] -// CHECK:STDOUT: %Negate.ref.loc12: Negate = name_ref Negate, file.%Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %LessEq.ref.loc12: = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] +// CHECK:STDOUT: %Negate.ref.loc12: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_30: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.snegate.loc12: init i32 = call %Negate.ref.loc12(%.loc12_30) [template = constants.%.9] // CHECK:STDOUT: %.loc12_34: i32 = int_literal 0 [template = constants.%.7] @@ -231,9 +231,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !if.expr.result.loc12: // CHECK:STDOUT: %.loc12_13.3: type = block_arg !if.expr.result.loc12 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc13: False = name_ref false_, %false_ -// CHECK:STDOUT: %LessEq.ref.loc13: LessEq = name_ref LessEq, file.%LessEq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %LessEq.ref.loc13: = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] // CHECK:STDOUT: %.loc13_24: i32 = int_literal 0 [template = constants.%.7] -// CHECK:STDOUT: %Negate.ref.loc13: Negate = name_ref Negate, file.%Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Negate.ref.loc13: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc13_34: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.snegate.loc13: init i32 = call %Negate.ref.loc13(%.loc13_34) [template = constants.%.9] // CHECK:STDOUT: %.loc13_23.1: i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.9] @@ -258,7 +258,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %LessEq.ref: LessEq = name_ref LessEq, file.%LessEq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %LessEq.ref: = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.less_eq: init bool = call %LessEq.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/make_type_32.carbon b/toolchain/check/testdata/builtins/int/make_type_32.carbon index cc9c068088f7..fe0555932d78 100644 --- a/toolchain/check/testdata/builtins/int/make_type_32.carbon +++ b/toolchain/check/testdata/builtins/int/make_type_32.carbon @@ -25,9 +25,9 @@ var i: Int() = 0; // CHECK:STDOUT: --- types.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int: type = fn_type @Int [template] +// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int = struct_value () [template] +// CHECK:STDOUT: %Int: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -36,7 +36,7 @@ var i: Int() = 0; // CHECK:STDOUT: .Int = %Int.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Int.decl: Int = fn_decl @Int [template = constants.%struct] { +// CHECK:STDOUT: %Int.decl: = fn_decl @Int [template = constants.%Int] { // CHECK:STDOUT: @Int.%return: ref type = var // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -46,9 +46,9 @@ var i: Int() = 0; // CHECK:STDOUT: --- use_types.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int: type = fn_type @Int [template] +// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int = struct_value () [template] +// CHECK:STDOUT: %Int: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -58,9 +58,9 @@ var i: Int() = 0; // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: .i = %i // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: Int = import_ref ir1, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref: = import_ref ir1, inst+3, loaded [template = constants.%Int] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Int.ref: Int = name_ref Int, %import_ref [template = constants.%struct] +// CHECK:STDOUT: %Int.ref: = name_ref Int, %import_ref [template = constants.%Int] // CHECK:STDOUT: %int.make_type_32: init type = call %Int.ref() [template = i32] // CHECK:STDOUT: %.loc6_12.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc6_12.2: type = converted %int.make_type_32, %.loc6_12.1 [template = i32] diff --git a/toolchain/check/testdata/builtins/int/make_type_signed.carbon b/toolchain/check/testdata/builtins/int/make_type_signed.carbon index fcf4b6bad9ec..704621e1bdd7 100644 --- a/toolchain/check/testdata/builtins/int/make_type_signed.carbon +++ b/toolchain/check/testdata/builtins/int/make_type_signed.carbon @@ -72,11 +72,11 @@ var m: Int(1000000000); // CHECK:STDOUT: --- types.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Int: type = fn_type @Int [template] -// CHECK:STDOUT: %struct.2: Int = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] +// CHECK:STDOUT: %Int: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -85,9 +85,9 @@ var m: Int(1000000000); // CHECK:STDOUT: .Int = %Int.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Int.decl: Int = fn_decl @Int [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Int.decl: = fn_decl @Int [template = constants.%Int] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32, %.loc4_11.1 [template = i32] // CHECK:STDOUT: %n.loc4_8.1: i32 = param n @@ -103,23 +103,23 @@ var m: Int(1000000000); // CHECK:STDOUT: --- use_types.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int: type = fn_type @Int [template] +// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int = struct_value () [template] +// CHECK:STDOUT: %Int: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 64 [template] // CHECK:STDOUT: %.3: type = int_type signed, %.2 [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.4: i32 = int_literal 13 [template] // CHECK:STDOUT: %.5: type = int_type signed, %.4 [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.4: Int32 = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %N: i32 = bind_symbolic_name N 0 [symbolic] // CHECK:STDOUT: %.6: type = int_type signed, %N [symbolic] -// CHECK:STDOUT: %Symbolic: type = fn_type @Symbolic [template] -// CHECK:STDOUT: %struct.5: Symbolic = struct_value () [template] +// CHECK:STDOUT: %Symbolic.type: type = fn_type @Symbolic [template] +// CHECK:STDOUT: %Symbolic: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -130,53 +130,53 @@ var m: Int(1000000000); // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: .Symbolic = %Symbolic.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: Int = import_ref ir1, inst+14, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+14, loaded [template = constants.%Int] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %Int.ref.loc6_9: Int = name_ref Int, %import_ref.1 [template = constants.%struct.1] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %Int.ref.loc6_9: = name_ref Int, %import_ref.1 [template = constants.%Int] // CHECK:STDOUT: %.loc6_13: i32 = int_literal 64 [template = constants.%.2] // CHECK:STDOUT: %int.make_type_signed.loc6_12: init type = call %Int.ref.loc6_9(%.loc6_13) [template = constants.%.3] // CHECK:STDOUT: %.loc6_15.1: type = value_of_initializer %int.make_type_signed.loc6_12 [template = constants.%.3] // CHECK:STDOUT: %.loc6_15.2: type = converted %int.make_type_signed.loc6_12, %.loc6_15.1 [template = constants.%.3] // CHECK:STDOUT: %n.loc6_6.1: i64 = param n // CHECK:STDOUT: @F.%n: i64 = bind_name n, %n.loc6_6.1 -// CHECK:STDOUT: %Int.ref.loc6_21: Int = name_ref Int, %import_ref.1 [template = constants.%struct.1] +// CHECK:STDOUT: %Int.ref.loc6_21: = name_ref Int, %import_ref.1 [template = constants.%Int] // CHECK:STDOUT: %.loc6_25: i32 = int_literal 64 [template = constants.%.2] // CHECK:STDOUT: %int.make_type_signed.loc6_24: init type = call %Int.ref.loc6_21(%.loc6_25) [template = constants.%.3] // CHECK:STDOUT: %.loc6_27.1: type = value_of_initializer %int.make_type_signed.loc6_24 [template = constants.%.3] // CHECK:STDOUT: %.loc6_27.2: type = converted %int.make_type_signed.loc6_24, %.loc6_27.1 [template = constants.%.3] // CHECK:STDOUT: @F.%return: ref i64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { -// CHECK:STDOUT: %Int.ref.loc10_9: Int = name_ref Int, %import_ref.1 [template = constants.%struct.1] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %Int.ref.loc10_9: = name_ref Int, %import_ref.1 [template = constants.%Int] // CHECK:STDOUT: %.loc10_13: i32 = int_literal 13 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_signed.loc10_12: init type = call %Int.ref.loc10_9(%.loc10_13) [template = constants.%.5] // CHECK:STDOUT: %.loc10_15.1: type = value_of_initializer %int.make_type_signed.loc10_12 [template = constants.%.5] // CHECK:STDOUT: %.loc10_15.2: type = converted %int.make_type_signed.loc10_12, %.loc10_15.1 [template = constants.%.5] // CHECK:STDOUT: %n.loc10_6.1: i13 = param n // CHECK:STDOUT: @G.%n: i13 = bind_name n, %n.loc10_6.1 -// CHECK:STDOUT: %Int.ref.loc10_21: Int = name_ref Int, %import_ref.1 [template = constants.%struct.1] +// CHECK:STDOUT: %Int.ref.loc10_21: = name_ref Int, %import_ref.1 [template = constants.%Int] // CHECK:STDOUT: %.loc10_25: i32 = int_literal 13 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_signed.loc10_24: init type = call %Int.ref.loc10_21(%.loc10_25) [template = constants.%.5] // CHECK:STDOUT: %.loc10_27.1: type = value_of_initializer %int.make_type_signed.loc10_24 [template = constants.%.5] // CHECK:STDOUT: %.loc10_27.2: type = converted %int.make_type_signed.loc10_24, %.loc10_27.1 [template = constants.%.5] // CHECK:STDOUT: @G.%return: ref i13 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %Symbolic.decl: Symbolic = fn_decl @Symbolic [template = constants.%struct.5] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.4() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Symbolic.decl: = fn_decl @Symbolic [template = constants.%Symbolic] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_17.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_17.2: type = converted %int.make_type_32, %.loc14_17.1 [template = i32] // CHECK:STDOUT: %N.loc14_13.1: i32 = param N // CHECK:STDOUT: @Symbolic.%N: i32 = bind_symbolic_name N 0, %N.loc14_13.1 [symbolic = constants.%N] -// CHECK:STDOUT: %Int.ref.loc14_25: Int = name_ref Int, %import_ref.1 [template = constants.%struct.1] +// CHECK:STDOUT: %Int.ref.loc14_25: = name_ref Int, %import_ref.1 [template = constants.%Int] // CHECK:STDOUT: %N.ref.loc14_29: i32 = name_ref N, @Symbolic.%N [symbolic = constants.%N] // CHECK:STDOUT: %int.make_type_signed.loc14_28: init type = call %Int.ref.loc14_25(%N.ref.loc14_29) [symbolic = constants.%.6] // CHECK:STDOUT: %.loc14_30.1: type = value_of_initializer %int.make_type_signed.loc14_28 [symbolic = constants.%.6] // CHECK:STDOUT: %.loc14_30.2: type = converted %int.make_type_signed.loc14_28, %.loc14_30.1 [symbolic = constants.%.6] // CHECK:STDOUT: %x.loc14_22.1: Core.Int(N) = param x // CHECK:STDOUT: @Symbolic.%x: Core.Int(N) = bind_name x, %x.loc14_22.1 -// CHECK:STDOUT: %Int.ref.loc14_36: Int = name_ref Int, %import_ref.1 [template = constants.%struct.1] +// CHECK:STDOUT: %Int.ref.loc14_36: = name_ref Int, %import_ref.1 [template = constants.%Int] // CHECK:STDOUT: %N.ref.loc14_40: i32 = name_ref N, @Symbolic.%N [symbolic = constants.%N] // CHECK:STDOUT: %int.make_type_signed.loc14_39: init type = call %Int.ref.loc14_36(%N.ref.loc14_40) [symbolic = constants.%.6] // CHECK:STDOUT: %.loc14_41.1: type = value_of_initializer %int.make_type_signed.loc14_39 [symbolic = constants.%.6] @@ -210,9 +210,9 @@ var m: Int(1000000000); // CHECK:STDOUT: --- fail_zero_size.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int: type = fn_type @Int [template] +// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int = struct_value () [template] +// CHECK:STDOUT: %Int: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -222,9 +222,9 @@ var m: Int(1000000000); // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: .n = %n // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: Int = import_ref ir1, inst+14, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref: = import_ref ir1, inst+14, loaded [template = constants.%Int] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Int.ref: Int = name_ref Int, %import_ref [template = constants.%struct] +// CHECK:STDOUT: %Int.ref: = name_ref Int, %import_ref [template = constants.%Int] // CHECK:STDOUT: %.loc10_12: i32 = int_literal 0 [template = constants.%.2] // CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%.loc10_12) [template = ] // CHECK:STDOUT: %.loc10_13.1: type = value_of_initializer %int.make_type_signed [template = ] @@ -238,13 +238,13 @@ var m: Int(1000000000); // CHECK:STDOUT: --- fail_negative_size.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Negate: type = fn_type @Negate [template] -// CHECK:STDOUT: %struct.2: Negate = struct_value () [template] -// CHECK:STDOUT: %Int: type = fn_type @Int [template] -// CHECK:STDOUT: %struct.3: Int = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] +// CHECK:STDOUT: %Negate: = struct_value () [template] +// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] +// CHECK:STDOUT: %Int: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal -1 [template] // CHECK:STDOUT: } @@ -256,23 +256,23 @@ var m: Int(1000000000); // CHECK:STDOUT: .Negate = %Negate.decl // CHECK:STDOUT: .n = %n.loc12 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: Int = import_ref ir1, inst+14, loaded [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+14, loaded [template = constants.%Int] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Negate.decl: Negate = fn_decl @Negate [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc6_14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %int.make_type_32.loc6_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_32.loc6_14 [template = i32] // CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_32.loc6_14, %.loc6_14.1 [template = i32] // CHECK:STDOUT: %n.loc6_11.1: i32 = param n // CHECK:STDOUT: @Negate.%n: i32 = bind_name n, %n.loc6_11.1 -// CHECK:STDOUT: %int.make_type_32.loc6_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc6_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_32.loc6_22 [template = i32] // CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_32.loc6_22, %.loc6_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Int.ref: Int = name_ref Int, %import_ref.1 [template = constants.%struct.3] -// CHECK:STDOUT: %Negate.ref: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Int.ref: = name_ref Int, %import_ref.1 [template = constants.%Int] +// CHECK:STDOUT: %Negate.ref: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_19: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %int.snegate: init i32 = call %Negate.ref(%.loc12_19) [template = constants.%.3] // CHECK:STDOUT: %.loc12_11.1: i32 = value_of_initializer %int.snegate [template = constants.%.3] @@ -293,9 +293,9 @@ var m: Int(1000000000); // CHECK:STDOUT: --- fail_oversized.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int: type = fn_type @Int [template] +// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int = struct_value () [template] +// CHECK:STDOUT: %Int: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1000000000 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -305,9 +305,9 @@ var m: Int(1000000000); // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: .m = %m // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: Int = import_ref ir1, inst+14, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref: = import_ref ir1, inst+14, loaded [template = constants.%Int] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Int.ref: Int = name_ref Int, %import_ref [template = constants.%struct] +// CHECK:STDOUT: %Int.ref: = name_ref Int, %import_ref [template = constants.%Int] // CHECK:STDOUT: %.loc9_12: i32 = int_literal 1000000000 [template = constants.%.2] // CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%.loc9_12) [template = ] // CHECK:STDOUT: %.loc9_22.1: type = value_of_initializer %int.make_type_signed [template = ] diff --git a/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon b/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon index 455ef078e0ad..4765037144a1 100644 --- a/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon +++ b/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon @@ -72,11 +72,11 @@ var m: UInt(1000000000); // CHECK:STDOUT: --- types.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %UInt: type = fn_type @UInt [template] -// CHECK:STDOUT: %struct.2: UInt = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] +// CHECK:STDOUT: %UInt: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -85,9 +85,9 @@ var m: UInt(1000000000); // CHECK:STDOUT: .UInt = %UInt.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %UInt.decl: UInt = fn_decl @UInt [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %UInt.decl: = fn_decl @UInt [template = constants.%UInt] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_12.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_12.2: type = converted %int.make_type_32, %.loc4_12.1 [template = i32] // CHECK:STDOUT: %n.loc4_9.1: i32 = param n @@ -103,23 +103,23 @@ var m: UInt(1000000000); // CHECK:STDOUT: --- use_types.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %UInt: type = fn_type @UInt [template] +// CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: UInt = struct_value () [template] +// CHECK:STDOUT: %UInt: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 64 [template] // CHECK:STDOUT: %.3: type = int_type unsigned, %.2 [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.4: i32 = int_literal 13 [template] // CHECK:STDOUT: %.5: type = int_type unsigned, %.4 [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.4: Int32 = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %N: i32 = bind_symbolic_name N 0 [symbolic] // CHECK:STDOUT: %.6: type = int_type unsigned, %N [symbolic] -// CHECK:STDOUT: %Symbolic: type = fn_type @Symbolic [template] -// CHECK:STDOUT: %struct.5: Symbolic = struct_value () [template] +// CHECK:STDOUT: %Symbolic.type: type = fn_type @Symbolic [template] +// CHECK:STDOUT: %Symbolic: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -130,53 +130,53 @@ var m: UInt(1000000000); // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: .Symbolic = %Symbolic.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: UInt = import_ref ir1, inst+14, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+14, loaded [template = constants.%UInt] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %UInt.ref.loc6_9: UInt = name_ref UInt, %import_ref.1 [template = constants.%struct.1] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %UInt.ref.loc6_9: = name_ref UInt, %import_ref.1 [template = constants.%UInt] // CHECK:STDOUT: %.loc6_14: i32 = int_literal 64 [template = constants.%.2] // CHECK:STDOUT: %int.make_type_unsigned.loc6_13: init type = call %UInt.ref.loc6_9(%.loc6_14) [template = constants.%.3] // CHECK:STDOUT: %.loc6_16.1: type = value_of_initializer %int.make_type_unsigned.loc6_13 [template = constants.%.3] // CHECK:STDOUT: %.loc6_16.2: type = converted %int.make_type_unsigned.loc6_13, %.loc6_16.1 [template = constants.%.3] // CHECK:STDOUT: %n.loc6_6.1: u64 = param n // CHECK:STDOUT: @F.%n: u64 = bind_name n, %n.loc6_6.1 -// CHECK:STDOUT: %UInt.ref.loc6_22: UInt = name_ref UInt, %import_ref.1 [template = constants.%struct.1] +// CHECK:STDOUT: %UInt.ref.loc6_22: = name_ref UInt, %import_ref.1 [template = constants.%UInt] // CHECK:STDOUT: %.loc6_27: i32 = int_literal 64 [template = constants.%.2] // CHECK:STDOUT: %int.make_type_unsigned.loc6_26: init type = call %UInt.ref.loc6_22(%.loc6_27) [template = constants.%.3] // CHECK:STDOUT: %.loc6_29.1: type = value_of_initializer %int.make_type_unsigned.loc6_26 [template = constants.%.3] // CHECK:STDOUT: %.loc6_29.2: type = converted %int.make_type_unsigned.loc6_26, %.loc6_29.1 [template = constants.%.3] // CHECK:STDOUT: @F.%return: ref u64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { -// CHECK:STDOUT: %UInt.ref.loc10_9: UInt = name_ref UInt, %import_ref.1 [template = constants.%struct.1] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %UInt.ref.loc10_9: = name_ref UInt, %import_ref.1 [template = constants.%UInt] // CHECK:STDOUT: %.loc10_14: i32 = int_literal 13 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_unsigned.loc10_13: init type = call %UInt.ref.loc10_9(%.loc10_14) [template = constants.%.5] // CHECK:STDOUT: %.loc10_16.1: type = value_of_initializer %int.make_type_unsigned.loc10_13 [template = constants.%.5] // CHECK:STDOUT: %.loc10_16.2: type = converted %int.make_type_unsigned.loc10_13, %.loc10_16.1 [template = constants.%.5] // CHECK:STDOUT: %n.loc10_6.1: u13 = param n // CHECK:STDOUT: @G.%n: u13 = bind_name n, %n.loc10_6.1 -// CHECK:STDOUT: %UInt.ref.loc10_22: UInt = name_ref UInt, %import_ref.1 [template = constants.%struct.1] +// CHECK:STDOUT: %UInt.ref.loc10_22: = name_ref UInt, %import_ref.1 [template = constants.%UInt] // CHECK:STDOUT: %.loc10_27: i32 = int_literal 13 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_unsigned.loc10_26: init type = call %UInt.ref.loc10_22(%.loc10_27) [template = constants.%.5] // CHECK:STDOUT: %.loc10_29.1: type = value_of_initializer %int.make_type_unsigned.loc10_26 [template = constants.%.5] // CHECK:STDOUT: %.loc10_29.2: type = converted %int.make_type_unsigned.loc10_26, %.loc10_29.1 [template = constants.%.5] // CHECK:STDOUT: @G.%return: ref u13 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %Symbolic.decl: Symbolic = fn_decl @Symbolic [template = constants.%struct.5] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.4() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Symbolic.decl: = fn_decl @Symbolic [template = constants.%Symbolic] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_17.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_17.2: type = converted %int.make_type_32, %.loc14_17.1 [template = i32] // CHECK:STDOUT: %N.loc14_13.1: i32 = param N // CHECK:STDOUT: @Symbolic.%N: i32 = bind_symbolic_name N 0, %N.loc14_13.1 [symbolic = constants.%N] -// CHECK:STDOUT: %UInt.ref.loc14_25: UInt = name_ref UInt, %import_ref.1 [template = constants.%struct.1] +// CHECK:STDOUT: %UInt.ref.loc14_25: = name_ref UInt, %import_ref.1 [template = constants.%UInt] // CHECK:STDOUT: %N.ref.loc14_30: i32 = name_ref N, @Symbolic.%N [symbolic = constants.%N] // CHECK:STDOUT: %int.make_type_unsigned.loc14_29: init type = call %UInt.ref.loc14_25(%N.ref.loc14_30) [symbolic = constants.%.6] // CHECK:STDOUT: %.loc14_31.1: type = value_of_initializer %int.make_type_unsigned.loc14_29 [symbolic = constants.%.6] // CHECK:STDOUT: %.loc14_31.2: type = converted %int.make_type_unsigned.loc14_29, %.loc14_31.1 [symbolic = constants.%.6] // CHECK:STDOUT: %x.loc14_22.1: Core.UInt(N) = param x // CHECK:STDOUT: @Symbolic.%x: Core.UInt(N) = bind_name x, %x.loc14_22.1 -// CHECK:STDOUT: %UInt.ref.loc14_37: UInt = name_ref UInt, %import_ref.1 [template = constants.%struct.1] +// CHECK:STDOUT: %UInt.ref.loc14_37: = name_ref UInt, %import_ref.1 [template = constants.%UInt] // CHECK:STDOUT: %N.ref.loc14_42: i32 = name_ref N, @Symbolic.%N [symbolic = constants.%N] // CHECK:STDOUT: %int.make_type_unsigned.loc14_41: init type = call %UInt.ref.loc14_37(%N.ref.loc14_42) [symbolic = constants.%.6] // CHECK:STDOUT: %.loc14_43.1: type = value_of_initializer %int.make_type_unsigned.loc14_41 [symbolic = constants.%.6] @@ -210,9 +210,9 @@ var m: UInt(1000000000); // CHECK:STDOUT: --- fail_zero_size.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %UInt: type = fn_type @UInt [template] +// CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: UInt = struct_value () [template] +// CHECK:STDOUT: %UInt: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -222,9 +222,9 @@ var m: UInt(1000000000); // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: .n = %n // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: UInt = import_ref ir1, inst+14, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref: = import_ref ir1, inst+14, loaded [template = constants.%UInt] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %UInt.ref: UInt = name_ref UInt, %import_ref [template = constants.%struct] +// CHECK:STDOUT: %UInt.ref: = name_ref UInt, %import_ref [template = constants.%UInt] // CHECK:STDOUT: %.loc10_13: i32 = int_literal 0 [template = constants.%.2] // CHECK:STDOUT: %int.make_type_unsigned: init type = call %UInt.ref(%.loc10_13) [template = ] // CHECK:STDOUT: %.loc10_14.1: type = value_of_initializer %int.make_type_unsigned [template = ] @@ -238,13 +238,13 @@ var m: UInt(1000000000); // CHECK:STDOUT: --- fail_negative_size.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Negate: type = fn_type @Negate [template] -// CHECK:STDOUT: %struct.2: Negate = struct_value () [template] -// CHECK:STDOUT: %UInt: type = fn_type @UInt [template] -// CHECK:STDOUT: %struct.3: UInt = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] +// CHECK:STDOUT: %Negate: = struct_value () [template] +// CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] +// CHECK:STDOUT: %UInt: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal -1 [template] // CHECK:STDOUT: } @@ -256,23 +256,23 @@ var m: UInt(1000000000); // CHECK:STDOUT: .Negate = %Negate.decl // CHECK:STDOUT: .n = %n.loc12 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: UInt = import_ref ir1, inst+14, loaded [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+14, loaded [template = constants.%UInt] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Negate.decl: Negate = fn_decl @Negate [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc6_14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %int.make_type_32.loc6_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_32.loc6_14 [template = i32] // CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_32.loc6_14, %.loc6_14.1 [template = i32] // CHECK:STDOUT: %n.loc6_11.1: i32 = param n // CHECK:STDOUT: @Negate.%n: i32 = bind_name n, %n.loc6_11.1 -// CHECK:STDOUT: %int.make_type_32.loc6_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc6_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_32.loc6_22 [template = i32] // CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_32.loc6_22, %.loc6_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %UInt.ref: UInt = name_ref UInt, %import_ref.1 [template = constants.%struct.3] -// CHECK:STDOUT: %Negate.ref: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.2] +// CHECK:STDOUT: %UInt.ref: = name_ref UInt, %import_ref.1 [template = constants.%UInt] +// CHECK:STDOUT: %Negate.ref: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_20: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %int.snegate: init i32 = call %Negate.ref(%.loc12_20) [template = constants.%.3] // CHECK:STDOUT: %.loc12_12.1: i32 = value_of_initializer %int.snegate [template = constants.%.3] @@ -293,9 +293,9 @@ var m: UInt(1000000000); // CHECK:STDOUT: --- fail_oversized.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %UInt: type = fn_type @UInt [template] +// CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: UInt = struct_value () [template] +// CHECK:STDOUT: %UInt: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1000000000 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -305,9 +305,9 @@ var m: UInt(1000000000); // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: .m = %m // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: UInt = import_ref ir1, inst+14, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref: = import_ref ir1, inst+14, loaded [template = constants.%UInt] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %UInt.ref: UInt = name_ref UInt, %import_ref [template = constants.%struct] +// CHECK:STDOUT: %UInt.ref: = name_ref UInt, %import_ref [template = constants.%UInt] // CHECK:STDOUT: %.loc9_13: i32 = int_literal 1000000000 [template = constants.%.2] // CHECK:STDOUT: %int.make_type_unsigned: init type = call %UInt.ref(%.loc9_13) [template = ] // CHECK:STDOUT: %.loc9_23.1: type = value_of_initializer %int.make_type_unsigned [template = ] diff --git a/toolchain/check/testdata/builtins/int/neq.carbon b/toolchain/check/testdata/builtins/int/neq.carbon index cc1980d88a42..910807d64722 100644 --- a/toolchain/check/testdata/builtins/int/neq.carbon +++ b/toolchain/check/testdata/builtins/int/neq.carbon @@ -27,25 +27,25 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: --- int_neq.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.2: Bool = struct_value () [template] -// CHECK:STDOUT: %Neq: type = fn_type @Neq [template] -// CHECK:STDOUT: %struct.3: Neq = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Neq.type: type = fn_type @Neq [template] +// CHECK:STDOUT: %Neq: = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %False: type = class_type @False [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.4: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: bool = bool_literal false [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] // CHECK:STDOUT: %.7: bool = bool_literal true [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.5: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -58,28 +58,28 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %Neq.decl: Neq = fn_decl @Neq [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Neq.decl: = fn_decl @Neq [template = constants.%Neq] { +// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] // CHECK:STDOUT: %a.loc2_8.1: i32 = param a // CHECK:STDOUT: @Neq.%a: i32 = bind_name a, %a.loc2_8.1 -// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] // CHECK:STDOUT: %b.loc2_16.1: i32 = param b // CHECK:STDOUT: @Neq.%b: i32 = bind_name b, %b.loc2_16.1 -// CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %bool.make_type.loc2 [template = bool] // CHECK:STDOUT: %.loc2_27.2: type = converted %bool.make_type.loc2, %.loc2_27.1 [template = bool] // CHECK:STDOUT: @Neq.%return: ref bool = var // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: type = class_decl @True [template = constants.%True] {} // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.4] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] // CHECK:STDOUT: %true_.loc7_6.1: True = param true_ // CHECK:STDOUT: @F.%true_: True = bind_name true_, %true_.loc7_6.1 @@ -87,21 +87,21 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %false_.loc7_19.1: False = param false_ // CHECK:STDOUT: @F.%false_: False = bind_name false_, %false_.loc7_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.5] { -// CHECK:STDOUT: %int.make_type_32.loc12_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %int.make_type_32.loc12_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_19.1: type = value_of_initializer %int.make_type_32.loc12_19 [template = i32] // CHECK:STDOUT: %.loc12_19.2: type = converted %int.make_type_32.loc12_19, %.loc12_19.1 [template = i32] // CHECK:STDOUT: %a.loc12_16.1: i32 = param a // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc12_16.1 -// CHECK:STDOUT: %int.make_type_32.loc12_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_27.1: type = value_of_initializer %int.make_type_32.loc12_27 [template = i32] // CHECK:STDOUT: %.loc12_27.2: type = converted %int.make_type_32.loc12_27, %.loc12_27.1 [template = i32] // CHECK:STDOUT: %b.loc12_24.1: i32 = param b // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc12_24.1 -// CHECK:STDOUT: %bool.make_type.loc12: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc12: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_35.1: type = value_of_initializer %bool.make_type.loc12 [template = bool] // CHECK:STDOUT: %.loc12_35.2: type = converted %bool.make_type.loc12, %.loc12_35.1 [template = bool] // CHECK:STDOUT: @RuntimeCall.%return: ref bool = var @@ -127,7 +127,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: fn @F(%true_: True, %false_: False) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %false_.ref: False = name_ref false_, %false_ -// CHECK:STDOUT: %Neq.ref.loc8: Neq = name_ref Neq, file.%Neq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Neq.ref.loc8: = name_ref Neq, file.%Neq.decl [template = constants.%Neq] // CHECK:STDOUT: %.loc8_21: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc8_24: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.neq.loc8: init bool = call %Neq.ref.loc8(%.loc8_21, %.loc8_24) [template = constants.%.5] @@ -146,7 +146,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: !if.expr.result.loc8: // CHECK:STDOUT: %.loc8_14.3: type = block_arg !if.expr.result.loc8 [template = constants.%False] // CHECK:STDOUT: %true_.ref: True = name_ref true_, %true_ -// CHECK:STDOUT: %Neq.ref.loc9: Neq = name_ref Neq, file.%Neq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Neq.ref.loc9: = name_ref Neq, file.%Neq.decl [template = constants.%Neq] // CHECK:STDOUT: %.loc9_20: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc9_23: i32 = int_literal 2 [template = constants.%.6] // CHECK:STDOUT: %int.neq.loc9: init bool = call %Neq.ref.loc9(%.loc9_20, %.loc9_23) [template = constants.%.7] @@ -169,7 +169,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Neq.ref: Neq = name_ref Neq, file.%Neq.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Neq.ref: = name_ref Neq, file.%Neq.decl [template = constants.%Neq] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.neq: init bool = call %Neq.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/or.carbon b/toolchain/check/testdata/builtins/int/or.carbon index 8a38028a3728..6edd8a6677ae 100644 --- a/toolchain/check/testdata/builtins/int/or.carbon +++ b/toolchain/check/testdata/builtins/int/or.carbon @@ -22,18 +22,18 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: --- int_or.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Or: type = fn_type @Or [template] -// CHECK:STDOUT: %struct.2: Or = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Or.type: type = fn_type @Or [template] +// CHECK:STDOUT: %Or: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 12 [template] // CHECK:STDOUT: %.3: i32 = int_literal 10 [template] // CHECK:STDOUT: %.4: i32 = int_literal 14 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] // CHECK:STDOUT: %.6: type = ptr_type [i32; 14] [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.3: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -44,28 +44,28 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Or.decl: Or = fn_decl @Or [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc2_10: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Or.decl: = fn_decl @Or [template = constants.%Or] { +// CHECK:STDOUT: %int.make_type_32.loc2_10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_10.1: type = value_of_initializer %int.make_type_32.loc2_10 [template = i32] // CHECK:STDOUT: %.loc2_10.2: type = converted %int.make_type_32.loc2_10, %.loc2_10.1 [template = i32] // CHECK:STDOUT: %a.loc2_7.1: i32 = param a // CHECK:STDOUT: @Or.%a: i32 = bind_name a, %a.loc2_7.1 -// CHECK:STDOUT: %int.make_type_32.loc2_18: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_18.1: type = value_of_initializer %int.make_type_32.loc2_18 [template = i32] // CHECK:STDOUT: %.loc2_18.2: type = converted %int.make_type_32.loc2_18, %.loc2_18.1 [template = i32] // CHECK:STDOUT: %b.loc2_15.1: i32 = param b // CHECK:STDOUT: @Or.%b: i32 = bind_name b, %b.loc2_15.1 -// CHECK:STDOUT: %int.make_type_32.loc2_26: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_26.1: type = value_of_initializer %int.make_type_32.loc2_26 [template = i32] // CHECK:STDOUT: %.loc2_26.2: type = converted %int.make_type_32.loc2_26, %.loc2_26.1 [template = i32] // CHECK:STDOUT: @Or.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %Or.ref: Or = name_ref Or, %Or.decl [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %Or.ref: = name_ref Or, %Or.decl [template = constants.%Or] // CHECK:STDOUT: %.loc4_19: i32 = int_literal 12 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23: i32 = int_literal 10 [template = constants.%.3] // CHECK:STDOUT: %int.or: init i32 = call %Or.ref(%.loc4_19, %.loc4_23) [template = constants.%.4] @@ -74,8 +74,8 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %.loc4_26: type = array_type %int.or, i32 [template = constants.%.5] // CHECK:STDOUT: %arr.var: ref [i32; 14] = var arr // CHECK:STDOUT: %arr: ref [i32; 14] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 14 [template = constants.%.4] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] @@ -84,21 +84,21 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %arr.ref: ref [i32; 14] = name_ref arr, %arr // CHECK:STDOUT: %.loc5_25: [i32; 14]* = addr_of %arr.ref // CHECK:STDOUT: %arr_p: [i32; 14]* = bind_name arr_p, %.loc5_25 -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] // CHECK:STDOUT: %a.loc7_16.1: i32 = param a // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 -// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] // CHECK:STDOUT: %b.loc7_24.1: i32 = param b // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 -// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] // CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_32.loc7_35, %.loc7_35.1 [template = i32] // CHECK:STDOUT: @RuntimeCall.%return: ref i32 = var @@ -111,7 +111,7 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Or.ref: Or = name_ref Or, file.%Or.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Or.ref: = name_ref Or, file.%Or.decl [template = constants.%Or] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.or: init i32 = call %Or.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/right_shift.carbon b/toolchain/check/testdata/builtins/int/right_shift.carbon index 1b20393f9124..704289c7aff3 100644 --- a/toolchain/check/testdata/builtins/int/right_shift.carbon +++ b/toolchain/check/testdata/builtins/int/right_shift.carbon @@ -67,18 +67,18 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: --- int_right_shift.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %RightShift: type = fn_type @RightShift [template] -// CHECK:STDOUT: %struct.2: RightShift = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %RightShift.type: type = fn_type @RightShift [template] +// CHECK:STDOUT: %RightShift: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 22 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 5 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] // CHECK:STDOUT: %.6: type = ptr_type [i32; 5] [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.3: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -89,28 +89,28 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RightShift.decl: RightShift = fn_decl @RightShift [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc2_18: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RightShift.decl: = fn_decl @RightShift [template = constants.%RightShift] { +// CHECK:STDOUT: %int.make_type_32.loc2_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_18.1: type = value_of_initializer %int.make_type_32.loc2_18 [template = i32] // CHECK:STDOUT: %.loc2_18.2: type = converted %int.make_type_32.loc2_18, %.loc2_18.1 [template = i32] // CHECK:STDOUT: %a.loc2_15.1: i32 = param a // CHECK:STDOUT: @RightShift.%a: i32 = bind_name a, %a.loc2_15.1 -// CHECK:STDOUT: %int.make_type_32.loc2_26: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_26.1: type = value_of_initializer %int.make_type_32.loc2_26 [template = i32] // CHECK:STDOUT: %.loc2_26.2: type = converted %int.make_type_32.loc2_26, %.loc2_26.1 [template = i32] // CHECK:STDOUT: %b.loc2_23.1: i32 = param b // CHECK:STDOUT: @RightShift.%b: i32 = bind_name b, %b.loc2_23.1 -// CHECK:STDOUT: %int.make_type_32.loc2_34: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_34.1: type = value_of_initializer %int.make_type_32.loc2_34 [template = i32] // CHECK:STDOUT: %.loc2_34.2: type = converted %int.make_type_32.loc2_34, %.loc2_34.1 [template = i32] // CHECK:STDOUT: @RightShift.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %RightShift.ref: RightShift = name_ref RightShift, %RightShift.decl [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %RightShift.ref: = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %.loc4_27: i32 = int_literal 22 [template = constants.%.2] // CHECK:STDOUT: %.loc4_31: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.right_shift: init i32 = call %RightShift.ref(%.loc4_27, %.loc4_31) [template = constants.%.4] @@ -119,8 +119,8 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %.loc4_33: type = array_type %int.right_shift, i32 [template = constants.%.5] // CHECK:STDOUT: %arr.var: ref [i32; 5] = var arr // CHECK:STDOUT: %arr: ref [i32; 5] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 5 [template = constants.%.4] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] @@ -129,21 +129,21 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %arr.ref: ref [i32; 5] = name_ref arr, %arr // CHECK:STDOUT: %.loc5_24: [i32; 5]* = addr_of %arr.ref // CHECK:STDOUT: %arr_p: [i32; 5]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] // CHECK:STDOUT: %a.loc7_16.1: i32 = param a // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 -// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] // CHECK:STDOUT: %b.loc7_24.1: i32 = param b // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 -// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] // CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_32.loc7_35, %.loc7_35.1 [template = i32] // CHECK:STDOUT: @RuntimeCall.%return: ref i32 = var @@ -156,7 +156,7 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %RightShift.ref: RightShift = name_ref RightShift, file.%RightShift.decl [template = constants.%struct.2] +// CHECK:STDOUT: %RightShift.ref: = name_ref RightShift, file.%RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.right_shift: init i32 = call %RightShift.ref(%a.ref, %b.ref) @@ -168,13 +168,13 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: --- arith_shift.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %RightShift: type = fn_type @RightShift [template] -// CHECK:STDOUT: %struct.2: RightShift = struct_value () [template] -// CHECK:STDOUT: %Negate: type = fn_type @Negate [template] -// CHECK:STDOUT: %struct.3: Negate = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %RightShift.type: type = fn_type @RightShift [template] +// CHECK:STDOUT: %RightShift: = struct_value () [template] +// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] +// CHECK:STDOUT: %Negate: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal -1 [template] // CHECK:STDOUT: %.4: type = array_type %.2, i32 [template] @@ -197,43 +197,43 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: .arr2 = %arr2 // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RightShift.decl: RightShift = fn_decl @RightShift [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc6_18: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RightShift.decl: = fn_decl @RightShift [template = constants.%RightShift] { +// CHECK:STDOUT: %int.make_type_32.loc6_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_18.1: type = value_of_initializer %int.make_type_32.loc6_18 [template = i32] // CHECK:STDOUT: %.loc6_18.2: type = converted %int.make_type_32.loc6_18, %.loc6_18.1 [template = i32] // CHECK:STDOUT: %a.loc6_15.1: i32 = param a // CHECK:STDOUT: @RightShift.%a: i32 = bind_name a, %a.loc6_15.1 -// CHECK:STDOUT: %int.make_type_32.loc6_26: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc6_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_26.1: type = value_of_initializer %int.make_type_32.loc6_26 [template = i32] // CHECK:STDOUT: %.loc6_26.2: type = converted %int.make_type_32.loc6_26, %.loc6_26.1 [template = i32] // CHECK:STDOUT: %b.loc6_23.1: i32 = param b // CHECK:STDOUT: @RightShift.%b: i32 = bind_name b, %b.loc6_23.1 -// CHECK:STDOUT: %int.make_type_32.loc6_34: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc6_34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_34.1: type = value_of_initializer %int.make_type_32.loc6_34 [template = i32] // CHECK:STDOUT: %.loc6_34.2: type = converted %int.make_type_32.loc6_34, %.loc6_34.1 [template = i32] // CHECK:STDOUT: @RightShift.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Negate.decl: Negate = fn_decl @Negate [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc7_14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %int.make_type_32.loc7_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_14.1: type = value_of_initializer %int.make_type_32.loc7_14 [template = i32] // CHECK:STDOUT: %.loc7_14.2: type = converted %int.make_type_32.loc7_14, %.loc7_14.1 [template = i32] // CHECK:STDOUT: %a.loc7_11.1: i32 = param a // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc7_11.1 -// CHECK:STDOUT: %int.make_type_32.loc7_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_22.1: type = value_of_initializer %int.make_type_32.loc7_22 [template = i32] // CHECK:STDOUT: %.loc7_22.2: type = converted %int.make_type_32.loc7_22, %.loc7_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc10: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %Negate.ref.loc10_17: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.3] -// CHECK:STDOUT: %RightShift.ref.loc10: RightShift = name_ref RightShift, %RightShift.decl [template = constants.%struct.2] -// CHECK:STDOUT: %Negate.ref.loc10_35: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc10: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %Negate.ref.loc10_17: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %RightShift.ref.loc10: = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] +// CHECK:STDOUT: %Negate.ref.loc10_35: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc10_42: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %int.snegate.loc10_41: init i32 = call %Negate.ref.loc10_35(%.loc10_42) [template = constants.%.3] // CHECK:STDOUT: %.loc10_46: i32 = int_literal 1 [template = constants.%.2] @@ -248,8 +248,8 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %.loc10_49: type = array_type %int.snegate.loc10_23, i32 [template = constants.%.4] // CHECK:STDOUT: %arr1.var: ref [i32; 1] = var arr1 // CHECK:STDOUT: %arr1: ref [i32; 1] = bind_name arr1, %arr1.var -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_19: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_32.loc11, %.loc11_14.1 [template = i32] @@ -258,11 +258,11 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %arr1.ref: ref [i32; 1] = name_ref arr1, %arr1 // CHECK:STDOUT: %.loc11_25: [i32; 1]* = addr_of %arr1.ref // CHECK:STDOUT: %arr1_p: [i32; 1]* = bind_name arr1_p, %.loc11_25 -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %Negate.ref.loc14_17: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.3] -// CHECK:STDOUT: %RightShift.ref.loc14: RightShift = name_ref RightShift, %RightShift.decl [template = constants.%struct.2] -// CHECK:STDOUT: %Negate.ref.loc14_35: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %Negate.ref.loc14_17: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %RightShift.ref.loc14: = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] +// CHECK:STDOUT: %Negate.ref.loc14_35: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc14_42: i32 = int_literal 10 [template = constants.%.6] // CHECK:STDOUT: %int.snegate.loc14_41: init i32 = call %Negate.ref.loc14_35(%.loc14_42) [template = constants.%.7] // CHECK:STDOUT: %.loc14_47: i32 = int_literal 2 [template = constants.%.8] @@ -277,8 +277,8 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %.loc14_50: type = array_type %int.snegate.loc14_23, i32 [template = constants.%.11] // CHECK:STDOUT: %arr2.var: ref [i32; 3] = var arr2 // CHECK:STDOUT: %arr2: ref [i32; 3] = bind_name arr2, %arr2.var -// CHECK:STDOUT: %import_ref.9: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_19: i32 = int_literal 3 [template = constants.%.10] // CHECK:STDOUT: %.loc15_14.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_14.2: type = converted %int.make_type_32.loc15, %.loc15_14.1 [template = i32] @@ -298,13 +298,13 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: --- fail_bad_shift.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %RightShift: type = fn_type @RightShift [template] -// CHECK:STDOUT: %struct.2: RightShift = struct_value () [template] -// CHECK:STDOUT: %Negate: type = fn_type @Negate [template] -// CHECK:STDOUT: %struct.3: Negate = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %RightShift.type: type = fn_type @RightShift [template] +// CHECK:STDOUT: %RightShift: = struct_value () [template] +// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] +// CHECK:STDOUT: %Negate: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 31 [template] // CHECK:STDOUT: %.4: i32 = int_literal 0 [template] @@ -320,78 +320,78 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: .Negate = %Negate.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RightShift.decl: RightShift = fn_decl @RightShift [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc4_18: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RightShift.decl: = fn_decl @RightShift [template = constants.%RightShift] { +// CHECK:STDOUT: %int.make_type_32.loc4_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_18.1: type = value_of_initializer %int.make_type_32.loc4_18 [template = i32] // CHECK:STDOUT: %.loc4_18.2: type = converted %int.make_type_32.loc4_18, %.loc4_18.1 [template = i32] // CHECK:STDOUT: %a.loc4_15.1: i32 = param a // CHECK:STDOUT: @RightShift.%a: i32 = bind_name a, %a.loc4_15.1 -// CHECK:STDOUT: %int.make_type_32.loc4_26: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_26.1: type = value_of_initializer %int.make_type_32.loc4_26 [template = i32] // CHECK:STDOUT: %.loc4_26.2: type = converted %int.make_type_32.loc4_26, %.loc4_26.1 [template = i32] // CHECK:STDOUT: %b.loc4_23.1: i32 = param b // CHECK:STDOUT: @RightShift.%b: i32 = bind_name b, %b.loc4_23.1 -// CHECK:STDOUT: %int.make_type_32.loc4_34: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_34.1: type = value_of_initializer %int.make_type_32.loc4_34 [template = i32] // CHECK:STDOUT: %.loc4_34.2: type = converted %int.make_type_32.loc4_34, %.loc4_34.1 [template = i32] // CHECK:STDOUT: @RightShift.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Negate.decl: Negate = fn_decl @Negate [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc5_14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %int.make_type_32.loc5_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_14.1: type = value_of_initializer %int.make_type_32.loc5_14 [template = i32] // CHECK:STDOUT: %.loc5_14.2: type = converted %int.make_type_32.loc5_14, %.loc5_14.1 [template = i32] // CHECK:STDOUT: %a.loc5_11.1: i32 = param a // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc5_11.1 -// CHECK:STDOUT: %int.make_type_32.loc5_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc5_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_22.1: type = value_of_initializer %int.make_type_32.loc5_22 [template = i32] // CHECK:STDOUT: %.loc5_22.2: type = converted %int.make_type_32.loc5_22, %.loc5_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_13.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_13.2: type = converted %int.make_type_32.loc8, %.loc8_13.1 [template = i32] -// CHECK:STDOUT: %RightShift.ref.loc8: RightShift = name_ref RightShift, %RightShift.decl [template = constants.%struct.2] +// CHECK:STDOUT: %RightShift.ref.loc8: = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %.loc8_30: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc8_33: i32 = int_literal 31 [template = constants.%.3] // CHECK:STDOUT: %int.right_shift.loc8: init i32 = call %RightShift.ref.loc8(%.loc8_30, %.loc8_33) [template = constants.%.4] // CHECK:STDOUT: %.loc8_36.1: i32 = value_of_initializer %int.right_shift.loc8 [template = constants.%.4] // CHECK:STDOUT: %.loc8_36.2: i32 = converted %int.right_shift.loc8, %.loc8_36.1 [template = constants.%.4] // CHECK:STDOUT: %size_1: i32 = bind_name size_1, %.loc8_36.2 -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_13.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_13.2: type = converted %int.make_type_32.loc13, %.loc13_13.1 [template = i32] -// CHECK:STDOUT: %RightShift.ref.loc13: RightShift = name_ref RightShift, %RightShift.decl [template = constants.%struct.2] +// CHECK:STDOUT: %RightShift.ref.loc13: = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %.loc13_30: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc13_33: i32 = int_literal 32 [template = constants.%.5] // CHECK:STDOUT: %int.right_shift.loc13: init i32 = call %RightShift.ref.loc13(%.loc13_30, %.loc13_33) [template = ] // CHECK:STDOUT: %.loc13_36.1: i32 = value_of_initializer %int.right_shift.loc13 [template = ] // CHECK:STDOUT: %.loc13_36.2: i32 = converted %int.right_shift.loc13, %.loc13_36.1 [template = ] // CHECK:STDOUT: %size_2: i32 = bind_name size_2, %.loc13_36.2 -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_13.1: type = value_of_initializer %int.make_type_32.loc18 [template = i32] // CHECK:STDOUT: %.loc18_13.2: type = converted %int.make_type_32.loc18, %.loc18_13.1 [template = i32] -// CHECK:STDOUT: %RightShift.ref.loc18: RightShift = name_ref RightShift, %RightShift.decl [template = constants.%struct.2] +// CHECK:STDOUT: %RightShift.ref.loc18: = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %.loc18_30: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc18_33: i32 = int_literal 33 [template = constants.%.6] // CHECK:STDOUT: %int.right_shift.loc18: init i32 = call %RightShift.ref.loc18(%.loc18_30, %.loc18_33) [template = ] // CHECK:STDOUT: %.loc18_36.1: i32 = value_of_initializer %int.right_shift.loc18 [template = ] // CHECK:STDOUT: %.loc18_36.2: i32 = converted %int.right_shift.loc18, %.loc18_36.1 [template = ] // CHECK:STDOUT: %size_3: i32 = bind_name size_3, %.loc18_36.2 -// CHECK:STDOUT: %import_ref.9: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc24: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc24_15.1: type = value_of_initializer %int.make_type_32.loc24 [template = i32] // CHECK:STDOUT: %.loc24_15.2: type = converted %int.make_type_32.loc24, %.loc24_15.1 [template = i32] -// CHECK:STDOUT: %RightShift.ref.loc24: RightShift = name_ref RightShift, %RightShift.decl [template = constants.%struct.2] +// CHECK:STDOUT: %RightShift.ref.loc24: = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %.loc24_32: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %Negate.ref: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Negate.ref: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc24_42: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %int.snegate: init i32 = call %Negate.ref(%.loc24_42) [template = constants.%.7] // CHECK:STDOUT: %.loc24_31.1: i32 = value_of_initializer %int.snegate [template = constants.%.7] diff --git a/toolchain/check/testdata/builtins/int/sadd.carbon b/toolchain/check/testdata/builtins/int/sadd.carbon index 6458b63f82d9..7828ec8ddcc1 100644 --- a/toolchain/check/testdata/builtins/int/sadd.carbon +++ b/toolchain/check/testdata/builtins/int/sadd.carbon @@ -92,18 +92,18 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: --- int_add.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Add: type = fn_type @Add [template] -// CHECK:STDOUT: %struct.2: Add = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Add.type: type = fn_type @Add [template] +// CHECK:STDOUT: %Add: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 3 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] // CHECK:STDOUT: %.6: type = ptr_type [i32; 3] [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.3: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -114,28 +114,28 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Add.decl: Add = fn_decl @Add [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Add.decl: = fn_decl @Add [template = constants.%Add] { +// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] // CHECK:STDOUT: %a.loc2_8.1: i32 = param a // CHECK:STDOUT: @Add.%a: i32 = bind_name a, %a.loc2_8.1 -// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] // CHECK:STDOUT: %b.loc2_16.1: i32 = param b // CHECK:STDOUT: @Add.%b: i32 = bind_name b, %b.loc2_16.1 -// CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_32.loc2_27 [template = i32] // CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_32.loc2_27, %.loc2_27.1 [template = i32] // CHECK:STDOUT: @Add.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %Add.ref: Add = name_ref Add, %Add.decl [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %Add.ref: = name_ref Add, %Add.decl [template = constants.%Add] // CHECK:STDOUT: %.loc4_20: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.sadd: init i32 = call %Add.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] @@ -144,8 +144,8 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc4_25: type = array_type %int.sadd, i32 [template = constants.%.5] // CHECK:STDOUT: %arr.var: ref [i32; 3] = var arr // CHECK:STDOUT: %arr: ref [i32; 3] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 3 [template = constants.%.4] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] @@ -154,21 +154,21 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %arr.ref: ref [i32; 3] = name_ref arr, %arr // CHECK:STDOUT: %.loc5_24: [i32; 3]* = addr_of %arr.ref // CHECK:STDOUT: %arr_p: [i32; 3]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] // CHECK:STDOUT: %a.loc7_16.1: i32 = param a // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 -// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] // CHECK:STDOUT: %b.loc7_24.1: i32 = param b // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 -// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] // CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_32.loc7_35, %.loc7_35.1 [template = i32] // CHECK:STDOUT: @RuntimeCall.%return: ref i32 = var @@ -181,7 +181,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Add.ref: Add = name_ref Add, file.%Add.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Add.ref: = name_ref Add, file.%Add.decl [template = constants.%Add] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.sadd: init i32 = call %Add.ref(%a.ref, %b.ref) @@ -193,28 +193,28 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: --- fail_bad_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %TooFew: type = fn_type @TooFew [template] -// CHECK:STDOUT: %struct.2: TooFew = struct_value () [template] -// CHECK:STDOUT: %TooMany: type = fn_type @TooMany [template] -// CHECK:STDOUT: %struct.3: TooMany = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.4: Bool = struct_value () [template] -// CHECK:STDOUT: %BadReturnType: type = fn_type @BadReturnType [template] -// CHECK:STDOUT: %struct.5: BadReturnType = struct_value () [template] -// CHECK:STDOUT: %JustRight: type = fn_type @JustRight [template] -// CHECK:STDOUT: %struct.6: JustRight = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] +// CHECK:STDOUT: %TooFew: = struct_value () [template] +// CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] +// CHECK:STDOUT: %TooMany: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %BadReturnType.type: type = fn_type @BadReturnType [template] +// CHECK:STDOUT: %BadReturnType: = struct_value () [template] +// CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] +// CHECK:STDOUT: %JustRight: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 3 [template] -// CHECK:STDOUT: %RuntimeCallTooFew: type = fn_type @RuntimeCallTooFew [template] -// CHECK:STDOUT: %struct.7: RuntimeCallTooFew = struct_value () [template] -// CHECK:STDOUT: %RuntimeCallTooMany: type = fn_type @RuntimeCallTooMany [template] -// CHECK:STDOUT: %struct.8: RuntimeCallTooMany = struct_value () [template] -// CHECK:STDOUT: %RuntimeCallBadReturnType: type = fn_type @RuntimeCallBadReturnType [template] -// CHECK:STDOUT: %struct.9: RuntimeCallBadReturnType = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] +// CHECK:STDOUT: %RuntimeCallTooFew: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] +// CHECK:STDOUT: %RuntimeCallTooMany: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType.type: type = fn_type @RuntimeCallBadReturnType [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -233,109 +233,109 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: .RuntimeCallBadReturnType = %RuntimeCallBadReturnType.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TooFew.decl: TooFew = fn_decl @TooFew [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc8_14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %TooFew.decl: = fn_decl @TooFew [template = constants.%TooFew] { +// CHECK:STDOUT: %int.make_type_32.loc8_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_14.1: type = value_of_initializer %int.make_type_32.loc8_14 [template = i32] // CHECK:STDOUT: %.loc8_14.2: type = converted %int.make_type_32.loc8_14, %.loc8_14.1 [template = i32] // CHECK:STDOUT: %a.loc8_11.1: i32 = param a // CHECK:STDOUT: @TooFew.%a: i32 = bind_name a, %a.loc8_11.1 -// CHECK:STDOUT: %int.make_type_32.loc8_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc8_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_22.1: type = value_of_initializer %int.make_type_32.loc8_22 [template = i32] // CHECK:STDOUT: %.loc8_22.2: type = converted %int.make_type_32.loc8_22, %.loc8_22.1 [template = i32] // CHECK:STDOUT: @TooFew.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TooMany.decl: TooMany = fn_decl @TooMany [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc13_15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %TooMany.decl: = fn_decl @TooMany [template = constants.%TooMany] { +// CHECK:STDOUT: %int.make_type_32.loc13_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %int.make_type_32.loc13_15 [template = i32] // CHECK:STDOUT: %.loc13_15.2: type = converted %int.make_type_32.loc13_15, %.loc13_15.1 [template = i32] // CHECK:STDOUT: %a.loc13_12.1: i32 = param a // CHECK:STDOUT: @TooMany.%a: i32 = bind_name a, %a.loc13_12.1 -// CHECK:STDOUT: %int.make_type_32.loc13_23: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13_23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %int.make_type_32.loc13_23 [template = i32] // CHECK:STDOUT: %.loc13_23.2: type = converted %int.make_type_32.loc13_23, %.loc13_23.1 [template = i32] // CHECK:STDOUT: %b.loc13_20.1: i32 = param b // CHECK:STDOUT: @TooMany.%b: i32 = bind_name b, %b.loc13_20.1 -// CHECK:STDOUT: %int.make_type_32.loc13_31: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13_31: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_32.loc13_31 [template = i32] // CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_32.loc13_31, %.loc13_31.1 [template = i32] // CHECK:STDOUT: %c.loc13_28.1: i32 = param c // CHECK:STDOUT: @TooMany.%c: i32 = bind_name c, %c.loc13_28.1 -// CHECK:STDOUT: %int.make_type_32.loc13_39: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13_39: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_39.1: type = value_of_initializer %int.make_type_32.loc13_39 [template = i32] // CHECK:STDOUT: %.loc13_39.2: type = converted %int.make_type_32.loc13_39, %.loc13_39.1 [template = i32] // CHECK:STDOUT: @TooMany.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.9: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %BadReturnType.decl: BadReturnType = fn_decl @BadReturnType [template = constants.%struct.5] { -// CHECK:STDOUT: %int.make_type_32.loc18_21: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %BadReturnType.decl: = fn_decl @BadReturnType [template = constants.%BadReturnType] { +// CHECK:STDOUT: %int.make_type_32.loc18_21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_21.1: type = value_of_initializer %int.make_type_32.loc18_21 [template = i32] // CHECK:STDOUT: %.loc18_21.2: type = converted %int.make_type_32.loc18_21, %.loc18_21.1 [template = i32] // CHECK:STDOUT: %a.loc18_18.1: i32 = param a // CHECK:STDOUT: @BadReturnType.%a: i32 = bind_name a, %a.loc18_18.1 -// CHECK:STDOUT: %int.make_type_32.loc18_29: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc18_29: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_29.1: type = value_of_initializer %int.make_type_32.loc18_29 [template = i32] // CHECK:STDOUT: %.loc18_29.2: type = converted %int.make_type_32.loc18_29, %.loc18_29.1 [template = i32] // CHECK:STDOUT: %b.loc18_26.1: i32 = param b // CHECK:STDOUT: @BadReturnType.%b: i32 = bind_name b, %b.loc18_26.1 -// CHECK:STDOUT: %bool.make_type.loc18: init type = call constants.%struct.4() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc18: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_37.1: type = value_of_initializer %bool.make_type.loc18 [template = bool] // CHECK:STDOUT: %.loc18_37.2: type = converted %bool.make_type.loc18, %.loc18_37.1 [template = bool] // CHECK:STDOUT: @BadReturnType.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.10: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.11: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.12: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %JustRight.decl: JustRight = fn_decl @JustRight [template = constants.%struct.6] { -// CHECK:STDOUT: %int.make_type_32.loc19_17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %JustRight.decl: = fn_decl @JustRight [template = constants.%JustRight] { +// CHECK:STDOUT: %int.make_type_32.loc19_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %int.make_type_32.loc19_17 [template = i32] // CHECK:STDOUT: %.loc19_17.2: type = converted %int.make_type_32.loc19_17, %.loc19_17.1 [template = i32] // CHECK:STDOUT: %a.loc19_14.1: i32 = param a // CHECK:STDOUT: @JustRight.%a: i32 = bind_name a, %a.loc19_14.1 -// CHECK:STDOUT: %int.make_type_32.loc19_25: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc19_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_25.1: type = value_of_initializer %int.make_type_32.loc19_25 [template = i32] // CHECK:STDOUT: %.loc19_25.2: type = converted %int.make_type_32.loc19_25, %.loc19_25.1 [template = i32] // CHECK:STDOUT: %b.loc19_22.1: i32 = param b // CHECK:STDOUT: @JustRight.%b: i32 = bind_name b, %b.loc19_22.1 -// CHECK:STDOUT: %int.make_type_32.loc19_33: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc19_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_33.1: type = value_of_initializer %int.make_type_32.loc19_33 [template = i32] // CHECK:STDOUT: %.loc19_33.2: type = converted %int.make_type_32.loc19_33, %.loc19_33.1 [template = i32] // CHECK:STDOUT: @JustRight.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.13: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %TooFew.ref: TooFew = name_ref TooFew, %TooFew.decl [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %.loc25: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %TooFew.call: init i32 = call %TooFew.ref(%.loc25) // CHECK:STDOUT: %too_few.var: ref = var too_few // CHECK:STDOUT: %too_few: ref = bind_name too_few, %too_few.var -// CHECK:STDOUT: %import_ref.14: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %TooMany.ref: TooMany = name_ref TooMany, %TooMany.decl [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.14: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %.loc30_29: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc30_32: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %.loc30_35: i32 = int_literal 3 [template = constants.%.4] // CHECK:STDOUT: %TooMany.call: init i32 = call %TooMany.ref(%.loc30_29, %.loc30_32, %.loc30_35) // CHECK:STDOUT: %too_many.var: ref = var too_many // CHECK:STDOUT: %too_many: ref = bind_name too_many, %too_many.var -// CHECK:STDOUT: %import_ref.15: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc35: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %BadReturnType.ref: BadReturnType = name_ref BadReturnType, %BadReturnType.decl [template = constants.%struct.5] +// CHECK:STDOUT: %import_ref.15: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc35: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %.loc35_42: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc35_45: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35_42, %.loc35_45) // CHECK:STDOUT: %bad_return_type.var: ref = var bad_return_type // CHECK:STDOUT: %bad_return_type: ref = bind_name bad_return_type, %bad_return_type.var -// CHECK:STDOUT: %import_ref.16: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc44: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %JustRight.ref: JustRight = name_ref JustRight, %JustRight.decl [template = constants.%struct.6] +// CHECK:STDOUT: %import_ref.16: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc44: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %JustRight.ref: = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] // CHECK:STDOUT: %.loc44_31: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc44_34: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %.loc44_37: i32 = int_literal 3 [template = constants.%.4] @@ -345,59 +345,59 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc44_39: type = array_type %int.sadd, i32 [template = ] // CHECK:STDOUT: %bad_call.var: ref = var bad_call // CHECK:STDOUT: %bad_call: ref = bind_name bad_call, %bad_call.var -// CHECK:STDOUT: %import_ref.17: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.18: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCallTooFew.decl: RuntimeCallTooFew = fn_decl @RuntimeCallTooFew [template = constants.%struct.7] { -// CHECK:STDOUT: %int.make_type_32.loc46_25: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.17: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.18: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCallTooFew.decl: = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { +// CHECK:STDOUT: %int.make_type_32.loc46_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc46_25.1: type = value_of_initializer %int.make_type_32.loc46_25 [template = i32] // CHECK:STDOUT: %.loc46_25.2: type = converted %int.make_type_32.loc46_25, %.loc46_25.1 [template = i32] // CHECK:STDOUT: %a.loc46_22.1: i32 = param a // CHECK:STDOUT: @RuntimeCallTooFew.%a: i32 = bind_name a, %a.loc46_22.1 -// CHECK:STDOUT: %int.make_type_32.loc46_33: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc46_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc46_33.1: type = value_of_initializer %int.make_type_32.loc46_33 [template = i32] // CHECK:STDOUT: %.loc46_33.2: type = converted %int.make_type_32.loc46_33, %.loc46_33.1 [template = i32] // CHECK:STDOUT: @RuntimeCallTooFew.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.19: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.20: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.21: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.22: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCallTooMany.decl: RuntimeCallTooMany = fn_decl @RuntimeCallTooMany [template = constants.%struct.8] { -// CHECK:STDOUT: %int.make_type_32.loc50_26: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.19: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.20: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.21: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.22: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCallTooMany.decl: = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { +// CHECK:STDOUT: %int.make_type_32.loc50_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc50_26.1: type = value_of_initializer %int.make_type_32.loc50_26 [template = i32] // CHECK:STDOUT: %.loc50_26.2: type = converted %int.make_type_32.loc50_26, %.loc50_26.1 [template = i32] // CHECK:STDOUT: %a.loc50_23.1: i32 = param a // CHECK:STDOUT: @RuntimeCallTooMany.%a: i32 = bind_name a, %a.loc50_23.1 -// CHECK:STDOUT: %int.make_type_32.loc50_34: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc50_34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc50_34.1: type = value_of_initializer %int.make_type_32.loc50_34 [template = i32] // CHECK:STDOUT: %.loc50_34.2: type = converted %int.make_type_32.loc50_34, %.loc50_34.1 [template = i32] // CHECK:STDOUT: %b.loc50_31.1: i32 = param b // CHECK:STDOUT: @RuntimeCallTooMany.%b: i32 = bind_name b, %b.loc50_31.1 -// CHECK:STDOUT: %int.make_type_32.loc50_42: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc50_42: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc50_42.1: type = value_of_initializer %int.make_type_32.loc50_42 [template = i32] // CHECK:STDOUT: %.loc50_42.2: type = converted %int.make_type_32.loc50_42, %.loc50_42.1 [template = i32] // CHECK:STDOUT: %c.loc50_39.1: i32 = param c // CHECK:STDOUT: @RuntimeCallTooMany.%c: i32 = bind_name c, %c.loc50_39.1 -// CHECK:STDOUT: %int.make_type_32.loc50_50: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc50_50: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc50_50.1: type = value_of_initializer %int.make_type_32.loc50_50 [template = i32] // CHECK:STDOUT: %.loc50_50.2: type = converted %int.make_type_32.loc50_50, %.loc50_50.1 [template = i32] // CHECK:STDOUT: @RuntimeCallTooMany.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.23: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.24: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.25: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: RuntimeCallBadReturnType = fn_decl @RuntimeCallBadReturnType [template = constants.%struct.9] { -// CHECK:STDOUT: %int.make_type_32.loc54_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.23: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.24: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.25: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { +// CHECK:STDOUT: %int.make_type_32.loc54_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc54_32.1: type = value_of_initializer %int.make_type_32.loc54_32 [template = i32] // CHECK:STDOUT: %.loc54_32.2: type = converted %int.make_type_32.loc54_32, %.loc54_32.1 [template = i32] // CHECK:STDOUT: %a.loc54_29.1: i32 = param a // CHECK:STDOUT: @RuntimeCallBadReturnType.%a: i32 = bind_name a, %a.loc54_29.1 -// CHECK:STDOUT: %int.make_type_32.loc54_40: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc54_40: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc54_40.1: type = value_of_initializer %int.make_type_32.loc54_40 [template = i32] // CHECK:STDOUT: %.loc54_40.2: type = converted %int.make_type_32.loc54_40, %.loc54_40.1 [template = i32] // CHECK:STDOUT: %b.loc54_37.1: i32 = param b // CHECK:STDOUT: @RuntimeCallBadReturnType.%b: i32 = bind_name b, %b.loc54_37.1 -// CHECK:STDOUT: %bool.make_type.loc54: init type = call constants.%struct.4() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc54: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc54_48.1: type = value_of_initializer %bool.make_type.loc54 [template = bool] // CHECK:STDOUT: %.loc54_48.2: type = converted %bool.make_type.loc54, %.loc54_48.1 [template = bool] // CHECK:STDOUT: @RuntimeCallBadReturnType.%return: ref bool = var @@ -418,7 +418,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooFew(%a: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooFew.ref: TooFew = name_ref TooFew, file.%TooFew.decl [template = constants.%struct.2] +// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %TooFew.call: init i32 = call %TooFew.ref(%a.ref) // CHECK:STDOUT: %.loc47_19.1: i32 = value_of_initializer %TooFew.call @@ -428,7 +428,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooMany(%a: i32, %b: i32, %c: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooMany.ref: TooMany = name_ref TooMany, file.%TooMany.decl [template = constants.%struct.3] +// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %c.ref: i32 = name_ref c, %c @@ -440,7 +440,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallBadReturnType(%a: i32, %b: i32) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %BadReturnType.ref: BadReturnType = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%struct.5] +// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%a.ref, %b.ref) @@ -452,11 +452,11 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: --- fail_overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Add: type = fn_type @Add [template] -// CHECK:STDOUT: %struct.2: Add = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Add.type: type = fn_type @Add [template] +// CHECK:STDOUT: %Add: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 2147483647 [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] @@ -469,41 +469,41 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: .Add = %Add.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Add.decl: Add = fn_decl @Add [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Add.decl: = fn_decl @Add [template = constants.%Add] { +// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] // CHECK:STDOUT: %a.loc4_8.1: i32 = param a // CHECK:STDOUT: @Add.%a: i32 = bind_name a, %a.loc4_8.1 -// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] // CHECK:STDOUT: %b.loc4_16.1: i32 = param b // CHECK:STDOUT: @Add.%b: i32 = bind_name b, %b.loc4_16.1 -// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Add.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_32.loc6, %.loc6_8.1 [template = i32] -// CHECK:STDOUT: %Add.ref.loc6: Add = name_ref Add, %Add.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Add.ref.loc6: = name_ref Add, %Add.decl [template = constants.%Add] // CHECK:STDOUT: %.loc6_18: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %.loc6_30: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %int.sadd.loc6: init i32 = call %Add.ref.loc6(%.loc6_18, %.loc6_30) [template = constants.%.2] // CHECK:STDOUT: %.loc6_32.1: i32 = value_of_initializer %int.sadd.loc6 [template = constants.%.2] // CHECK:STDOUT: %.loc6_32.2: i32 = converted %int.sadd.loc6, %.loc6_32.1 [template = constants.%.2] // CHECK:STDOUT: %a.loc6: i32 = bind_name a, %.loc6_32.2 -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc10: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc10_8.1: type = value_of_initializer %int.make_type_32.loc10 [template = i32] // CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_32.loc10, %.loc10_8.1 [template = i32] -// CHECK:STDOUT: %Add.ref.loc10: Add = name_ref Add, %Add.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Add.ref.loc10: = name_ref Add, %Add.decl [template = constants.%Add] // CHECK:STDOUT: %.loc10_18: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %.loc10_30: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.sadd.loc10: init i32 = call %Add.ref.loc10(%.loc10_18, %.loc10_30) [template = constants.%.5] diff --git a/toolchain/check/testdata/builtins/int/sdiv.carbon b/toolchain/check/testdata/builtins/int/sdiv.carbon index f4a764e30f19..0ef225e41e82 100644 --- a/toolchain/check/testdata/builtins/int/sdiv.carbon +++ b/toolchain/check/testdata/builtins/int/sdiv.carbon @@ -60,18 +60,18 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: --- int_div.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Div: type = fn_type @Div [template] -// CHECK:STDOUT: %struct.2: Div = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Div.type: type = fn_type @Div [template] +// CHECK:STDOUT: %Div: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] // CHECK:STDOUT: %.6: type = ptr_type [i32; 1] [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.3: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -82,28 +82,28 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Div.decl: Div = fn_decl @Div [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Div.decl: = fn_decl @Div [template = constants.%Div] { +// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] // CHECK:STDOUT: %a.loc2_8.1: i32 = param a // CHECK:STDOUT: @Div.%a: i32 = bind_name a, %a.loc2_8.1 -// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] // CHECK:STDOUT: %b.loc2_16.1: i32 = param b // CHECK:STDOUT: @Div.%b: i32 = bind_name b, %b.loc2_16.1 -// CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_32.loc2_27 [template = i32] // CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_32.loc2_27, %.loc2_27.1 [template = i32] // CHECK:STDOUT: @Div.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %Div.ref: Div = name_ref Div, %Div.decl [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %Div.ref: = name_ref Div, %Div.decl [template = constants.%Div] // CHECK:STDOUT: %.loc4_20: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.sdiv: init i32 = call %Div.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] @@ -112,8 +112,8 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %.loc4_25: type = array_type %int.sdiv, i32 [template = constants.%.5] // CHECK:STDOUT: %arr.var: ref [i32; 1] = var arr // CHECK:STDOUT: %arr: ref [i32; 1] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] @@ -122,21 +122,21 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %arr.ref: ref [i32; 1] = name_ref arr, %arr // CHECK:STDOUT: %.loc5_24: [i32; 1]* = addr_of %arr.ref // CHECK:STDOUT: %arr_p: [i32; 1]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] // CHECK:STDOUT: %a.loc7_16.1: i32 = param a // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 -// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] // CHECK:STDOUT: %b.loc7_24.1: i32 = param b // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 -// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] // CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_32.loc7_35, %.loc7_35.1 [template = i32] // CHECK:STDOUT: @RuntimeCall.%return: ref i32 = var @@ -149,7 +149,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Div.ref: Div = name_ref Div, file.%Div.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Div.ref: = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.sdiv: init i32 = call %Div.ref(%a.ref, %b.ref) @@ -161,15 +161,15 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: --- fail_overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Div: type = fn_type @Div [template] -// CHECK:STDOUT: %struct.2: Div = struct_value () [template] -// CHECK:STDOUT: %Sub: type = fn_type @Sub [template] -// CHECK:STDOUT: %struct.3: Sub = struct_value () [template] -// CHECK:STDOUT: %Negate: type = fn_type @Negate [template] -// CHECK:STDOUT: %struct.4: Negate = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Div.type: type = fn_type @Div [template] +// CHECK:STDOUT: %Div: = struct_value () [template] +// CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] +// CHECK:STDOUT: %Sub: = struct_value () [template] +// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] +// CHECK:STDOUT: %Negate: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 2147483647 [template] // CHECK:STDOUT: %.3: i32 = int_literal -2147483647 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] @@ -185,66 +185,66 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: .Negate = %Negate.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Div.decl: Div = fn_decl @Div [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Div.decl: = fn_decl @Div [template = constants.%Div] { +// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] // CHECK:STDOUT: %a.loc4_8.1: i32 = param a // CHECK:STDOUT: @Div.%a: i32 = bind_name a, %a.loc4_8.1 -// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] // CHECK:STDOUT: %b.loc4_16.1: i32 = param b // CHECK:STDOUT: @Div.%b: i32 = bind_name b, %b.loc4_16.1 -// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Div.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Sub.decl: Sub = fn_decl @Sub [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Sub.decl: = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_32.loc5_11 [template = i32] // CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_32.loc5_11, %.loc5_11.1 [template = i32] // CHECK:STDOUT: %a.loc5_8.1: i32 = param a // CHECK:STDOUT: @Sub.%a: i32 = bind_name a, %a.loc5_8.1 -// CHECK:STDOUT: %int.make_type_32.loc5_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc5_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_32.loc5_19 [template = i32] // CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_32.loc5_19, %.loc5_19.1 [template = i32] // CHECK:STDOUT: %b.loc5_16.1: i32 = param b // CHECK:STDOUT: @Sub.%b: i32 = bind_name b, %b.loc5_16.1 -// CHECK:STDOUT: %int.make_type_32.loc5_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc5_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_27.1: type = value_of_initializer %int.make_type_32.loc5_27 [template = i32] // CHECK:STDOUT: %.loc5_27.2: type = converted %int.make_type_32.loc5_27, %.loc5_27.1 [template = i32] // CHECK:STDOUT: @Sub.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Negate.decl: Negate = fn_decl @Negate [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32.loc6_14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %int.make_type_32.loc6_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_32.loc6_14 [template = i32] // CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_32.loc6_14, %.loc6_14.1 [template = i32] // CHECK:STDOUT: %a.loc6_11.1: i32 = param a // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc6_11.1 -// CHECK:STDOUT: %int.make_type_32.loc6_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc6_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_32.loc6_22 [template = i32] // CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_32.loc6_22, %.loc6_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc9: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_32.loc9 [template = i32] // CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_32.loc9, %.loc9_8.1 [template = i32] -// CHECK:STDOUT: %Div.ref.loc9: Div = name_ref Div, %Div.decl [template = constants.%struct.2] -// CHECK:STDOUT: %Negate.ref.loc9_18: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Div.ref.loc9: = name_ref Div, %Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Negate.ref.loc9_18: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc9_25: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %int.snegate.loc9_24: init i32 = call %Negate.ref.loc9_18(%.loc9_25) [template = constants.%.3] -// CHECK:STDOUT: %Negate.ref.loc9_39: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Negate.ref.loc9_39: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc9_46: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.snegate.loc9_45: init i32 = call %Negate.ref.loc9_39(%.loc9_46) [template = constants.%.5] // CHECK:STDOUT: %.loc9_17.1: i32 = value_of_initializer %int.snegate.loc9_24 [template = constants.%.3] @@ -255,13 +255,13 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %.loc9_49.1: i32 = value_of_initializer %int.sdiv.loc9 [template = constants.%.2] // CHECK:STDOUT: %.loc9_49.2: i32 = converted %int.sdiv.loc9, %.loc9_49.1 [template = constants.%.2] // CHECK:STDOUT: %a.loc9: i32 = bind_name a, %.loc9_49.2 -// CHECK:STDOUT: %import_ref.10: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_32.loc12, %.loc12_8.1 [template = i32] -// CHECK:STDOUT: %Div.ref.loc12: Div = name_ref Div, %Div.decl [template = constants.%struct.2] -// CHECK:STDOUT: %Sub.ref.loc12: Sub = name_ref Sub, %Sub.decl [template = constants.%struct.3] -// CHECK:STDOUT: %Negate.ref.loc12: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Div.ref.loc12: = name_ref Div, %Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Sub.ref.loc12: = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc12: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_29: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %int.snegate.loc12: init i32 = call %Negate.ref.loc12(%.loc12_29) [template = constants.%.3] // CHECK:STDOUT: %.loc12_43: i32 = int_literal 1 [template = constants.%.4] @@ -275,20 +275,20 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %.loc12_49.1: i32 = value_of_initializer %int.sdiv.loc12 [template = constants.%.6] // CHECK:STDOUT: %.loc12_49.2: i32 = converted %int.sdiv.loc12, %.loc12_49.1 [template = constants.%.6] // CHECK:STDOUT: %b.loc12: i32 = bind_name b, %.loc12_49.2 -// CHECK:STDOUT: %import_ref.11: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_8.1: type = value_of_initializer %int.make_type_32.loc19 [template = i32] // CHECK:STDOUT: %.loc19_8.2: type = converted %int.make_type_32.loc19, %.loc19_8.1 [template = i32] -// CHECK:STDOUT: %Div.ref.loc19: Div = name_ref Div, %Div.decl [template = constants.%struct.2] -// CHECK:STDOUT: %Sub.ref.loc19: Sub = name_ref Sub, %Sub.decl [template = constants.%struct.3] -// CHECK:STDOUT: %Negate.ref.loc19_22: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Div.ref.loc19: = name_ref Div, %Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Sub.ref.loc19: = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc19_22: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc19_29: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %int.snegate.loc19_28: init i32 = call %Negate.ref.loc19_22(%.loc19_29) [template = constants.%.3] // CHECK:STDOUT: %.loc19_43: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc19_21.1: i32 = value_of_initializer %int.snegate.loc19_28 [template = constants.%.3] // CHECK:STDOUT: %.loc19_21.2: i32 = converted %int.snegate.loc19_28, %.loc19_21.1 [template = constants.%.3] // CHECK:STDOUT: %int.ssub.loc19: init i32 = call %Sub.ref.loc19(%.loc19_21.2, %.loc19_43) [template = constants.%.6] -// CHECK:STDOUT: %Negate.ref.loc19_47: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Negate.ref.loc19_47: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc19_54: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.snegate.loc19_53: init i32 = call %Negate.ref.loc19_47(%.loc19_54) [template = constants.%.5] // CHECK:STDOUT: %.loc19_17.1: i32 = value_of_initializer %int.ssub.loc19 [template = constants.%.6] @@ -312,11 +312,11 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: --- fail_div_by_zero.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Div: type = fn_type @Div [template] -// CHECK:STDOUT: %struct.2: Div = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Div.type: type = fn_type @Div [template] +// CHECK:STDOUT: %Div: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: } @@ -327,41 +327,41 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: .Div = %Div.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Div.decl: Div = fn_decl @Div [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Div.decl: = fn_decl @Div [template = constants.%Div] { +// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] // CHECK:STDOUT: %a.loc4_8.1: i32 = param a // CHECK:STDOUT: @Div.%a: i32 = bind_name a, %a.loc4_8.1 -// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] // CHECK:STDOUT: %b.loc4_16.1: i32 = param b // CHECK:STDOUT: @Div.%b: i32 = bind_name b, %b.loc4_16.1 -// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Div.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc10: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc10_8.1: type = value_of_initializer %int.make_type_32.loc10 [template = i32] // CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_32.loc10, %.loc10_8.1 [template = i32] -// CHECK:STDOUT: %Div.ref.loc10: Div = name_ref Div, %Div.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Div.ref.loc10: = name_ref Div, %Div.decl [template = constants.%Div] // CHECK:STDOUT: %.loc10_18: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc10_21: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %int.sdiv.loc10: init i32 = call %Div.ref.loc10(%.loc10_18, %.loc10_21) [template = ] // CHECK:STDOUT: %.loc10_23.1: i32 = value_of_initializer %int.sdiv.loc10 [template = ] // CHECK:STDOUT: %.loc10_23.2: i32 = converted %int.sdiv.loc10, %.loc10_23.1 [template = ] // CHECK:STDOUT: %a.loc10: i32 = bind_name a, %.loc10_23.2 -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_32.loc15, %.loc15_8.1 [template = i32] -// CHECK:STDOUT: %Div.ref.loc15: Div = name_ref Div, %Div.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Div.ref.loc15: = name_ref Div, %Div.decl [template = constants.%Div] // CHECK:STDOUT: %.loc15_18: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %.loc15_21: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %int.sdiv.loc15: init i32 = call %Div.ref.loc15(%.loc15_18, %.loc15_21) [template = ] diff --git a/toolchain/check/testdata/builtins/int/smod.carbon b/toolchain/check/testdata/builtins/int/smod.carbon index 3f989a6c3dda..73d88eba3eb1 100644 --- a/toolchain/check/testdata/builtins/int/smod.carbon +++ b/toolchain/check/testdata/builtins/int/smod.carbon @@ -63,18 +63,18 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: --- int_div.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Mod: type = fn_type @Mod [template] -// CHECK:STDOUT: %struct.2: Mod = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Mod.type: type = fn_type @Mod [template] +// CHECK:STDOUT: %Mod: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 5 [template] // CHECK:STDOUT: %.3: i32 = int_literal 3 [template] // CHECK:STDOUT: %.4: i32 = int_literal 2 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] // CHECK:STDOUT: %.6: type = ptr_type [i32; 2] [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.3: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -85,28 +85,28 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Mod.decl: Mod = fn_decl @Mod [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Mod.decl: = fn_decl @Mod [template = constants.%Mod] { +// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] // CHECK:STDOUT: %a.loc2_8.1: i32 = param a // CHECK:STDOUT: @Mod.%a: i32 = bind_name a, %a.loc2_8.1 -// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] // CHECK:STDOUT: %b.loc2_16.1: i32 = param b // CHECK:STDOUT: @Mod.%b: i32 = bind_name b, %b.loc2_16.1 -// CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_32.loc2_27 [template = i32] // CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_32.loc2_27, %.loc2_27.1 [template = i32] // CHECK:STDOUT: @Mod.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %Mod.ref: Mod = name_ref Mod, %Mod.decl [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %Mod.ref: = name_ref Mod, %Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %.loc4_20: i32 = int_literal 5 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23: i32 = int_literal 3 [template = constants.%.3] // CHECK:STDOUT: %int.smod: init i32 = call %Mod.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] @@ -115,8 +115,8 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %.loc4_25: type = array_type %int.smod, i32 [template = constants.%.5] // CHECK:STDOUT: %arr.var: ref [i32; 2] = var arr // CHECK:STDOUT: %arr: ref [i32; 2] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 2 [template = constants.%.4] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] @@ -125,21 +125,21 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %arr.ref: ref [i32; 2] = name_ref arr, %arr // CHECK:STDOUT: %.loc5_24: [i32; 2]* = addr_of %arr.ref // CHECK:STDOUT: %arr_p: [i32; 2]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] // CHECK:STDOUT: %a.loc7_16.1: i32 = param a // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 -// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] // CHECK:STDOUT: %b.loc7_24.1: i32 = param b // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 -// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] // CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_32.loc7_35, %.loc7_35.1 [template = i32] // CHECK:STDOUT: @RuntimeCall.%return: ref i32 = var @@ -152,7 +152,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mod.ref: Mod = name_ref Mod, file.%Mod.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Mod.ref: = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.smod: init i32 = call %Mod.ref(%a.ref, %b.ref) @@ -164,15 +164,15 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: --- fail_overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Mod: type = fn_type @Mod [template] -// CHECK:STDOUT: %struct.2: Mod = struct_value () [template] -// CHECK:STDOUT: %Sub: type = fn_type @Sub [template] -// CHECK:STDOUT: %struct.3: Sub = struct_value () [template] -// CHECK:STDOUT: %Negate: type = fn_type @Negate [template] -// CHECK:STDOUT: %struct.4: Negate = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Mod.type: type = fn_type @Mod [template] +// CHECK:STDOUT: %Mod: = struct_value () [template] +// CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] +// CHECK:STDOUT: %Sub: = struct_value () [template] +// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] +// CHECK:STDOUT: %Negate: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 2147483647 [template] // CHECK:STDOUT: %.3: i32 = int_literal -2147483647 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] @@ -189,66 +189,66 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: .Negate = %Negate.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Mod.decl: Mod = fn_decl @Mod [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Mod.decl: = fn_decl @Mod [template = constants.%Mod] { +// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] // CHECK:STDOUT: %a.loc4_8.1: i32 = param a // CHECK:STDOUT: @Mod.%a: i32 = bind_name a, %a.loc4_8.1 -// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] // CHECK:STDOUT: %b.loc4_16.1: i32 = param b // CHECK:STDOUT: @Mod.%b: i32 = bind_name b, %b.loc4_16.1 -// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Mod.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Sub.decl: Sub = fn_decl @Sub [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Sub.decl: = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_32.loc5_11 [template = i32] // CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_32.loc5_11, %.loc5_11.1 [template = i32] // CHECK:STDOUT: %a.loc5_8.1: i32 = param a // CHECK:STDOUT: @Sub.%a: i32 = bind_name a, %a.loc5_8.1 -// CHECK:STDOUT: %int.make_type_32.loc5_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc5_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_32.loc5_19 [template = i32] // CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_32.loc5_19, %.loc5_19.1 [template = i32] // CHECK:STDOUT: %b.loc5_16.1: i32 = param b // CHECK:STDOUT: @Sub.%b: i32 = bind_name b, %b.loc5_16.1 -// CHECK:STDOUT: %int.make_type_32.loc5_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc5_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_27.1: type = value_of_initializer %int.make_type_32.loc5_27 [template = i32] // CHECK:STDOUT: %.loc5_27.2: type = converted %int.make_type_32.loc5_27, %.loc5_27.1 [template = i32] // CHECK:STDOUT: @Sub.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Negate.decl: Negate = fn_decl @Negate [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32.loc6_14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %int.make_type_32.loc6_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_32.loc6_14 [template = i32] // CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_32.loc6_14, %.loc6_14.1 [template = i32] // CHECK:STDOUT: %a.loc6_11.1: i32 = param a // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc6_11.1 -// CHECK:STDOUT: %int.make_type_32.loc6_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc6_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_32.loc6_22 [template = i32] // CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_32.loc6_22, %.loc6_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc9: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_32.loc9 [template = i32] // CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_32.loc9, %.loc9_8.1 [template = i32] -// CHECK:STDOUT: %Mod.ref.loc9: Mod = name_ref Mod, %Mod.decl [template = constants.%struct.2] -// CHECK:STDOUT: %Negate.ref.loc9_18: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Mod.ref.loc9: = name_ref Mod, %Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Negate.ref.loc9_18: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc9_25: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %int.snegate.loc9_24: init i32 = call %Negate.ref.loc9_18(%.loc9_25) [template = constants.%.3] -// CHECK:STDOUT: %Negate.ref.loc9_39: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Negate.ref.loc9_39: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc9_46: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.snegate.loc9_45: init i32 = call %Negate.ref.loc9_39(%.loc9_46) [template = constants.%.5] // CHECK:STDOUT: %.loc9_17.1: i32 = value_of_initializer %int.snegate.loc9_24 [template = constants.%.3] @@ -259,13 +259,13 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %.loc9_49.1: i32 = value_of_initializer %int.smod.loc9 [template = constants.%.6] // CHECK:STDOUT: %.loc9_49.2: i32 = converted %int.smod.loc9, %.loc9_49.1 [template = constants.%.6] // CHECK:STDOUT: %a.loc9: i32 = bind_name a, %.loc9_49.2 -// CHECK:STDOUT: %import_ref.10: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_32.loc12, %.loc12_8.1 [template = i32] -// CHECK:STDOUT: %Mod.ref.loc12: Mod = name_ref Mod, %Mod.decl [template = constants.%struct.2] -// CHECK:STDOUT: %Sub.ref.loc12: Sub = name_ref Sub, %Sub.decl [template = constants.%struct.3] -// CHECK:STDOUT: %Negate.ref.loc12: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Mod.ref.loc12: = name_ref Mod, %Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Sub.ref.loc12: = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc12: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_29: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %int.snegate.loc12: init i32 = call %Negate.ref.loc12(%.loc12_29) [template = constants.%.3] // CHECK:STDOUT: %.loc12_43: i32 = int_literal 1 [template = constants.%.4] @@ -279,20 +279,20 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %.loc12_49.1: i32 = value_of_initializer %int.smod.loc12 [template = constants.%.6] // CHECK:STDOUT: %.loc12_49.2: i32 = converted %int.smod.loc12, %.loc12_49.1 [template = constants.%.6] // CHECK:STDOUT: %b.loc12: i32 = bind_name b, %.loc12_49.2 -// CHECK:STDOUT: %import_ref.11: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc20_8.1: type = value_of_initializer %int.make_type_32.loc20 [template = i32] // CHECK:STDOUT: %.loc20_8.2: type = converted %int.make_type_32.loc20, %.loc20_8.1 [template = i32] -// CHECK:STDOUT: %Mod.ref.loc20: Mod = name_ref Mod, %Mod.decl [template = constants.%struct.2] -// CHECK:STDOUT: %Sub.ref.loc20: Sub = name_ref Sub, %Sub.decl [template = constants.%struct.3] -// CHECK:STDOUT: %Negate.ref.loc20_22: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Mod.ref.loc20: = name_ref Mod, %Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Sub.ref.loc20: = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc20_22: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc20_29: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %int.snegate.loc20_28: init i32 = call %Negate.ref.loc20_22(%.loc20_29) [template = constants.%.3] // CHECK:STDOUT: %.loc20_43: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc20_21.1: i32 = value_of_initializer %int.snegate.loc20_28 [template = constants.%.3] // CHECK:STDOUT: %.loc20_21.2: i32 = converted %int.snegate.loc20_28, %.loc20_21.1 [template = constants.%.3] // CHECK:STDOUT: %int.ssub.loc20: init i32 = call %Sub.ref.loc20(%.loc20_21.2, %.loc20_43) [template = constants.%.7] -// CHECK:STDOUT: %Negate.ref.loc20_47: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Negate.ref.loc20_47: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc20_54: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.snegate.loc20_53: init i32 = call %Negate.ref.loc20_47(%.loc20_54) [template = constants.%.5] // CHECK:STDOUT: %.loc20_17.1: i32 = value_of_initializer %int.ssub.loc20 [template = constants.%.7] @@ -316,11 +316,11 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: --- fail_div_by_zero.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Mod: type = fn_type @Mod [template] -// CHECK:STDOUT: %struct.2: Mod = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Mod.type: type = fn_type @Mod [template] +// CHECK:STDOUT: %Mod: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: } @@ -331,41 +331,41 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: .Mod = %Mod.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Mod.decl: Mod = fn_decl @Mod [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Mod.decl: = fn_decl @Mod [template = constants.%Mod] { +// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] // CHECK:STDOUT: %a.loc4_8.1: i32 = param a // CHECK:STDOUT: @Mod.%a: i32 = bind_name a, %a.loc4_8.1 -// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] // CHECK:STDOUT: %b.loc4_16.1: i32 = param b // CHECK:STDOUT: @Mod.%b: i32 = bind_name b, %b.loc4_16.1 -// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Mod.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_32.loc12, %.loc12_8.1 [template = i32] -// CHECK:STDOUT: %Mod.ref.loc12: Mod = name_ref Mod, %Mod.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Mod.ref.loc12: = name_ref Mod, %Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %.loc12_18: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc12_21: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %int.smod.loc12: init i32 = call %Mod.ref.loc12(%.loc12_18, %.loc12_21) [template = ] // CHECK:STDOUT: %.loc12_23.1: i32 = value_of_initializer %int.smod.loc12 [template = ] // CHECK:STDOUT: %.loc12_23.2: i32 = converted %int.smod.loc12, %.loc12_23.1 [template = ] // CHECK:STDOUT: %a.loc12: i32 = bind_name a, %.loc12_23.2 -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_8.1: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_8.2: type = converted %int.make_type_32.loc17, %.loc17_8.1 [template = i32] -// CHECK:STDOUT: %Mod.ref.loc17: Mod = name_ref Mod, %Mod.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Mod.ref.loc17: = name_ref Mod, %Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %.loc17_18: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %.loc17_21: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %int.smod.loc17: init i32 = call %Mod.ref.loc17(%.loc17_18, %.loc17_21) [template = ] diff --git a/toolchain/check/testdata/builtins/int/smul.carbon b/toolchain/check/testdata/builtins/int/smul.carbon index 0a78b89c3d82..0e1c99d0a9bc 100644 --- a/toolchain/check/testdata/builtins/int/smul.carbon +++ b/toolchain/check/testdata/builtins/int/smul.carbon @@ -34,18 +34,18 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: --- int_mul.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Mul: type = fn_type @Mul [template] -// CHECK:STDOUT: %struct.2: Mul = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Mul.type: type = fn_type @Mul [template] +// CHECK:STDOUT: %Mul: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 6 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] // CHECK:STDOUT: %.6: type = ptr_type [i32; 6] [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.3: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -56,28 +56,28 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Mul.decl: Mul = fn_decl @Mul [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Mul.decl: = fn_decl @Mul [template = constants.%Mul] { +// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] // CHECK:STDOUT: %a.loc2_8.1: i32 = param a // CHECK:STDOUT: @Mul.%a: i32 = bind_name a, %a.loc2_8.1 -// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] // CHECK:STDOUT: %b.loc2_16.1: i32 = param b // CHECK:STDOUT: @Mul.%b: i32 = bind_name b, %b.loc2_16.1 -// CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_32.loc2_27 [template = i32] // CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_32.loc2_27, %.loc2_27.1 [template = i32] // CHECK:STDOUT: @Mul.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %Mul.ref: Mul = name_ref Mul, %Mul.decl [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %Mul.ref: = name_ref Mul, %Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %.loc4_20: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.smul: init i32 = call %Mul.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] @@ -86,8 +86,8 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %.loc4_25: type = array_type %int.smul, i32 [template = constants.%.5] // CHECK:STDOUT: %arr.var: ref [i32; 6] = var arr // CHECK:STDOUT: %arr: ref [i32; 6] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 6 [template = constants.%.4] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] @@ -96,21 +96,21 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %arr.ref: ref [i32; 6] = name_ref arr, %arr // CHECK:STDOUT: %.loc5_24: [i32; 6]* = addr_of %arr.ref // CHECK:STDOUT: %arr_p: [i32; 6]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] // CHECK:STDOUT: %a.loc7_16.1: i32 = param a // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 -// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] // CHECK:STDOUT: %b.loc7_24.1: i32 = param b // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 -// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] // CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_32.loc7_35, %.loc7_35.1 [template = i32] // CHECK:STDOUT: @RuntimeCall.%return: ref i32 = var @@ -123,7 +123,7 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mul.ref: Mul = name_ref Mul, file.%Mul.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Mul.ref: = name_ref Mul, file.%Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.smul: init i32 = call %Mul.ref(%a.ref, %b.ref) @@ -135,11 +135,11 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: --- fail_overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Mul: type = fn_type @Mul [template] -// CHECK:STDOUT: %struct.2: Mul = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Mul.type: type = fn_type @Mul [template] +// CHECK:STDOUT: %Mul: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 32767 [template] // CHECK:STDOUT: %.3: i32 = int_literal 65536 [template] // CHECK:STDOUT: %.4: i32 = int_literal 2147418112 [template] @@ -153,41 +153,41 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: .Mul = %Mul.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Mul.decl: Mul = fn_decl @Mul [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Mul.decl: = fn_decl @Mul [template = constants.%Mul] { +// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] // CHECK:STDOUT: %a.loc4_8.1: i32 = param a // CHECK:STDOUT: @Mul.%a: i32 = bind_name a, %a.loc4_8.1 -// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] // CHECK:STDOUT: %b.loc4_16.1: i32 = param b // CHECK:STDOUT: @Mul.%b: i32 = bind_name b, %b.loc4_16.1 -// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Mul.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_32.loc6, %.loc6_8.1 [template = i32] -// CHECK:STDOUT: %Mul.ref.loc6: Mul = name_ref Mul, %Mul.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Mul.ref.loc6: = name_ref Mul, %Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %.loc6_18: i32 = int_literal 32767 [template = constants.%.2] // CHECK:STDOUT: %.loc6_26: i32 = int_literal 65536 [template = constants.%.3] // CHECK:STDOUT: %int.smul.loc6: init i32 = call %Mul.ref.loc6(%.loc6_18, %.loc6_26) [template = constants.%.4] // CHECK:STDOUT: %.loc6_34.1: i32 = value_of_initializer %int.smul.loc6 [template = constants.%.4] // CHECK:STDOUT: %.loc6_34.2: i32 = converted %int.smul.loc6, %.loc6_34.1 [template = constants.%.4] // CHECK:STDOUT: %a.loc6: i32 = bind_name a, %.loc6_34.2 -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc10: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc10_8.1: type = value_of_initializer %int.make_type_32.loc10 [template = i32] // CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_32.loc10, %.loc10_8.1 [template = i32] -// CHECK:STDOUT: %Mul.ref.loc10: Mul = name_ref Mul, %Mul.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Mul.ref.loc10: = name_ref Mul, %Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %.loc10_18: i32 = int_literal 32768 [template = constants.%.5] // CHECK:STDOUT: %.loc10_26: i32 = int_literal 65536 [template = constants.%.3] // CHECK:STDOUT: %int.smul.loc10: init i32 = call %Mul.ref.loc10(%.loc10_18, %.loc10_26) [template = constants.%.6] diff --git a/toolchain/check/testdata/builtins/int/snegate.carbon b/toolchain/check/testdata/builtins/int/snegate.carbon index e51f8b3cfdf3..43eba86d71d6 100644 --- a/toolchain/check/testdata/builtins/int/snegate.carbon +++ b/toolchain/check/testdata/builtins/int/snegate.carbon @@ -119,19 +119,19 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: --- int_negate.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Negate: type = fn_type @Negate [template] -// CHECK:STDOUT: %struct.2: Negate = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] +// CHECK:STDOUT: %Negate: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 123 [template] // CHECK:STDOUT: %.3: i32 = int_literal -123 [template] // CHECK:STDOUT: %.4: type = array_type %.2, i32 [template] // CHECK:STDOUT: %.5: type = ptr_type [i32; 123] [template] // CHECK:STDOUT: %.6: i32 = int_literal 1 [template] // CHECK:STDOUT: %.7: i32 = int_literal -1 [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.3: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -142,23 +142,23 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Negate.decl: Negate = fn_decl @Negate [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc2_14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %int.make_type_32.loc2_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_14.1: type = value_of_initializer %int.make_type_32.loc2_14 [template = i32] // CHECK:STDOUT: %.loc2_14.2: type = converted %int.make_type_32.loc2_14, %.loc2_14.1 [template = i32] // CHECK:STDOUT: %a.loc2_11.1: i32 = param a // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc2_11.1 -// CHECK:STDOUT: %int.make_type_32.loc2_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_22.1: type = value_of_initializer %int.make_type_32.loc2_22 [template = i32] // CHECK:STDOUT: %.loc2_22.2: type = converted %int.make_type_32.loc2_22, %.loc2_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %Negate.ref.loc4_16: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.2] -// CHECK:STDOUT: %Negate.ref.loc4_23: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %Negate.ref.loc4_16: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc4_23: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc4_30: i32 = int_literal 123 [template = constants.%.2] // CHECK:STDOUT: %int.snegate.loc4_29: init i32 = call %Negate.ref.loc4_23(%.loc4_30) [template = constants.%.3] // CHECK:STDOUT: %.loc4_22.1: i32 = value_of_initializer %int.snegate.loc4_29 [template = constants.%.3] @@ -169,8 +169,8 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc4_35: type = array_type %int.snegate.loc4_22, i32 [template = constants.%.4] // CHECK:STDOUT: %arr.var: ref [i32; 123] = var arr // CHECK:STDOUT: %arr: ref [i32; 123] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 123 [template = constants.%.2] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] @@ -179,31 +179,31 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %arr.ref: ref [i32; 123] = name_ref arr, %arr // CHECK:STDOUT: %.loc5_26: [i32; 123]* = addr_of %arr.ref // CHECK:STDOUT: %arr_p: [i32; 123]* = bind_name arr_p, %.loc5_26 -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_32.loc7, %.loc7_8.1 [template = i32] -// CHECK:STDOUT: %Negate.ref.loc7: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Negate.ref.loc7: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc7_21: i32 = int_literal 1 [template = constants.%.6] // CHECK:STDOUT: %int.snegate.loc7: init i32 = call %Negate.ref.loc7(%.loc7_21) [template = constants.%.7] // CHECK:STDOUT: %.loc7_23.1: i32 = value_of_initializer %int.snegate.loc7 [template = constants.%.7] // CHECK:STDOUT: %.loc7_23.2: i32 = converted %int.snegate.loc7, %.loc7_23.1 [template = constants.%.7] // CHECK:STDOUT: %n: i32 = bind_name n, %.loc7_23.2 -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc9_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %int.make_type_32.loc9_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %int.make_type_32.loc9_19 [template = i32] // CHECK:STDOUT: %.loc9_19.2: type = converted %int.make_type_32.loc9_19, %.loc9_19.1 [template = i32] // CHECK:STDOUT: %a.loc9_16.1: i32 = param a // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc9_16.1 -// CHECK:STDOUT: %int.make_type_32.loc9_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc9_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_27.1: type = value_of_initializer %int.make_type_32.loc9_27 [template = i32] // CHECK:STDOUT: %.loc9_27.2: type = converted %int.make_type_32.loc9_27, %.loc9_27.1 [template = i32] // CHECK:STDOUT: %b.loc9_24.1: i32 = param b // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc9_24.1 -// CHECK:STDOUT: %int.make_type_32.loc9_35: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc9_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_35.1: type = value_of_initializer %int.make_type_32.loc9_35 [template = i32] // CHECK:STDOUT: %.loc9_35.2: type = converted %int.make_type_32.loc9_35, %.loc9_35.1 [template = i32] // CHECK:STDOUT: @RuntimeCall.%return: ref i32 = var @@ -216,7 +216,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Negate.ref: Negate = name_ref Negate, file.%Negate.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Negate.ref: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %int.snegate: init i32 = call %Negate.ref(%a.ref) // CHECK:STDOUT: %.loc10_19.1: i32 = value_of_initializer %int.snegate @@ -227,27 +227,27 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: --- fail_bad_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %TooFew: type = fn_type @TooFew [template] -// CHECK:STDOUT: %struct.2: TooFew = struct_value () [template] -// CHECK:STDOUT: %TooMany: type = fn_type @TooMany [template] -// CHECK:STDOUT: %struct.3: TooMany = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.4: Bool = struct_value () [template] -// CHECK:STDOUT: %BadReturnType: type = fn_type @BadReturnType [template] -// CHECK:STDOUT: %struct.5: BadReturnType = struct_value () [template] -// CHECK:STDOUT: %JustRight: type = fn_type @JustRight [template] -// CHECK:STDOUT: %struct.6: JustRight = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] +// CHECK:STDOUT: %TooFew: = struct_value () [template] +// CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] +// CHECK:STDOUT: %TooMany: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %BadReturnType.type: type = fn_type @BadReturnType [template] +// CHECK:STDOUT: %BadReturnType: = struct_value () [template] +// CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] +// CHECK:STDOUT: %JustRight: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] -// CHECK:STDOUT: %RuntimeCallTooFew: type = fn_type @RuntimeCallTooFew [template] -// CHECK:STDOUT: %struct.7: RuntimeCallTooFew = struct_value () [template] -// CHECK:STDOUT: %RuntimeCallTooMany: type = fn_type @RuntimeCallTooMany [template] -// CHECK:STDOUT: %struct.8: RuntimeCallTooMany = struct_value () [template] -// CHECK:STDOUT: %RuntimeCallBadReturnType: type = fn_type @RuntimeCallBadReturnType [template] -// CHECK:STDOUT: %struct.9: RuntimeCallBadReturnType = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] +// CHECK:STDOUT: %RuntimeCallTooFew: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] +// CHECK:STDOUT: %RuntimeCallTooMany: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType.type: type = fn_type @RuntimeCallBadReturnType [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -266,82 +266,82 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: .RuntimeCallBadReturnType = %RuntimeCallBadReturnType.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TooFew.decl: TooFew = fn_decl @TooFew [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %TooFew.decl: = fn_decl @TooFew [template = constants.%TooFew] { +// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_16.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_16.2: type = converted %int.make_type_32.loc8, %.loc8_16.1 [template = i32] // CHECK:STDOUT: @TooFew.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TooMany.decl: TooMany = fn_decl @TooMany [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc13_15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %TooMany.decl: = fn_decl @TooMany [template = constants.%TooMany] { +// CHECK:STDOUT: %int.make_type_32.loc13_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %int.make_type_32.loc13_15 [template = i32] // CHECK:STDOUT: %.loc13_15.2: type = converted %int.make_type_32.loc13_15, %.loc13_15.1 [template = i32] // CHECK:STDOUT: %a.loc13_12.1: i32 = param a // CHECK:STDOUT: @TooMany.%a: i32 = bind_name a, %a.loc13_12.1 -// CHECK:STDOUT: %int.make_type_32.loc13_23: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13_23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %int.make_type_32.loc13_23 [template = i32] // CHECK:STDOUT: %.loc13_23.2: type = converted %int.make_type_32.loc13_23, %.loc13_23.1 [template = i32] // CHECK:STDOUT: %b.loc13_20.1: i32 = param b // CHECK:STDOUT: @TooMany.%b: i32 = bind_name b, %b.loc13_20.1 -// CHECK:STDOUT: %int.make_type_32.loc13_31: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13_31: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_32.loc13_31 [template = i32] // CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_32.loc13_31, %.loc13_31.1 [template = i32] // CHECK:STDOUT: @TooMany.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %BadReturnType.decl: BadReturnType = fn_decl @BadReturnType [template = constants.%struct.5] { -// CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %BadReturnType.decl: = fn_decl @BadReturnType [template = constants.%BadReturnType] { +// CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_21.1: type = value_of_initializer %int.make_type_32.loc18 [template = i32] // CHECK:STDOUT: %.loc18_21.2: type = converted %int.make_type_32.loc18, %.loc18_21.1 [template = i32] // CHECK:STDOUT: %a.loc18_18.1: i32 = param a // CHECK:STDOUT: @BadReturnType.%a: i32 = bind_name a, %a.loc18_18.1 -// CHECK:STDOUT: %bool.make_type.loc18: init type = call constants.%struct.4() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc18: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_29.1: type = value_of_initializer %bool.make_type.loc18 [template = bool] // CHECK:STDOUT: %.loc18_29.2: type = converted %bool.make_type.loc18, %.loc18_29.1 [template = bool] // CHECK:STDOUT: @BadReturnType.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %JustRight.decl: JustRight = fn_decl @JustRight [template = constants.%struct.6] { -// CHECK:STDOUT: %int.make_type_32.loc19_17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %JustRight.decl: = fn_decl @JustRight [template = constants.%JustRight] { +// CHECK:STDOUT: %int.make_type_32.loc19_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %int.make_type_32.loc19_17 [template = i32] // CHECK:STDOUT: %.loc19_17.2: type = converted %int.make_type_32.loc19_17, %.loc19_17.1 [template = i32] // CHECK:STDOUT: %a.loc19_14.1: i32 = param a // CHECK:STDOUT: @JustRight.%a: i32 = bind_name a, %a.loc19_14.1 -// CHECK:STDOUT: %int.make_type_32.loc19_25: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc19_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_25.1: type = value_of_initializer %int.make_type_32.loc19_25 [template = i32] // CHECK:STDOUT: %.loc19_25.2: type = converted %int.make_type_32.loc19_25, %.loc19_25.1 [template = i32] // CHECK:STDOUT: @JustRight.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %TooFew.ref: TooFew = name_ref TooFew, %TooFew.decl [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %TooFew.call: init i32 = call %TooFew.ref() // CHECK:STDOUT: %too_few.var: ref = var too_few // CHECK:STDOUT: %too_few: ref = bind_name too_few, %too_few.var -// CHECK:STDOUT: %import_ref.10: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %TooMany.ref: TooMany = name_ref TooMany, %TooMany.decl [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %.loc30_29: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc30_32: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %TooMany.call: init i32 = call %TooMany.ref(%.loc30_29, %.loc30_32) // CHECK:STDOUT: %too_many.var: ref = var too_many // CHECK:STDOUT: %too_many: ref = bind_name too_many, %too_many.var -// CHECK:STDOUT: %import_ref.11: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc35: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %BadReturnType.ref: BadReturnType = name_ref BadReturnType, %BadReturnType.decl [template = constants.%struct.5] +// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc35: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %.loc35: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35) // CHECK:STDOUT: %bad_return_type.var: ref = var bad_return_type // CHECK:STDOUT: %bad_return_type: ref = bind_name bad_return_type, %bad_return_type.var -// CHECK:STDOUT: %import_ref.12: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc44: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %JustRight.ref: JustRight = name_ref JustRight, %JustRight.decl [template = constants.%struct.6] +// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc44: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %JustRight.ref: = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] // CHECK:STDOUT: %.loc44_31: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc44_34: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.snegate: init i32 = call %JustRight.ref() [template = ] @@ -350,59 +350,59 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc44_36: type = array_type %int.snegate, i32 [template = ] // CHECK:STDOUT: %bad_call.var: ref = var bad_call // CHECK:STDOUT: %bad_call: ref = bind_name bad_call, %bad_call.var -// CHECK:STDOUT: %import_ref.13: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.14: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCallTooFew.decl: RuntimeCallTooFew = fn_decl @RuntimeCallTooFew [template = constants.%struct.7] { -// CHECK:STDOUT: %int.make_type_32.loc46_25: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.14: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCallTooFew.decl: = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { +// CHECK:STDOUT: %int.make_type_32.loc46_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc46_25.1: type = value_of_initializer %int.make_type_32.loc46_25 [template = i32] // CHECK:STDOUT: %.loc46_25.2: type = converted %int.make_type_32.loc46_25, %.loc46_25.1 [template = i32] // CHECK:STDOUT: %a.loc46_22.1: i32 = param a // CHECK:STDOUT: @RuntimeCallTooFew.%a: i32 = bind_name a, %a.loc46_22.1 -// CHECK:STDOUT: %int.make_type_32.loc46_33: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc46_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc46_33.1: type = value_of_initializer %int.make_type_32.loc46_33 [template = i32] // CHECK:STDOUT: %.loc46_33.2: type = converted %int.make_type_32.loc46_33, %.loc46_33.1 [template = i32] // CHECK:STDOUT: @RuntimeCallTooFew.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.15: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.16: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.17: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.18: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCallTooMany.decl: RuntimeCallTooMany = fn_decl @RuntimeCallTooMany [template = constants.%struct.8] { -// CHECK:STDOUT: %int.make_type_32.loc57_26: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.15: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.16: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.17: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.18: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCallTooMany.decl: = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { +// CHECK:STDOUT: %int.make_type_32.loc57_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc57_26.1: type = value_of_initializer %int.make_type_32.loc57_26 [template = i32] // CHECK:STDOUT: %.loc57_26.2: type = converted %int.make_type_32.loc57_26, %.loc57_26.1 [template = i32] // CHECK:STDOUT: %a.loc57_23.1: i32 = param a // CHECK:STDOUT: @RuntimeCallTooMany.%a: i32 = bind_name a, %a.loc57_23.1 -// CHECK:STDOUT: %int.make_type_32.loc57_34: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc57_34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc57_34.1: type = value_of_initializer %int.make_type_32.loc57_34 [template = i32] // CHECK:STDOUT: %.loc57_34.2: type = converted %int.make_type_32.loc57_34, %.loc57_34.1 [template = i32] // CHECK:STDOUT: %b.loc57_31.1: i32 = param b // CHECK:STDOUT: @RuntimeCallTooMany.%b: i32 = bind_name b, %b.loc57_31.1 -// CHECK:STDOUT: %int.make_type_32.loc57_42: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc57_42: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc57_42.1: type = value_of_initializer %int.make_type_32.loc57_42 [template = i32] // CHECK:STDOUT: %.loc57_42.2: type = converted %int.make_type_32.loc57_42, %.loc57_42.1 [template = i32] // CHECK:STDOUT: %c.loc57_39.1: i32 = param c // CHECK:STDOUT: @RuntimeCallTooMany.%c: i32 = bind_name c, %c.loc57_39.1 -// CHECK:STDOUT: %int.make_type_32.loc57_50: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc57_50: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc57_50.1: type = value_of_initializer %int.make_type_32.loc57_50 [template = i32] // CHECK:STDOUT: %.loc57_50.2: type = converted %int.make_type_32.loc57_50, %.loc57_50.1 [template = i32] // CHECK:STDOUT: @RuntimeCallTooMany.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.19: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.20: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.21: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: RuntimeCallBadReturnType = fn_decl @RuntimeCallBadReturnType [template = constants.%struct.9] { -// CHECK:STDOUT: %int.make_type_32.loc68_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.19: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.20: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.21: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { +// CHECK:STDOUT: %int.make_type_32.loc68_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc68_32.1: type = value_of_initializer %int.make_type_32.loc68_32 [template = i32] // CHECK:STDOUT: %.loc68_32.2: type = converted %int.make_type_32.loc68_32, %.loc68_32.1 [template = i32] // CHECK:STDOUT: %a.loc68_29.1: i32 = param a // CHECK:STDOUT: @RuntimeCallBadReturnType.%a: i32 = bind_name a, %a.loc68_29.1 -// CHECK:STDOUT: %int.make_type_32.loc68_40: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc68_40: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc68_40.1: type = value_of_initializer %int.make_type_32.loc68_40 [template = i32] // CHECK:STDOUT: %.loc68_40.2: type = converted %int.make_type_32.loc68_40, %.loc68_40.1 [template = i32] // CHECK:STDOUT: %b.loc68_37.1: i32 = param b // CHECK:STDOUT: @RuntimeCallBadReturnType.%b: i32 = bind_name b, %b.loc68_37.1 -// CHECK:STDOUT: %bool.make_type.loc68: init type = call constants.%struct.4() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc68: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc68_48.1: type = value_of_initializer %bool.make_type.loc68 [template = bool] // CHECK:STDOUT: %.loc68_48.2: type = converted %bool.make_type.loc68, %.loc68_48.1 [template = bool] // CHECK:STDOUT: @RuntimeCallBadReturnType.%return: ref bool = var @@ -423,7 +423,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooFew(%a: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooFew.ref: TooFew = name_ref TooFew, file.%TooFew.decl [template = constants.%struct.2] +// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %TooFew.call: init i32 = call %TooFew.ref() [template = ] // CHECK:STDOUT: %.loc54_19.1: i32 = value_of_initializer %TooFew.call [template = ] @@ -433,7 +433,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooMany(%a: i32, %b: i32, %c: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooMany.ref: TooMany = name_ref TooMany, file.%TooMany.decl [template = constants.%struct.3] +// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %c.ref: i32 = name_ref c, %c @@ -445,7 +445,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallBadReturnType(%a: i32, %b: i32) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %BadReturnType.ref: BadReturnType = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%struct.5] +// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref() [template = ] @@ -457,13 +457,13 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: --- fail_overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Negate: type = fn_type @Negate [template] -// CHECK:STDOUT: %struct.2: Negate = struct_value () [template] -// CHECK:STDOUT: %Sub: type = fn_type @Sub [template] -// CHECK:STDOUT: %struct.3: Sub = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] +// CHECK:STDOUT: %Negate: = struct_value () [template] +// CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] +// CHECK:STDOUT: %Sub: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 2147483647 [template] // CHECK:STDOUT: %.3: i32 = int_literal -2147483647 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] @@ -477,44 +477,44 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: .Sub = %Sub.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Negate.decl: Negate = fn_decl @Negate [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc4_14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %int.make_type_32.loc4_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_14.1: type = value_of_initializer %int.make_type_32.loc4_14 [template = i32] // CHECK:STDOUT: %.loc4_14.2: type = converted %int.make_type_32.loc4_14, %.loc4_14.1 [template = i32] // CHECK:STDOUT: %a.loc4_11.1: i32 = param a // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc4_11.1 -// CHECK:STDOUT: %int.make_type_32.loc4_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_22.1: type = value_of_initializer %int.make_type_32.loc4_22 [template = i32] // CHECK:STDOUT: %.loc4_22.2: type = converted %int.make_type_32.loc4_22, %.loc4_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Sub.decl: Sub = fn_decl @Sub [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Sub.decl: = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_32.loc5_11 [template = i32] // CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_32.loc5_11, %.loc5_11.1 [template = i32] // CHECK:STDOUT: %a.loc5_8.1: i32 = param a // CHECK:STDOUT: @Sub.%a: i32 = bind_name a, %a.loc5_8.1 -// CHECK:STDOUT: %int.make_type_32.loc5_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc5_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_32.loc5_19 [template = i32] // CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_32.loc5_19, %.loc5_19.1 [template = i32] // CHECK:STDOUT: %b.loc5_16.1: i32 = param b // CHECK:STDOUT: @Sub.%b: i32 = bind_name b, %b.loc5_16.1 -// CHECK:STDOUT: %int.make_type_32.loc5_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc5_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_27.1: type = value_of_initializer %int.make_type_32.loc5_27 [template = i32] // CHECK:STDOUT: %.loc5_27.2: type = converted %int.make_type_32.loc5_27, %.loc5_27.1 [template = i32] // CHECK:STDOUT: @Sub.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_32.loc8, %.loc8_8.1 [template = i32] -// CHECK:STDOUT: %Negate.ref.loc8_14: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.2] -// CHECK:STDOUT: %Negate.ref.loc8_21: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Negate.ref.loc8_14: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc8_21: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc8_28: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %int.snegate.loc8_27: init i32 = call %Negate.ref.loc8_21(%.loc8_28) [template = constants.%.3] // CHECK:STDOUT: %.loc8_20.1: i32 = value_of_initializer %int.snegate.loc8_27 [template = constants.%.3] @@ -523,13 +523,13 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc8_40.1: i32 = value_of_initializer %int.snegate.loc8_20 [template = constants.%.2] // CHECK:STDOUT: %.loc8_40.2: i32 = converted %int.snegate.loc8_20, %.loc8_40.1 [template = constants.%.2] // CHECK:STDOUT: %a.loc8: i32 = bind_name a, %.loc8_40.2 -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_8.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] // CHECK:STDOUT: %.loc14_8.2: type = converted %int.make_type_32.loc14, %.loc14_8.1 [template = i32] -// CHECK:STDOUT: %Negate.ref.loc14_14: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.2] -// CHECK:STDOUT: %Sub.ref: Sub = name_ref Sub, %Sub.decl [template = constants.%struct.3] -// CHECK:STDOUT: %Negate.ref.loc14_25: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Negate.ref.loc14_14: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Sub.ref: = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc14_25: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc14_32: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %int.snegate.loc14_31: init i32 = call %Negate.ref.loc14_25(%.loc14_32) [template = constants.%.3] // CHECK:STDOUT: %.loc14_45: i32 = int_literal 1 [template = constants.%.4] diff --git a/toolchain/check/testdata/builtins/int/ssub.carbon b/toolchain/check/testdata/builtins/int/ssub.carbon index 61e451533d32..4300fb7099c3 100644 --- a/toolchain/check/testdata/builtins/int/ssub.carbon +++ b/toolchain/check/testdata/builtins/int/ssub.carbon @@ -35,18 +35,18 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: --- int_sub.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Sub: type = fn_type @Sub [template] -// CHECK:STDOUT: %struct.2: Sub = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] +// CHECK:STDOUT: %Sub: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] // CHECK:STDOUT: %.6: type = ptr_type [i32; 1] [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.3: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -57,28 +57,28 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Sub.decl: Sub = fn_decl @Sub [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Sub.decl: = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] // CHECK:STDOUT: %a.loc2_8.1: i32 = param a // CHECK:STDOUT: @Sub.%a: i32 = bind_name a, %a.loc2_8.1 -// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] // CHECK:STDOUT: %b.loc2_16.1: i32 = param b // CHECK:STDOUT: @Sub.%b: i32 = bind_name b, %b.loc2_16.1 -// CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_32.loc2_27 [template = i32] // CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_32.loc2_27, %.loc2_27.1 [template = i32] // CHECK:STDOUT: @Sub.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %Sub.ref: Sub = name_ref Sub, %Sub.decl [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %Sub.ref: = name_ref Sub, %Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %.loc4_20: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.ssub: init i32 = call %Sub.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] @@ -87,8 +87,8 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %.loc4_25: type = array_type %int.ssub, i32 [template = constants.%.5] // CHECK:STDOUT: %arr.var: ref [i32; 1] = var arr // CHECK:STDOUT: %arr: ref [i32; 1] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] @@ -97,21 +97,21 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %arr.ref: ref [i32; 1] = name_ref arr, %arr // CHECK:STDOUT: %.loc5_24: [i32; 1]* = addr_of %arr.ref // CHECK:STDOUT: %arr_p: [i32; 1]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] // CHECK:STDOUT: %a.loc7_16.1: i32 = param a // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 -// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] // CHECK:STDOUT: %b.loc7_24.1: i32 = param b // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 -// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] // CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_32.loc7_35, %.loc7_35.1 [template = i32] // CHECK:STDOUT: @RuntimeCall.%return: ref i32 = var @@ -124,7 +124,7 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Sub.ref: Sub = name_ref Sub, file.%Sub.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Sub.ref: = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.ssub: init i32 = call %Sub.ref(%a.ref, %b.ref) @@ -136,11 +136,11 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: --- fail_overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Sub: type = fn_type @Sub [template] -// CHECK:STDOUT: %struct.2: Sub = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] +// CHECK:STDOUT: %Sub: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2147483647 [template] // CHECK:STDOUT: %.4: i32 = int_literal -2147483647 [template] @@ -155,42 +155,42 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: .Sub = %Sub.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Sub.decl: Sub = fn_decl @Sub [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Sub.decl: = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] // CHECK:STDOUT: %a.loc4_8.1: i32 = param a // CHECK:STDOUT: @Sub.%a: i32 = bind_name a, %a.loc4_8.1 -// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] // CHECK:STDOUT: %b.loc4_16.1: i32 = param b // CHECK:STDOUT: @Sub.%b: i32 = bind_name b, %b.loc4_16.1 -// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Sub.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_32.loc6, %.loc6_8.1 [template = i32] -// CHECK:STDOUT: %Sub.ref.loc6: Sub = name_ref Sub, %Sub.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Sub.ref.loc6: = name_ref Sub, %Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %.loc6_18: i32 = int_literal 0 [template = constants.%.2] // CHECK:STDOUT: %.loc6_21: i32 = int_literal 2147483647 [template = constants.%.3] // CHECK:STDOUT: %int.ssub.loc6: init i32 = call %Sub.ref.loc6(%.loc6_18, %.loc6_21) [template = constants.%.4] // CHECK:STDOUT: %.loc6_32.1: i32 = value_of_initializer %int.ssub.loc6 [template = constants.%.4] // CHECK:STDOUT: %.loc6_32.2: i32 = converted %int.ssub.loc6, %.loc6_32.1 [template = constants.%.4] // CHECK:STDOUT: %a.loc6: i32 = bind_name a, %.loc6_32.2 -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_32.loc7, %.loc7_8.1 [template = i32] -// CHECK:STDOUT: %Sub.ref.loc7_14: Sub = name_ref Sub, %Sub.decl [template = constants.%struct.2] -// CHECK:STDOUT: %Sub.ref.loc7_18: Sub = name_ref Sub, %Sub.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Sub.ref.loc7_14: = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref.loc7_18: = name_ref Sub, %Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %.loc7_22: i32 = int_literal 0 [template = constants.%.2] // CHECK:STDOUT: %.loc7_25: i32 = int_literal 2147483647 [template = constants.%.3] // CHECK:STDOUT: %int.ssub.loc7_21: init i32 = call %Sub.ref.loc7_18(%.loc7_22, %.loc7_25) [template = constants.%.4] @@ -201,12 +201,12 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %.loc7_40.1: i32 = value_of_initializer %int.ssub.loc7_17 [template = constants.%.6] // CHECK:STDOUT: %.loc7_40.2: i32 = converted %int.ssub.loc7_17, %.loc7_40.1 [template = constants.%.6] // CHECK:STDOUT: %b.loc7: i32 = bind_name b, %.loc7_40.2 -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_8.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_8.2: type = converted %int.make_type_32.loc11, %.loc11_8.1 [template = i32] -// CHECK:STDOUT: %Sub.ref.loc11_14: Sub = name_ref Sub, %Sub.decl [template = constants.%struct.2] -// CHECK:STDOUT: %Sub.ref.loc11_18: Sub = name_ref Sub, %Sub.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Sub.ref.loc11_14: = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref.loc11_18: = name_ref Sub, %Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %.loc11_22: i32 = int_literal 0 [template = constants.%.2] // CHECK:STDOUT: %.loc11_25: i32 = int_literal 2147483647 [template = constants.%.3] // CHECK:STDOUT: %int.ssub.loc11_21: init i32 = call %Sub.ref.loc11_18(%.loc11_22, %.loc11_25) [template = constants.%.4] diff --git a/toolchain/check/testdata/builtins/int/uadd.carbon b/toolchain/check/testdata/builtins/int/uadd.carbon index 8385c0789863..5048ad667e12 100644 --- a/toolchain/check/testdata/builtins/int/uadd.carbon +++ b/toolchain/check/testdata/builtins/int/uadd.carbon @@ -89,18 +89,18 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: --- int_add.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Add: type = fn_type @Add [template] -// CHECK:STDOUT: %struct.2: Add = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Add.type: type = fn_type @Add [template] +// CHECK:STDOUT: %Add: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 3 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] // CHECK:STDOUT: %.6: type = ptr_type [i32; 3] [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.3: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -111,28 +111,28 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Add.decl: Add = fn_decl @Add [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Add.decl: = fn_decl @Add [template = constants.%Add] { +// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] // CHECK:STDOUT: %a.loc2_8.1: i32 = param a // CHECK:STDOUT: @Add.%a: i32 = bind_name a, %a.loc2_8.1 -// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] // CHECK:STDOUT: %b.loc2_16.1: i32 = param b // CHECK:STDOUT: @Add.%b: i32 = bind_name b, %b.loc2_16.1 -// CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_32.loc2_27 [template = i32] // CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_32.loc2_27, %.loc2_27.1 [template = i32] // CHECK:STDOUT: @Add.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %Add.ref: Add = name_ref Add, %Add.decl [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %Add.ref: = name_ref Add, %Add.decl [template = constants.%Add] // CHECK:STDOUT: %.loc4_20: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.uadd: init i32 = call %Add.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] @@ -141,8 +141,8 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc4_25: type = array_type %int.uadd, i32 [template = constants.%.5] // CHECK:STDOUT: %arr.var: ref [i32; 3] = var arr // CHECK:STDOUT: %arr: ref [i32; 3] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 3 [template = constants.%.4] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] @@ -151,21 +151,21 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %arr.ref: ref [i32; 3] = name_ref arr, %arr // CHECK:STDOUT: %.loc5_24: [i32; 3]* = addr_of %arr.ref // CHECK:STDOUT: %arr_p: [i32; 3]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] // CHECK:STDOUT: %a.loc7_16.1: i32 = param a // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 -// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] // CHECK:STDOUT: %b.loc7_24.1: i32 = param b // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 -// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] // CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_32.loc7_35, %.loc7_35.1 [template = i32] // CHECK:STDOUT: @RuntimeCall.%return: ref i32 = var @@ -178,7 +178,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Add.ref: Add = name_ref Add, file.%Add.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Add.ref: = name_ref Add, file.%Add.decl [template = constants.%Add] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.uadd: init i32 = call %Add.ref(%a.ref, %b.ref) @@ -190,28 +190,28 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: --- fail_bad_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %TooFew: type = fn_type @TooFew [template] -// CHECK:STDOUT: %struct.2: TooFew = struct_value () [template] -// CHECK:STDOUT: %TooMany: type = fn_type @TooMany [template] -// CHECK:STDOUT: %struct.3: TooMany = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.4: Bool = struct_value () [template] -// CHECK:STDOUT: %BadReturnType: type = fn_type @BadReturnType [template] -// CHECK:STDOUT: %struct.5: BadReturnType = struct_value () [template] -// CHECK:STDOUT: %JustRight: type = fn_type @JustRight [template] -// CHECK:STDOUT: %struct.6: JustRight = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] +// CHECK:STDOUT: %TooFew: = struct_value () [template] +// CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] +// CHECK:STDOUT: %TooMany: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %BadReturnType.type: type = fn_type @BadReturnType [template] +// CHECK:STDOUT: %BadReturnType: = struct_value () [template] +// CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] +// CHECK:STDOUT: %JustRight: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 3 [template] -// CHECK:STDOUT: %RuntimeCallTooFew: type = fn_type @RuntimeCallTooFew [template] -// CHECK:STDOUT: %struct.7: RuntimeCallTooFew = struct_value () [template] -// CHECK:STDOUT: %RuntimeCallTooMany: type = fn_type @RuntimeCallTooMany [template] -// CHECK:STDOUT: %struct.8: RuntimeCallTooMany = struct_value () [template] -// CHECK:STDOUT: %RuntimeCallBadReturnType: type = fn_type @RuntimeCallBadReturnType [template] -// CHECK:STDOUT: %struct.9: RuntimeCallBadReturnType = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] +// CHECK:STDOUT: %RuntimeCallTooFew: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] +// CHECK:STDOUT: %RuntimeCallTooMany: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType.type: type = fn_type @RuntimeCallBadReturnType [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -230,109 +230,109 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: .RuntimeCallBadReturnType = %RuntimeCallBadReturnType.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TooFew.decl: TooFew = fn_decl @TooFew [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc8_14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %TooFew.decl: = fn_decl @TooFew [template = constants.%TooFew] { +// CHECK:STDOUT: %int.make_type_32.loc8_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_14.1: type = value_of_initializer %int.make_type_32.loc8_14 [template = i32] // CHECK:STDOUT: %.loc8_14.2: type = converted %int.make_type_32.loc8_14, %.loc8_14.1 [template = i32] // CHECK:STDOUT: %a.loc8_11.1: i32 = param a // CHECK:STDOUT: @TooFew.%a: i32 = bind_name a, %a.loc8_11.1 -// CHECK:STDOUT: %int.make_type_32.loc8_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc8_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_22.1: type = value_of_initializer %int.make_type_32.loc8_22 [template = i32] // CHECK:STDOUT: %.loc8_22.2: type = converted %int.make_type_32.loc8_22, %.loc8_22.1 [template = i32] // CHECK:STDOUT: @TooFew.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TooMany.decl: TooMany = fn_decl @TooMany [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc13_15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %TooMany.decl: = fn_decl @TooMany [template = constants.%TooMany] { +// CHECK:STDOUT: %int.make_type_32.loc13_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %int.make_type_32.loc13_15 [template = i32] // CHECK:STDOUT: %.loc13_15.2: type = converted %int.make_type_32.loc13_15, %.loc13_15.1 [template = i32] // CHECK:STDOUT: %a.loc13_12.1: i32 = param a // CHECK:STDOUT: @TooMany.%a: i32 = bind_name a, %a.loc13_12.1 -// CHECK:STDOUT: %int.make_type_32.loc13_23: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13_23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %int.make_type_32.loc13_23 [template = i32] // CHECK:STDOUT: %.loc13_23.2: type = converted %int.make_type_32.loc13_23, %.loc13_23.1 [template = i32] // CHECK:STDOUT: %b.loc13_20.1: i32 = param b // CHECK:STDOUT: @TooMany.%b: i32 = bind_name b, %b.loc13_20.1 -// CHECK:STDOUT: %int.make_type_32.loc13_31: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13_31: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_32.loc13_31 [template = i32] // CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_32.loc13_31, %.loc13_31.1 [template = i32] // CHECK:STDOUT: %c.loc13_28.1: i32 = param c // CHECK:STDOUT: @TooMany.%c: i32 = bind_name c, %c.loc13_28.1 -// CHECK:STDOUT: %int.make_type_32.loc13_39: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13_39: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_39.1: type = value_of_initializer %int.make_type_32.loc13_39 [template = i32] // CHECK:STDOUT: %.loc13_39.2: type = converted %int.make_type_32.loc13_39, %.loc13_39.1 [template = i32] // CHECK:STDOUT: @TooMany.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.9: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %BadReturnType.decl: BadReturnType = fn_decl @BadReturnType [template = constants.%struct.5] { -// CHECK:STDOUT: %int.make_type_32.loc18_21: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %BadReturnType.decl: = fn_decl @BadReturnType [template = constants.%BadReturnType] { +// CHECK:STDOUT: %int.make_type_32.loc18_21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_21.1: type = value_of_initializer %int.make_type_32.loc18_21 [template = i32] // CHECK:STDOUT: %.loc18_21.2: type = converted %int.make_type_32.loc18_21, %.loc18_21.1 [template = i32] // CHECK:STDOUT: %a.loc18_18.1: i32 = param a // CHECK:STDOUT: @BadReturnType.%a: i32 = bind_name a, %a.loc18_18.1 -// CHECK:STDOUT: %int.make_type_32.loc18_29: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc18_29: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_29.1: type = value_of_initializer %int.make_type_32.loc18_29 [template = i32] // CHECK:STDOUT: %.loc18_29.2: type = converted %int.make_type_32.loc18_29, %.loc18_29.1 [template = i32] // CHECK:STDOUT: %b.loc18_26.1: i32 = param b // CHECK:STDOUT: @BadReturnType.%b: i32 = bind_name b, %b.loc18_26.1 -// CHECK:STDOUT: %bool.make_type.loc18: init type = call constants.%struct.4() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc18: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_37.1: type = value_of_initializer %bool.make_type.loc18 [template = bool] // CHECK:STDOUT: %.loc18_37.2: type = converted %bool.make_type.loc18, %.loc18_37.1 [template = bool] // CHECK:STDOUT: @BadReturnType.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.10: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.11: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.12: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %JustRight.decl: JustRight = fn_decl @JustRight [template = constants.%struct.6] { -// CHECK:STDOUT: %int.make_type_32.loc19_17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %JustRight.decl: = fn_decl @JustRight [template = constants.%JustRight] { +// CHECK:STDOUT: %int.make_type_32.loc19_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %int.make_type_32.loc19_17 [template = i32] // CHECK:STDOUT: %.loc19_17.2: type = converted %int.make_type_32.loc19_17, %.loc19_17.1 [template = i32] // CHECK:STDOUT: %a.loc19_14.1: i32 = param a // CHECK:STDOUT: @JustRight.%a: i32 = bind_name a, %a.loc19_14.1 -// CHECK:STDOUT: %int.make_type_32.loc19_25: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc19_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_25.1: type = value_of_initializer %int.make_type_32.loc19_25 [template = i32] // CHECK:STDOUT: %.loc19_25.2: type = converted %int.make_type_32.loc19_25, %.loc19_25.1 [template = i32] // CHECK:STDOUT: %b.loc19_22.1: i32 = param b // CHECK:STDOUT: @JustRight.%b: i32 = bind_name b, %b.loc19_22.1 -// CHECK:STDOUT: %int.make_type_32.loc19_33: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc19_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_33.1: type = value_of_initializer %int.make_type_32.loc19_33 [template = i32] // CHECK:STDOUT: %.loc19_33.2: type = converted %int.make_type_32.loc19_33, %.loc19_33.1 [template = i32] // CHECK:STDOUT: @JustRight.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.13: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %TooFew.ref: TooFew = name_ref TooFew, %TooFew.decl [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %.loc25: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %TooFew.call: init i32 = call %TooFew.ref(%.loc25) // CHECK:STDOUT: %too_few.var: ref = var too_few // CHECK:STDOUT: %too_few: ref = bind_name too_few, %too_few.var -// CHECK:STDOUT: %import_ref.14: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %TooMany.ref: TooMany = name_ref TooMany, %TooMany.decl [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.14: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %.loc30_29: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc30_32: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %.loc30_35: i32 = int_literal 3 [template = constants.%.4] // CHECK:STDOUT: %TooMany.call: init i32 = call %TooMany.ref(%.loc30_29, %.loc30_32, %.loc30_35) // CHECK:STDOUT: %too_many.var: ref = var too_many // CHECK:STDOUT: %too_many: ref = bind_name too_many, %too_many.var -// CHECK:STDOUT: %import_ref.15: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc35: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %BadReturnType.ref: BadReturnType = name_ref BadReturnType, %BadReturnType.decl [template = constants.%struct.5] +// CHECK:STDOUT: %import_ref.15: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc35: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %.loc35_42: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc35_45: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35_42, %.loc35_45) // CHECK:STDOUT: %bad_return_type.var: ref = var bad_return_type // CHECK:STDOUT: %bad_return_type: ref = bind_name bad_return_type, %bad_return_type.var -// CHECK:STDOUT: %import_ref.16: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc43: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %JustRight.ref: JustRight = name_ref JustRight, %JustRight.decl [template = constants.%struct.6] +// CHECK:STDOUT: %import_ref.16: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc43: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %JustRight.ref: = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] // CHECK:STDOUT: %.loc43_31: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc43_34: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %.loc43_37: i32 = int_literal 3 [template = constants.%.4] @@ -342,59 +342,59 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc43_39: type = array_type %int.uadd, i32 [template = ] // CHECK:STDOUT: %bad_call.var: ref = var bad_call // CHECK:STDOUT: %bad_call: ref = bind_name bad_call, %bad_call.var -// CHECK:STDOUT: %import_ref.17: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.18: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCallTooFew.decl: RuntimeCallTooFew = fn_decl @RuntimeCallTooFew [template = constants.%struct.7] { -// CHECK:STDOUT: %int.make_type_32.loc45_25: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.17: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.18: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCallTooFew.decl: = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { +// CHECK:STDOUT: %int.make_type_32.loc45_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc45_25.1: type = value_of_initializer %int.make_type_32.loc45_25 [template = i32] // CHECK:STDOUT: %.loc45_25.2: type = converted %int.make_type_32.loc45_25, %.loc45_25.1 [template = i32] // CHECK:STDOUT: %a.loc45_22.1: i32 = param a // CHECK:STDOUT: @RuntimeCallTooFew.%a: i32 = bind_name a, %a.loc45_22.1 -// CHECK:STDOUT: %int.make_type_32.loc45_33: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc45_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc45_33.1: type = value_of_initializer %int.make_type_32.loc45_33 [template = i32] // CHECK:STDOUT: %.loc45_33.2: type = converted %int.make_type_32.loc45_33, %.loc45_33.1 [template = i32] // CHECK:STDOUT: @RuntimeCallTooFew.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.19: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.20: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.21: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.22: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCallTooMany.decl: RuntimeCallTooMany = fn_decl @RuntimeCallTooMany [template = constants.%struct.8] { -// CHECK:STDOUT: %int.make_type_32.loc49_26: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.19: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.20: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.21: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.22: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCallTooMany.decl: = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { +// CHECK:STDOUT: %int.make_type_32.loc49_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc49_26.1: type = value_of_initializer %int.make_type_32.loc49_26 [template = i32] // CHECK:STDOUT: %.loc49_26.2: type = converted %int.make_type_32.loc49_26, %.loc49_26.1 [template = i32] // CHECK:STDOUT: %a.loc49_23.1: i32 = param a // CHECK:STDOUT: @RuntimeCallTooMany.%a: i32 = bind_name a, %a.loc49_23.1 -// CHECK:STDOUT: %int.make_type_32.loc49_34: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc49_34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc49_34.1: type = value_of_initializer %int.make_type_32.loc49_34 [template = i32] // CHECK:STDOUT: %.loc49_34.2: type = converted %int.make_type_32.loc49_34, %.loc49_34.1 [template = i32] // CHECK:STDOUT: %b.loc49_31.1: i32 = param b // CHECK:STDOUT: @RuntimeCallTooMany.%b: i32 = bind_name b, %b.loc49_31.1 -// CHECK:STDOUT: %int.make_type_32.loc49_42: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc49_42: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc49_42.1: type = value_of_initializer %int.make_type_32.loc49_42 [template = i32] // CHECK:STDOUT: %.loc49_42.2: type = converted %int.make_type_32.loc49_42, %.loc49_42.1 [template = i32] // CHECK:STDOUT: %c.loc49_39.1: i32 = param c // CHECK:STDOUT: @RuntimeCallTooMany.%c: i32 = bind_name c, %c.loc49_39.1 -// CHECK:STDOUT: %int.make_type_32.loc49_50: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc49_50: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc49_50.1: type = value_of_initializer %int.make_type_32.loc49_50 [template = i32] // CHECK:STDOUT: %.loc49_50.2: type = converted %int.make_type_32.loc49_50, %.loc49_50.1 [template = i32] // CHECK:STDOUT: @RuntimeCallTooMany.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.23: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.24: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.25: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: RuntimeCallBadReturnType = fn_decl @RuntimeCallBadReturnType [template = constants.%struct.9] { -// CHECK:STDOUT: %int.make_type_32.loc53_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.23: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.24: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.25: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { +// CHECK:STDOUT: %int.make_type_32.loc53_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc53_32.1: type = value_of_initializer %int.make_type_32.loc53_32 [template = i32] // CHECK:STDOUT: %.loc53_32.2: type = converted %int.make_type_32.loc53_32, %.loc53_32.1 [template = i32] // CHECK:STDOUT: %a.loc53_29.1: i32 = param a // CHECK:STDOUT: @RuntimeCallBadReturnType.%a: i32 = bind_name a, %a.loc53_29.1 -// CHECK:STDOUT: %int.make_type_32.loc53_40: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc53_40: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc53_40.1: type = value_of_initializer %int.make_type_32.loc53_40 [template = i32] // CHECK:STDOUT: %.loc53_40.2: type = converted %int.make_type_32.loc53_40, %.loc53_40.1 [template = i32] // CHECK:STDOUT: %b.loc53_37.1: i32 = param b // CHECK:STDOUT: @RuntimeCallBadReturnType.%b: i32 = bind_name b, %b.loc53_37.1 -// CHECK:STDOUT: %bool.make_type.loc53: init type = call constants.%struct.4() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc53: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc53_48.1: type = value_of_initializer %bool.make_type.loc53 [template = bool] // CHECK:STDOUT: %.loc53_48.2: type = converted %bool.make_type.loc53, %.loc53_48.1 [template = bool] // CHECK:STDOUT: @RuntimeCallBadReturnType.%return: ref bool = var @@ -415,7 +415,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooFew(%a: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooFew.ref: TooFew = name_ref TooFew, file.%TooFew.decl [template = constants.%struct.2] +// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %TooFew.call: init i32 = call %TooFew.ref(%a.ref) // CHECK:STDOUT: %.loc46_19.1: i32 = value_of_initializer %TooFew.call @@ -425,7 +425,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooMany(%a: i32, %b: i32, %c: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooMany.ref: TooMany = name_ref TooMany, file.%TooMany.decl [template = constants.%struct.3] +// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %c.ref: i32 = name_ref c, %c @@ -437,7 +437,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallBadReturnType(%a: i32, %b: i32) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %BadReturnType.ref: BadReturnType = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%struct.5] +// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%a.ref, %b.ref) @@ -449,11 +449,11 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: --- overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Add: type = fn_type @Add [template] -// CHECK:STDOUT: %struct.2: Add = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Add.type: type = fn_type @Add [template] +// CHECK:STDOUT: %Add: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 2147483647 [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] @@ -466,41 +466,41 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: .Add = %Add.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Add.decl: Add = fn_decl @Add [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Add.decl: = fn_decl @Add [template = constants.%Add] { +// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] // CHECK:STDOUT: %a.loc4_8.1: i32 = param a // CHECK:STDOUT: @Add.%a: i32 = bind_name a, %a.loc4_8.1 -// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] // CHECK:STDOUT: %b.loc4_16.1: i32 = param b // CHECK:STDOUT: @Add.%b: i32 = bind_name b, %b.loc4_16.1 -// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Add.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_32.loc7, %.loc7_8.1 [template = i32] -// CHECK:STDOUT: %Add.ref.loc7: Add = name_ref Add, %Add.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Add.ref.loc7: = name_ref Add, %Add.decl [template = constants.%Add] // CHECK:STDOUT: %.loc7_18: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %.loc7_30: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %int.uadd.loc7: init i32 = call %Add.ref.loc7(%.loc7_18, %.loc7_30) [template = constants.%.2] // CHECK:STDOUT: %.loc7_32.1: i32 = value_of_initializer %int.uadd.loc7 [template = constants.%.2] // CHECK:STDOUT: %.loc7_32.2: i32 = converted %int.uadd.loc7, %.loc7_32.1 [template = constants.%.2] // CHECK:STDOUT: %a.loc7: i32 = bind_name a, %.loc7_32.2 -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_32.loc8, %.loc8_8.1 [template = i32] -// CHECK:STDOUT: %Add.ref.loc8: Add = name_ref Add, %Add.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Add.ref.loc8: = name_ref Add, %Add.decl [template = constants.%Add] // CHECK:STDOUT: %.loc8_18: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %.loc8_30: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.uadd.loc8: init i32 = call %Add.ref.loc8(%.loc8_18, %.loc8_30) [template = constants.%.5] diff --git a/toolchain/check/testdata/builtins/int/udiv.carbon b/toolchain/check/testdata/builtins/int/udiv.carbon index d6567c985302..72bf77ace848 100644 --- a/toolchain/check/testdata/builtins/int/udiv.carbon +++ b/toolchain/check/testdata/builtins/int/udiv.carbon @@ -56,18 +56,18 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: --- int_div.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Div: type = fn_type @Div [template] -// CHECK:STDOUT: %struct.2: Div = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Div.type: type = fn_type @Div [template] +// CHECK:STDOUT: %Div: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] // CHECK:STDOUT: %.6: type = ptr_type [i32; 1] [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.3: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -78,28 +78,28 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Div.decl: Div = fn_decl @Div [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Div.decl: = fn_decl @Div [template = constants.%Div] { +// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] // CHECK:STDOUT: %a.loc2_8.1: i32 = param a // CHECK:STDOUT: @Div.%a: i32 = bind_name a, %a.loc2_8.1 -// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] // CHECK:STDOUT: %b.loc2_16.1: i32 = param b // CHECK:STDOUT: @Div.%b: i32 = bind_name b, %b.loc2_16.1 -// CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_32.loc2_27 [template = i32] // CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_32.loc2_27, %.loc2_27.1 [template = i32] // CHECK:STDOUT: @Div.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %Div.ref: Div = name_ref Div, %Div.decl [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %Div.ref: = name_ref Div, %Div.decl [template = constants.%Div] // CHECK:STDOUT: %.loc4_20: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.udiv: init i32 = call %Div.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] @@ -108,8 +108,8 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %.loc4_25: type = array_type %int.udiv, i32 [template = constants.%.5] // CHECK:STDOUT: %arr.var: ref [i32; 1] = var arr // CHECK:STDOUT: %arr: ref [i32; 1] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] @@ -118,21 +118,21 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %arr.ref: ref [i32; 1] = name_ref arr, %arr // CHECK:STDOUT: %.loc5_24: [i32; 1]* = addr_of %arr.ref // CHECK:STDOUT: %arr_p: [i32; 1]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] // CHECK:STDOUT: %a.loc7_16.1: i32 = param a // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 -// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] // CHECK:STDOUT: %b.loc7_24.1: i32 = param b // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 -// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] // CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_32.loc7_35, %.loc7_35.1 [template = i32] // CHECK:STDOUT: @RuntimeCall.%return: ref i32 = var @@ -145,7 +145,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Div.ref: Div = name_ref Div, file.%Div.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Div.ref: = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.udiv: init i32 = call %Div.ref(%a.ref, %b.ref) @@ -157,15 +157,15 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: --- overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Div: type = fn_type @Div [template] -// CHECK:STDOUT: %struct.2: Div = struct_value () [template] -// CHECK:STDOUT: %Sub: type = fn_type @Sub [template] -// CHECK:STDOUT: %struct.3: Sub = struct_value () [template] -// CHECK:STDOUT: %Negate: type = fn_type @Negate [template] -// CHECK:STDOUT: %struct.4: Negate = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Div.type: type = fn_type @Div [template] +// CHECK:STDOUT: %Div: = struct_value () [template] +// CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] +// CHECK:STDOUT: %Sub: = struct_value () [template] +// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] +// CHECK:STDOUT: %Negate: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 2147483647 [template] // CHECK:STDOUT: %.3: i32 = int_literal -2147483647 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] @@ -182,66 +182,66 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: .Negate = %Negate.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Div.decl: Div = fn_decl @Div [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Div.decl: = fn_decl @Div [template = constants.%Div] { +// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] // CHECK:STDOUT: %a.loc4_8.1: i32 = param a // CHECK:STDOUT: @Div.%a: i32 = bind_name a, %a.loc4_8.1 -// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] // CHECK:STDOUT: %b.loc4_16.1: i32 = param b // CHECK:STDOUT: @Div.%b: i32 = bind_name b, %b.loc4_16.1 -// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Div.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Sub.decl: Sub = fn_decl @Sub [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Sub.decl: = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_32.loc5_11 [template = i32] // CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_32.loc5_11, %.loc5_11.1 [template = i32] // CHECK:STDOUT: %a.loc5_8.1: i32 = param a // CHECK:STDOUT: @Sub.%a: i32 = bind_name a, %a.loc5_8.1 -// CHECK:STDOUT: %int.make_type_32.loc5_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc5_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_32.loc5_19 [template = i32] // CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_32.loc5_19, %.loc5_19.1 [template = i32] // CHECK:STDOUT: %b.loc5_16.1: i32 = param b // CHECK:STDOUT: @Sub.%b: i32 = bind_name b, %b.loc5_16.1 -// CHECK:STDOUT: %int.make_type_32.loc5_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc5_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_27.1: type = value_of_initializer %int.make_type_32.loc5_27 [template = i32] // CHECK:STDOUT: %.loc5_27.2: type = converted %int.make_type_32.loc5_27, %.loc5_27.1 [template = i32] // CHECK:STDOUT: @Sub.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Negate.decl: Negate = fn_decl @Negate [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32.loc6_14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %int.make_type_32.loc6_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_32.loc6_14 [template = i32] // CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_32.loc6_14, %.loc6_14.1 [template = i32] // CHECK:STDOUT: %a.loc6_11.1: i32 = param a // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc6_11.1 -// CHECK:STDOUT: %int.make_type_32.loc6_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc6_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_32.loc6_22 [template = i32] // CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_32.loc6_22, %.loc6_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc9: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_32.loc9 [template = i32] // CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_32.loc9, %.loc9_8.1 [template = i32] -// CHECK:STDOUT: %Div.ref.loc9: Div = name_ref Div, %Div.decl [template = constants.%struct.2] -// CHECK:STDOUT: %Negate.ref.loc9_18: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Div.ref.loc9: = name_ref Div, %Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Negate.ref.loc9_18: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc9_25: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %int.unegate.loc9_24: init i32 = call %Negate.ref.loc9_18(%.loc9_25) [template = constants.%.3] -// CHECK:STDOUT: %Negate.ref.loc9_39: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Negate.ref.loc9_39: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc9_46: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.unegate.loc9_45: init i32 = call %Negate.ref.loc9_39(%.loc9_46) [template = constants.%.5] // CHECK:STDOUT: %.loc9_17.1: i32 = value_of_initializer %int.unegate.loc9_24 [template = constants.%.3] @@ -252,13 +252,13 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %.loc9_49.1: i32 = value_of_initializer %int.udiv.loc9 [template = constants.%.6] // CHECK:STDOUT: %.loc9_49.2: i32 = converted %int.udiv.loc9, %.loc9_49.1 [template = constants.%.6] // CHECK:STDOUT: %a.loc9: i32 = bind_name a, %.loc9_49.2 -// CHECK:STDOUT: %import_ref.10: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_32.loc12, %.loc12_8.1 [template = i32] -// CHECK:STDOUT: %Div.ref.loc12: Div = name_ref Div, %Div.decl [template = constants.%struct.2] -// CHECK:STDOUT: %Sub.ref.loc12: Sub = name_ref Sub, %Sub.decl [template = constants.%struct.3] -// CHECK:STDOUT: %Negate.ref.loc12: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Div.ref.loc12: = name_ref Div, %Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Sub.ref.loc12: = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc12: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_29: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %int.unegate.loc12: init i32 = call %Negate.ref.loc12(%.loc12_29) [template = constants.%.3] // CHECK:STDOUT: %.loc12_43: i32 = int_literal 1 [template = constants.%.4] @@ -272,20 +272,20 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %.loc12_49.1: i32 = value_of_initializer %int.udiv.loc12 [template = constants.%.7] // CHECK:STDOUT: %.loc12_49.2: i32 = converted %int.udiv.loc12, %.loc12_49.1 [template = constants.%.7] // CHECK:STDOUT: %b.loc12: i32 = bind_name b, %.loc12_49.2 -// CHECK:STDOUT: %import_ref.11: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_32.loc15, %.loc15_8.1 [template = i32] -// CHECK:STDOUT: %Div.ref.loc15: Div = name_ref Div, %Div.decl [template = constants.%struct.2] -// CHECK:STDOUT: %Sub.ref.loc15: Sub = name_ref Sub, %Sub.decl [template = constants.%struct.3] -// CHECK:STDOUT: %Negate.ref.loc15_22: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Div.ref.loc15: = name_ref Div, %Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Sub.ref.loc15: = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc15_22: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc15_29: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %int.unegate.loc15_28: init i32 = call %Negate.ref.loc15_22(%.loc15_29) [template = constants.%.3] // CHECK:STDOUT: %.loc15_43: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc15_21.1: i32 = value_of_initializer %int.unegate.loc15_28 [template = constants.%.3] // CHECK:STDOUT: %.loc15_21.2: i32 = converted %int.unegate.loc15_28, %.loc15_21.1 [template = constants.%.3] // CHECK:STDOUT: %int.usub.loc15: init i32 = call %Sub.ref.loc15(%.loc15_21.2, %.loc15_43) [template = constants.%.7] -// CHECK:STDOUT: %Negate.ref.loc15_47: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Negate.ref.loc15_47: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc15_54: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.unegate.loc15_53: init i32 = call %Negate.ref.loc15_47(%.loc15_54) [template = constants.%.5] // CHECK:STDOUT: %.loc15_17.1: i32 = value_of_initializer %int.usub.loc15 [template = constants.%.7] @@ -309,11 +309,11 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: --- fail_div_by_zero.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Div: type = fn_type @Div [template] -// CHECK:STDOUT: %struct.2: Div = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Div.type: type = fn_type @Div [template] +// CHECK:STDOUT: %Div: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: } @@ -324,41 +324,41 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: .Div = %Div.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Div.decl: Div = fn_decl @Div [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Div.decl: = fn_decl @Div [template = constants.%Div] { +// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] // CHECK:STDOUT: %a.loc4_8.1: i32 = param a // CHECK:STDOUT: @Div.%a: i32 = bind_name a, %a.loc4_8.1 -// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] // CHECK:STDOUT: %b.loc4_16.1: i32 = param b // CHECK:STDOUT: @Div.%b: i32 = bind_name b, %b.loc4_16.1 -// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Div.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc10: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc10_8.1: type = value_of_initializer %int.make_type_32.loc10 [template = i32] // CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_32.loc10, %.loc10_8.1 [template = i32] -// CHECK:STDOUT: %Div.ref.loc10: Div = name_ref Div, %Div.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Div.ref.loc10: = name_ref Div, %Div.decl [template = constants.%Div] // CHECK:STDOUT: %.loc10_18: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc10_21: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %int.udiv.loc10: init i32 = call %Div.ref.loc10(%.loc10_18, %.loc10_21) [template = ] // CHECK:STDOUT: %.loc10_23.1: i32 = value_of_initializer %int.udiv.loc10 [template = ] // CHECK:STDOUT: %.loc10_23.2: i32 = converted %int.udiv.loc10, %.loc10_23.1 [template = ] // CHECK:STDOUT: %a.loc10: i32 = bind_name a, %.loc10_23.2 -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_32.loc15, %.loc15_8.1 [template = i32] -// CHECK:STDOUT: %Div.ref.loc15: Div = name_ref Div, %Div.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Div.ref.loc15: = name_ref Div, %Div.decl [template = constants.%Div] // CHECK:STDOUT: %.loc15_18: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %.loc15_21: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %int.udiv.loc15: init i32 = call %Div.ref.loc15(%.loc15_18, %.loc15_21) [template = ] diff --git a/toolchain/check/testdata/builtins/int/umod.carbon b/toolchain/check/testdata/builtins/int/umod.carbon index 1b2df04f3f33..978a8f445c5d 100644 --- a/toolchain/check/testdata/builtins/int/umod.carbon +++ b/toolchain/check/testdata/builtins/int/umod.carbon @@ -58,18 +58,18 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: --- int_div.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Mod: type = fn_type @Mod [template] -// CHECK:STDOUT: %struct.2: Mod = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Mod.type: type = fn_type @Mod [template] +// CHECK:STDOUT: %Mod: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 5 [template] // CHECK:STDOUT: %.3: i32 = int_literal 3 [template] // CHECK:STDOUT: %.4: i32 = int_literal 2 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] // CHECK:STDOUT: %.6: type = ptr_type [i32; 2] [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.3: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -80,28 +80,28 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Mod.decl: Mod = fn_decl @Mod [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Mod.decl: = fn_decl @Mod [template = constants.%Mod] { +// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] // CHECK:STDOUT: %a.loc2_8.1: i32 = param a // CHECK:STDOUT: @Mod.%a: i32 = bind_name a, %a.loc2_8.1 -// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] // CHECK:STDOUT: %b.loc2_16.1: i32 = param b // CHECK:STDOUT: @Mod.%b: i32 = bind_name b, %b.loc2_16.1 -// CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_32.loc2_27 [template = i32] // CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_32.loc2_27, %.loc2_27.1 [template = i32] // CHECK:STDOUT: @Mod.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %Mod.ref: Mod = name_ref Mod, %Mod.decl [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %Mod.ref: = name_ref Mod, %Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %.loc4_20: i32 = int_literal 5 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23: i32 = int_literal 3 [template = constants.%.3] // CHECK:STDOUT: %int.umod: init i32 = call %Mod.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] @@ -110,8 +110,8 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %.loc4_25: type = array_type %int.umod, i32 [template = constants.%.5] // CHECK:STDOUT: %arr.var: ref [i32; 2] = var arr // CHECK:STDOUT: %arr: ref [i32; 2] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 2 [template = constants.%.4] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] @@ -120,21 +120,21 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %arr.ref: ref [i32; 2] = name_ref arr, %arr // CHECK:STDOUT: %.loc5_24: [i32; 2]* = addr_of %arr.ref // CHECK:STDOUT: %arr_p: [i32; 2]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] // CHECK:STDOUT: %a.loc7_16.1: i32 = param a // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 -// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] // CHECK:STDOUT: %b.loc7_24.1: i32 = param b // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 -// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] // CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_32.loc7_35, %.loc7_35.1 [template = i32] // CHECK:STDOUT: @RuntimeCall.%return: ref i32 = var @@ -147,7 +147,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mod.ref: Mod = name_ref Mod, file.%Mod.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Mod.ref: = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.umod: init i32 = call %Mod.ref(%a.ref, %b.ref) @@ -159,15 +159,15 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: --- overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Mod: type = fn_type @Mod [template] -// CHECK:STDOUT: %struct.2: Mod = struct_value () [template] -// CHECK:STDOUT: %Sub: type = fn_type @Sub [template] -// CHECK:STDOUT: %struct.3: Sub = struct_value () [template] -// CHECK:STDOUT: %Negate: type = fn_type @Negate [template] -// CHECK:STDOUT: %struct.4: Negate = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Mod.type: type = fn_type @Mod [template] +// CHECK:STDOUT: %Mod: = struct_value () [template] +// CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] +// CHECK:STDOUT: %Sub: = struct_value () [template] +// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] +// CHECK:STDOUT: %Negate: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 2147483647 [template] // CHECK:STDOUT: %.3: i32 = int_literal -2147483647 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] @@ -184,66 +184,66 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: .Negate = %Negate.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Mod.decl: Mod = fn_decl @Mod [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Mod.decl: = fn_decl @Mod [template = constants.%Mod] { +// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] // CHECK:STDOUT: %a.loc4_8.1: i32 = param a // CHECK:STDOUT: @Mod.%a: i32 = bind_name a, %a.loc4_8.1 -// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] // CHECK:STDOUT: %b.loc4_16.1: i32 = param b // CHECK:STDOUT: @Mod.%b: i32 = bind_name b, %b.loc4_16.1 -// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Mod.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Sub.decl: Sub = fn_decl @Sub [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Sub.decl: = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_32.loc5_11 [template = i32] // CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_32.loc5_11, %.loc5_11.1 [template = i32] // CHECK:STDOUT: %a.loc5_8.1: i32 = param a // CHECK:STDOUT: @Sub.%a: i32 = bind_name a, %a.loc5_8.1 -// CHECK:STDOUT: %int.make_type_32.loc5_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc5_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_32.loc5_19 [template = i32] // CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_32.loc5_19, %.loc5_19.1 [template = i32] // CHECK:STDOUT: %b.loc5_16.1: i32 = param b // CHECK:STDOUT: @Sub.%b: i32 = bind_name b, %b.loc5_16.1 -// CHECK:STDOUT: %int.make_type_32.loc5_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc5_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_27.1: type = value_of_initializer %int.make_type_32.loc5_27 [template = i32] // CHECK:STDOUT: %.loc5_27.2: type = converted %int.make_type_32.loc5_27, %.loc5_27.1 [template = i32] // CHECK:STDOUT: @Sub.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Negate.decl: Negate = fn_decl @Negate [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32.loc6_14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %int.make_type_32.loc6_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_32.loc6_14 [template = i32] // CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_32.loc6_14, %.loc6_14.1 [template = i32] // CHECK:STDOUT: %a.loc6_11.1: i32 = param a // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc6_11.1 -// CHECK:STDOUT: %int.make_type_32.loc6_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc6_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_32.loc6_22 [template = i32] // CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_32.loc6_22, %.loc6_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc9: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_32.loc9 [template = i32] // CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_32.loc9, %.loc9_8.1 [template = i32] -// CHECK:STDOUT: %Mod.ref.loc9: Mod = name_ref Mod, %Mod.decl [template = constants.%struct.2] -// CHECK:STDOUT: %Negate.ref.loc9_18: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Mod.ref.loc9: = name_ref Mod, %Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Negate.ref.loc9_18: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc9_25: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %int.unegate.loc9_24: init i32 = call %Negate.ref.loc9_18(%.loc9_25) [template = constants.%.3] -// CHECK:STDOUT: %Negate.ref.loc9_39: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Negate.ref.loc9_39: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc9_46: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.unegate.loc9_45: init i32 = call %Negate.ref.loc9_39(%.loc9_46) [template = constants.%.5] // CHECK:STDOUT: %.loc9_17.1: i32 = value_of_initializer %int.unegate.loc9_24 [template = constants.%.3] @@ -254,13 +254,13 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %.loc9_49.1: i32 = value_of_initializer %int.umod.loc9 [template = constants.%.3] // CHECK:STDOUT: %.loc9_49.2: i32 = converted %int.umod.loc9, %.loc9_49.1 [template = constants.%.3] // CHECK:STDOUT: %a.loc9: i32 = bind_name a, %.loc9_49.2 -// CHECK:STDOUT: %import_ref.10: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_32.loc12, %.loc12_8.1 [template = i32] -// CHECK:STDOUT: %Mod.ref.loc12: Mod = name_ref Mod, %Mod.decl [template = constants.%struct.2] -// CHECK:STDOUT: %Sub.ref.loc12: Sub = name_ref Sub, %Sub.decl [template = constants.%struct.3] -// CHECK:STDOUT: %Negate.ref.loc12: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Mod.ref.loc12: = name_ref Mod, %Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Sub.ref.loc12: = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc12: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_29: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %int.unegate.loc12: init i32 = call %Negate.ref.loc12(%.loc12_29) [template = constants.%.3] // CHECK:STDOUT: %.loc12_43: i32 = int_literal 1 [template = constants.%.4] @@ -274,20 +274,20 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %.loc12_49.1: i32 = value_of_initializer %int.umod.loc12 [template = constants.%.7] // CHECK:STDOUT: %.loc12_49.2: i32 = converted %int.umod.loc12, %.loc12_49.1 [template = constants.%.7] // CHECK:STDOUT: %b.loc12: i32 = bind_name b, %.loc12_49.2 -// CHECK:STDOUT: %import_ref.11: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_32.loc15, %.loc15_8.1 [template = i32] -// CHECK:STDOUT: %Mod.ref.loc15: Mod = name_ref Mod, %Mod.decl [template = constants.%struct.2] -// CHECK:STDOUT: %Sub.ref.loc15: Sub = name_ref Sub, %Sub.decl [template = constants.%struct.3] -// CHECK:STDOUT: %Negate.ref.loc15_22: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Mod.ref.loc15: = name_ref Mod, %Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Sub.ref.loc15: = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc15_22: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc15_29: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %int.unegate.loc15_28: init i32 = call %Negate.ref.loc15_22(%.loc15_29) [template = constants.%.3] // CHECK:STDOUT: %.loc15_43: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc15_21.1: i32 = value_of_initializer %int.unegate.loc15_28 [template = constants.%.3] // CHECK:STDOUT: %.loc15_21.2: i32 = converted %int.unegate.loc15_28, %.loc15_21.1 [template = constants.%.3] // CHECK:STDOUT: %int.usub.loc15: init i32 = call %Sub.ref.loc15(%.loc15_21.2, %.loc15_43) [template = constants.%.6] -// CHECK:STDOUT: %Negate.ref.loc15_47: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Negate.ref.loc15_47: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc15_54: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %int.unegate.loc15_53: init i32 = call %Negate.ref.loc15_47(%.loc15_54) [template = constants.%.5] // CHECK:STDOUT: %.loc15_17.1: i32 = value_of_initializer %int.usub.loc15 [template = constants.%.6] @@ -311,11 +311,11 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: --- fail_div_by_zero.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Mod: type = fn_type @Mod [template] -// CHECK:STDOUT: %struct.2: Mod = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Mod.type: type = fn_type @Mod [template] +// CHECK:STDOUT: %Mod: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: } @@ -326,41 +326,41 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: .Mod = %Mod.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Mod.decl: Mod = fn_decl @Mod [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Mod.decl: = fn_decl @Mod [template = constants.%Mod] { +// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] // CHECK:STDOUT: %a.loc4_8.1: i32 = param a // CHECK:STDOUT: @Mod.%a: i32 = bind_name a, %a.loc4_8.1 -// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] // CHECK:STDOUT: %b.loc4_16.1: i32 = param b // CHECK:STDOUT: @Mod.%b: i32 = bind_name b, %b.loc4_16.1 -// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Mod.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_32.loc12, %.loc12_8.1 [template = i32] -// CHECK:STDOUT: %Mod.ref.loc12: Mod = name_ref Mod, %Mod.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Mod.ref.loc12: = name_ref Mod, %Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %.loc12_18: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc12_21: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %int.umod.loc12: init i32 = call %Mod.ref.loc12(%.loc12_18, %.loc12_21) [template = ] // CHECK:STDOUT: %.loc12_23.1: i32 = value_of_initializer %int.umod.loc12 [template = ] // CHECK:STDOUT: %.loc12_23.2: i32 = converted %int.umod.loc12, %.loc12_23.1 [template = ] // CHECK:STDOUT: %a.loc12: i32 = bind_name a, %.loc12_23.2 -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_8.1: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_8.2: type = converted %int.make_type_32.loc17, %.loc17_8.1 [template = i32] -// CHECK:STDOUT: %Mod.ref.loc17: Mod = name_ref Mod, %Mod.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Mod.ref.loc17: = name_ref Mod, %Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %.loc17_18: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %.loc17_21: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %int.umod.loc17: init i32 = call %Mod.ref.loc17(%.loc17_18, %.loc17_21) [template = ] diff --git a/toolchain/check/testdata/builtins/int/umul.carbon b/toolchain/check/testdata/builtins/int/umul.carbon index 3cdb90b72fd0..ed177072c31b 100644 --- a/toolchain/check/testdata/builtins/int/umul.carbon +++ b/toolchain/check/testdata/builtins/int/umul.carbon @@ -31,18 +31,18 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: --- int_mul.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Mul: type = fn_type @Mul [template] -// CHECK:STDOUT: %struct.2: Mul = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Mul.type: type = fn_type @Mul [template] +// CHECK:STDOUT: %Mul: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 6 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] // CHECK:STDOUT: %.6: type = ptr_type [i32; 6] [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.3: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -53,28 +53,28 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Mul.decl: Mul = fn_decl @Mul [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Mul.decl: = fn_decl @Mul [template = constants.%Mul] { +// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] // CHECK:STDOUT: %a.loc2_8.1: i32 = param a // CHECK:STDOUT: @Mul.%a: i32 = bind_name a, %a.loc2_8.1 -// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] // CHECK:STDOUT: %b.loc2_16.1: i32 = param b // CHECK:STDOUT: @Mul.%b: i32 = bind_name b, %b.loc2_16.1 -// CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_32.loc2_27 [template = i32] // CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_32.loc2_27, %.loc2_27.1 [template = i32] // CHECK:STDOUT: @Mul.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %Mul.ref: Mul = name_ref Mul, %Mul.decl [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %Mul.ref: = name_ref Mul, %Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %.loc4_20: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.umul: init i32 = call %Mul.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] @@ -83,8 +83,8 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %.loc4_25: type = array_type %int.umul, i32 [template = constants.%.5] // CHECK:STDOUT: %arr.var: ref [i32; 6] = var arr // CHECK:STDOUT: %arr: ref [i32; 6] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 6 [template = constants.%.4] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] @@ -93,21 +93,21 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %arr.ref: ref [i32; 6] = name_ref arr, %arr // CHECK:STDOUT: %.loc5_24: [i32; 6]* = addr_of %arr.ref // CHECK:STDOUT: %arr_p: [i32; 6]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] // CHECK:STDOUT: %a.loc7_16.1: i32 = param a // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 -// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] // CHECK:STDOUT: %b.loc7_24.1: i32 = param b // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 -// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] // CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_32.loc7_35, %.loc7_35.1 [template = i32] // CHECK:STDOUT: @RuntimeCall.%return: ref i32 = var @@ -120,7 +120,7 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mul.ref: Mul = name_ref Mul, file.%Mul.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Mul.ref: = name_ref Mul, file.%Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.umul: init i32 = call %Mul.ref(%a.ref, %b.ref) @@ -132,11 +132,11 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: --- overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Mul: type = fn_type @Mul [template] -// CHECK:STDOUT: %struct.2: Mul = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Mul.type: type = fn_type @Mul [template] +// CHECK:STDOUT: %Mul: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 32767 [template] // CHECK:STDOUT: %.3: i32 = int_literal 65536 [template] // CHECK:STDOUT: %.4: i32 = int_literal 2147418112 [template] @@ -150,41 +150,41 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: .Mul = %Mul.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Mul.decl: Mul = fn_decl @Mul [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Mul.decl: = fn_decl @Mul [template = constants.%Mul] { +// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] // CHECK:STDOUT: %a.loc4_8.1: i32 = param a // CHECK:STDOUT: @Mul.%a: i32 = bind_name a, %a.loc4_8.1 -// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] // CHECK:STDOUT: %b.loc4_16.1: i32 = param b // CHECK:STDOUT: @Mul.%b: i32 = bind_name b, %b.loc4_16.1 -// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Mul.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_32.loc6, %.loc6_8.1 [template = i32] -// CHECK:STDOUT: %Mul.ref.loc6: Mul = name_ref Mul, %Mul.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Mul.ref.loc6: = name_ref Mul, %Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %.loc6_18: i32 = int_literal 32767 [template = constants.%.2] // CHECK:STDOUT: %.loc6_26: i32 = int_literal 65536 [template = constants.%.3] // CHECK:STDOUT: %int.umul.loc6: init i32 = call %Mul.ref.loc6(%.loc6_18, %.loc6_26) [template = constants.%.4] // CHECK:STDOUT: %.loc6_34.1: i32 = value_of_initializer %int.umul.loc6 [template = constants.%.4] // CHECK:STDOUT: %.loc6_34.2: i32 = converted %int.umul.loc6, %.loc6_34.1 [template = constants.%.4] // CHECK:STDOUT: %a.loc6: i32 = bind_name a, %.loc6_34.2 -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_32.loc7, %.loc7_8.1 [template = i32] -// CHECK:STDOUT: %Mul.ref.loc7: Mul = name_ref Mul, %Mul.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Mul.ref.loc7: = name_ref Mul, %Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %.loc7_18: i32 = int_literal 32768 [template = constants.%.5] // CHECK:STDOUT: %.loc7_26: i32 = int_literal 65536 [template = constants.%.3] // CHECK:STDOUT: %int.umul.loc7: init i32 = call %Mul.ref.loc7(%.loc7_18, %.loc7_26) [template = constants.%.6] diff --git a/toolchain/check/testdata/builtins/int/unegate.carbon b/toolchain/check/testdata/builtins/int/unegate.carbon index 75ee94ff30fb..85e77800c636 100644 --- a/toolchain/check/testdata/builtins/int/unegate.carbon +++ b/toolchain/check/testdata/builtins/int/unegate.carbon @@ -115,19 +115,19 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: --- int_negate.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Negate: type = fn_type @Negate [template] -// CHECK:STDOUT: %struct.2: Negate = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] +// CHECK:STDOUT: %Negate: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 123 [template] // CHECK:STDOUT: %.3: i32 = int_literal -123 [template] // CHECK:STDOUT: %.4: type = array_type %.2, i32 [template] // CHECK:STDOUT: %.5: type = ptr_type [i32; 123] [template] // CHECK:STDOUT: %.6: i32 = int_literal 1 [template] // CHECK:STDOUT: %.7: i32 = int_literal -1 [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.3: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -138,23 +138,23 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Negate.decl: Negate = fn_decl @Negate [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc2_14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %int.make_type_32.loc2_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_14.1: type = value_of_initializer %int.make_type_32.loc2_14 [template = i32] // CHECK:STDOUT: %.loc2_14.2: type = converted %int.make_type_32.loc2_14, %.loc2_14.1 [template = i32] // CHECK:STDOUT: %a.loc2_11.1: i32 = param a // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc2_11.1 -// CHECK:STDOUT: %int.make_type_32.loc2_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_22.1: type = value_of_initializer %int.make_type_32.loc2_22 [template = i32] // CHECK:STDOUT: %.loc2_22.2: type = converted %int.make_type_32.loc2_22, %.loc2_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %Negate.ref.loc4_16: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.2] -// CHECK:STDOUT: %Negate.ref.loc4_23: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %Negate.ref.loc4_16: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc4_23: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc4_30: i32 = int_literal 123 [template = constants.%.2] // CHECK:STDOUT: %int.unegate.loc4_29: init i32 = call %Negate.ref.loc4_23(%.loc4_30) [template = constants.%.3] // CHECK:STDOUT: %.loc4_22.1: i32 = value_of_initializer %int.unegate.loc4_29 [template = constants.%.3] @@ -165,8 +165,8 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc4_35: type = array_type %int.unegate.loc4_22, i32 [template = constants.%.4] // CHECK:STDOUT: %arr.var: ref [i32; 123] = var arr // CHECK:STDOUT: %arr: ref [i32; 123] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 123 [template = constants.%.2] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] @@ -175,31 +175,31 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %arr.ref: ref [i32; 123] = name_ref arr, %arr // CHECK:STDOUT: %.loc5_26: [i32; 123]* = addr_of %arr.ref // CHECK:STDOUT: %arr_p: [i32; 123]* = bind_name arr_p, %.loc5_26 -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_32.loc7, %.loc7_8.1 [template = i32] -// CHECK:STDOUT: %Negate.ref.loc7: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Negate.ref.loc7: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc7_21: i32 = int_literal 1 [template = constants.%.6] // CHECK:STDOUT: %int.unegate.loc7: init i32 = call %Negate.ref.loc7(%.loc7_21) [template = constants.%.7] // CHECK:STDOUT: %.loc7_23.1: i32 = value_of_initializer %int.unegate.loc7 [template = constants.%.7] // CHECK:STDOUT: %.loc7_23.2: i32 = converted %int.unegate.loc7, %.loc7_23.1 [template = constants.%.7] // CHECK:STDOUT: %n: i32 = bind_name n, %.loc7_23.2 -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc9_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %int.make_type_32.loc9_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %int.make_type_32.loc9_19 [template = i32] // CHECK:STDOUT: %.loc9_19.2: type = converted %int.make_type_32.loc9_19, %.loc9_19.1 [template = i32] // CHECK:STDOUT: %a.loc9_16.1: i32 = param a // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc9_16.1 -// CHECK:STDOUT: %int.make_type_32.loc9_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc9_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_27.1: type = value_of_initializer %int.make_type_32.loc9_27 [template = i32] // CHECK:STDOUT: %.loc9_27.2: type = converted %int.make_type_32.loc9_27, %.loc9_27.1 [template = i32] // CHECK:STDOUT: %b.loc9_24.1: i32 = param b // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc9_24.1 -// CHECK:STDOUT: %int.make_type_32.loc9_35: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc9_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_35.1: type = value_of_initializer %int.make_type_32.loc9_35 [template = i32] // CHECK:STDOUT: %.loc9_35.2: type = converted %int.make_type_32.loc9_35, %.loc9_35.1 [template = i32] // CHECK:STDOUT: @RuntimeCall.%return: ref i32 = var @@ -212,7 +212,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Negate.ref: Negate = name_ref Negate, file.%Negate.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Negate.ref: = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %int.unegate: init i32 = call %Negate.ref(%a.ref) // CHECK:STDOUT: %.loc10_19.1: i32 = value_of_initializer %int.unegate @@ -223,27 +223,27 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: --- fail_bad_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %TooFew: type = fn_type @TooFew [template] -// CHECK:STDOUT: %struct.2: TooFew = struct_value () [template] -// CHECK:STDOUT: %TooMany: type = fn_type @TooMany [template] -// CHECK:STDOUT: %struct.3: TooMany = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.4: Bool = struct_value () [template] -// CHECK:STDOUT: %BadReturnType: type = fn_type @BadReturnType [template] -// CHECK:STDOUT: %struct.5: BadReturnType = struct_value () [template] -// CHECK:STDOUT: %JustRight: type = fn_type @JustRight [template] -// CHECK:STDOUT: %struct.6: JustRight = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] +// CHECK:STDOUT: %TooFew: = struct_value () [template] +// CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] +// CHECK:STDOUT: %TooMany: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %BadReturnType.type: type = fn_type @BadReturnType [template] +// CHECK:STDOUT: %BadReturnType: = struct_value () [template] +// CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] +// CHECK:STDOUT: %JustRight: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] -// CHECK:STDOUT: %RuntimeCallTooFew: type = fn_type @RuntimeCallTooFew [template] -// CHECK:STDOUT: %struct.7: RuntimeCallTooFew = struct_value () [template] -// CHECK:STDOUT: %RuntimeCallTooMany: type = fn_type @RuntimeCallTooMany [template] -// CHECK:STDOUT: %struct.8: RuntimeCallTooMany = struct_value () [template] -// CHECK:STDOUT: %RuntimeCallBadReturnType: type = fn_type @RuntimeCallBadReturnType [template] -// CHECK:STDOUT: %struct.9: RuntimeCallBadReturnType = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] +// CHECK:STDOUT: %RuntimeCallTooFew: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] +// CHECK:STDOUT: %RuntimeCallTooMany: = struct_value () [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType.type: type = fn_type @RuntimeCallBadReturnType [template] +// CHECK:STDOUT: %RuntimeCallBadReturnType: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -262,82 +262,82 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: .RuntimeCallBadReturnType = %RuntimeCallBadReturnType.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TooFew.decl: TooFew = fn_decl @TooFew [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %TooFew.decl: = fn_decl @TooFew [template = constants.%TooFew] { +// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_16.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_16.2: type = converted %int.make_type_32.loc8, %.loc8_16.1 [template = i32] // CHECK:STDOUT: @TooFew.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TooMany.decl: TooMany = fn_decl @TooMany [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc13_15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %TooMany.decl: = fn_decl @TooMany [template = constants.%TooMany] { +// CHECK:STDOUT: %int.make_type_32.loc13_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %int.make_type_32.loc13_15 [template = i32] // CHECK:STDOUT: %.loc13_15.2: type = converted %int.make_type_32.loc13_15, %.loc13_15.1 [template = i32] // CHECK:STDOUT: %a.loc13_12.1: i32 = param a // CHECK:STDOUT: @TooMany.%a: i32 = bind_name a, %a.loc13_12.1 -// CHECK:STDOUT: %int.make_type_32.loc13_23: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13_23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %int.make_type_32.loc13_23 [template = i32] // CHECK:STDOUT: %.loc13_23.2: type = converted %int.make_type_32.loc13_23, %.loc13_23.1 [template = i32] // CHECK:STDOUT: %b.loc13_20.1: i32 = param b // CHECK:STDOUT: @TooMany.%b: i32 = bind_name b, %b.loc13_20.1 -// CHECK:STDOUT: %int.make_type_32.loc13_31: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13_31: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_32.loc13_31 [template = i32] // CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_32.loc13_31, %.loc13_31.1 [template = i32] // CHECK:STDOUT: @TooMany.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %BadReturnType.decl: BadReturnType = fn_decl @BadReturnType [template = constants.%struct.5] { -// CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %BadReturnType.decl: = fn_decl @BadReturnType [template = constants.%BadReturnType] { +// CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_21.1: type = value_of_initializer %int.make_type_32.loc18 [template = i32] // CHECK:STDOUT: %.loc18_21.2: type = converted %int.make_type_32.loc18, %.loc18_21.1 [template = i32] // CHECK:STDOUT: %a.loc18_18.1: i32 = param a // CHECK:STDOUT: @BadReturnType.%a: i32 = bind_name a, %a.loc18_18.1 -// CHECK:STDOUT: %bool.make_type.loc18: init type = call constants.%struct.4() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc18: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_29.1: type = value_of_initializer %bool.make_type.loc18 [template = bool] // CHECK:STDOUT: %.loc18_29.2: type = converted %bool.make_type.loc18, %.loc18_29.1 [template = bool] // CHECK:STDOUT: @BadReturnType.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %JustRight.decl: JustRight = fn_decl @JustRight [template = constants.%struct.6] { -// CHECK:STDOUT: %int.make_type_32.loc19_17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %JustRight.decl: = fn_decl @JustRight [template = constants.%JustRight] { +// CHECK:STDOUT: %int.make_type_32.loc19_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %int.make_type_32.loc19_17 [template = i32] // CHECK:STDOUT: %.loc19_17.2: type = converted %int.make_type_32.loc19_17, %.loc19_17.1 [template = i32] // CHECK:STDOUT: %a.loc19_14.1: i32 = param a // CHECK:STDOUT: @JustRight.%a: i32 = bind_name a, %a.loc19_14.1 -// CHECK:STDOUT: %int.make_type_32.loc19_25: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc19_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_25.1: type = value_of_initializer %int.make_type_32.loc19_25 [template = i32] // CHECK:STDOUT: %.loc19_25.2: type = converted %int.make_type_32.loc19_25, %.loc19_25.1 [template = i32] // CHECK:STDOUT: @JustRight.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %TooFew.ref: TooFew = name_ref TooFew, %TooFew.decl [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %TooFew.call: init i32 = call %TooFew.ref() // CHECK:STDOUT: %too_few.var: ref = var too_few // CHECK:STDOUT: %too_few: ref = bind_name too_few, %too_few.var -// CHECK:STDOUT: %import_ref.10: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %TooMany.ref: TooMany = name_ref TooMany, %TooMany.decl [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %.loc30_29: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc30_32: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %TooMany.call: init i32 = call %TooMany.ref(%.loc30_29, %.loc30_32) // CHECK:STDOUT: %too_many.var: ref = var too_many // CHECK:STDOUT: %too_many: ref = bind_name too_many, %too_many.var -// CHECK:STDOUT: %import_ref.11: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc35: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %BadReturnType.ref: BadReturnType = name_ref BadReturnType, %BadReturnType.decl [template = constants.%struct.5] +// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc35: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %.loc35: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35) // CHECK:STDOUT: %bad_return_type.var: ref = var bad_return_type // CHECK:STDOUT: %bad_return_type: ref = bind_name bad_return_type, %bad_return_type.var -// CHECK:STDOUT: %import_ref.12: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc44: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %JustRight.ref: JustRight = name_ref JustRight, %JustRight.decl [template = constants.%struct.6] +// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc44: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %JustRight.ref: = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] // CHECK:STDOUT: %.loc44_31: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc44_34: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.unegate: init i32 = call %JustRight.ref() [template = ] @@ -346,59 +346,59 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc44_36: type = array_type %int.unegate, i32 [template = ] // CHECK:STDOUT: %bad_call.var: ref = var bad_call // CHECK:STDOUT: %bad_call: ref = bind_name bad_call, %bad_call.var -// CHECK:STDOUT: %import_ref.13: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.14: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCallTooFew.decl: RuntimeCallTooFew = fn_decl @RuntimeCallTooFew [template = constants.%struct.7] { -// CHECK:STDOUT: %int.make_type_32.loc46_25: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.14: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCallTooFew.decl: = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { +// CHECK:STDOUT: %int.make_type_32.loc46_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc46_25.1: type = value_of_initializer %int.make_type_32.loc46_25 [template = i32] // CHECK:STDOUT: %.loc46_25.2: type = converted %int.make_type_32.loc46_25, %.loc46_25.1 [template = i32] // CHECK:STDOUT: %a.loc46_22.1: i32 = param a // CHECK:STDOUT: @RuntimeCallTooFew.%a: i32 = bind_name a, %a.loc46_22.1 -// CHECK:STDOUT: %int.make_type_32.loc46_33: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc46_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc46_33.1: type = value_of_initializer %int.make_type_32.loc46_33 [template = i32] // CHECK:STDOUT: %.loc46_33.2: type = converted %int.make_type_32.loc46_33, %.loc46_33.1 [template = i32] // CHECK:STDOUT: @RuntimeCallTooFew.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.15: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.16: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.17: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.18: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCallTooMany.decl: RuntimeCallTooMany = fn_decl @RuntimeCallTooMany [template = constants.%struct.8] { -// CHECK:STDOUT: %int.make_type_32.loc57_26: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.15: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.16: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.17: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.18: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCallTooMany.decl: = fn_decl @RuntimeCallTooMany [template = constants.%RuntimeCallTooMany] { +// CHECK:STDOUT: %int.make_type_32.loc57_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc57_26.1: type = value_of_initializer %int.make_type_32.loc57_26 [template = i32] // CHECK:STDOUT: %.loc57_26.2: type = converted %int.make_type_32.loc57_26, %.loc57_26.1 [template = i32] // CHECK:STDOUT: %a.loc57_23.1: i32 = param a // CHECK:STDOUT: @RuntimeCallTooMany.%a: i32 = bind_name a, %a.loc57_23.1 -// CHECK:STDOUT: %int.make_type_32.loc57_34: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc57_34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc57_34.1: type = value_of_initializer %int.make_type_32.loc57_34 [template = i32] // CHECK:STDOUT: %.loc57_34.2: type = converted %int.make_type_32.loc57_34, %.loc57_34.1 [template = i32] // CHECK:STDOUT: %b.loc57_31.1: i32 = param b // CHECK:STDOUT: @RuntimeCallTooMany.%b: i32 = bind_name b, %b.loc57_31.1 -// CHECK:STDOUT: %int.make_type_32.loc57_42: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc57_42: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc57_42.1: type = value_of_initializer %int.make_type_32.loc57_42 [template = i32] // CHECK:STDOUT: %.loc57_42.2: type = converted %int.make_type_32.loc57_42, %.loc57_42.1 [template = i32] // CHECK:STDOUT: %c.loc57_39.1: i32 = param c // CHECK:STDOUT: @RuntimeCallTooMany.%c: i32 = bind_name c, %c.loc57_39.1 -// CHECK:STDOUT: %int.make_type_32.loc57_50: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc57_50: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc57_50.1: type = value_of_initializer %int.make_type_32.loc57_50 [template = i32] // CHECK:STDOUT: %.loc57_50.2: type = converted %int.make_type_32.loc57_50, %.loc57_50.1 [template = i32] // CHECK:STDOUT: @RuntimeCallTooMany.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.19: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.20: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.21: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: RuntimeCallBadReturnType = fn_decl @RuntimeCallBadReturnType [template = constants.%struct.9] { -// CHECK:STDOUT: %int.make_type_32.loc68_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.19: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.20: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.21: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %RuntimeCallBadReturnType.decl: = fn_decl @RuntimeCallBadReturnType [template = constants.%RuntimeCallBadReturnType] { +// CHECK:STDOUT: %int.make_type_32.loc68_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc68_32.1: type = value_of_initializer %int.make_type_32.loc68_32 [template = i32] // CHECK:STDOUT: %.loc68_32.2: type = converted %int.make_type_32.loc68_32, %.loc68_32.1 [template = i32] // CHECK:STDOUT: %a.loc68_29.1: i32 = param a // CHECK:STDOUT: @RuntimeCallBadReturnType.%a: i32 = bind_name a, %a.loc68_29.1 -// CHECK:STDOUT: %int.make_type_32.loc68_40: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc68_40: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc68_40.1: type = value_of_initializer %int.make_type_32.loc68_40 [template = i32] // CHECK:STDOUT: %.loc68_40.2: type = converted %int.make_type_32.loc68_40, %.loc68_40.1 [template = i32] // CHECK:STDOUT: %b.loc68_37.1: i32 = param b // CHECK:STDOUT: @RuntimeCallBadReturnType.%b: i32 = bind_name b, %b.loc68_37.1 -// CHECK:STDOUT: %bool.make_type.loc68: init type = call constants.%struct.4() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc68: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc68_48.1: type = value_of_initializer %bool.make_type.loc68 [template = bool] // CHECK:STDOUT: %.loc68_48.2: type = converted %bool.make_type.loc68, %.loc68_48.1 [template = bool] // CHECK:STDOUT: @RuntimeCallBadReturnType.%return: ref bool = var @@ -419,7 +419,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooFew(%a: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooFew.ref: TooFew = name_ref TooFew, file.%TooFew.decl [template = constants.%struct.2] +// CHECK:STDOUT: %TooFew.ref: = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %TooFew.call: init i32 = call %TooFew.ref() [template = ] // CHECK:STDOUT: %.loc54_19.1: i32 = value_of_initializer %TooFew.call [template = ] @@ -429,7 +429,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooMany(%a: i32, %b: i32, %c: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TooMany.ref: TooMany = name_ref TooMany, file.%TooMany.decl [template = constants.%struct.3] +// CHECK:STDOUT: %TooMany.ref: = name_ref TooMany, file.%TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %c.ref: i32 = name_ref c, %c @@ -441,7 +441,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallBadReturnType(%a: i32, %b: i32) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %BadReturnType.ref: BadReturnType = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%struct.5] +// CHECK:STDOUT: %BadReturnType.ref: = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref() [template = ] @@ -453,13 +453,13 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: --- overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Negate: type = fn_type @Negate [template] -// CHECK:STDOUT: %struct.2: Negate = struct_value () [template] -// CHECK:STDOUT: %Sub: type = fn_type @Sub [template] -// CHECK:STDOUT: %struct.3: Sub = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] +// CHECK:STDOUT: %Negate: = struct_value () [template] +// CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] +// CHECK:STDOUT: %Sub: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 2147483647 [template] // CHECK:STDOUT: %.3: i32 = int_literal -2147483647 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] @@ -473,44 +473,44 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: .Sub = %Sub.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Negate.decl: Negate = fn_decl @Negate [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc4_14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Negate.decl: = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %int.make_type_32.loc4_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_14.1: type = value_of_initializer %int.make_type_32.loc4_14 [template = i32] // CHECK:STDOUT: %.loc4_14.2: type = converted %int.make_type_32.loc4_14, %.loc4_14.1 [template = i32] // CHECK:STDOUT: %a.loc4_11.1: i32 = param a // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc4_11.1 -// CHECK:STDOUT: %int.make_type_32.loc4_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_22.1: type = value_of_initializer %int.make_type_32.loc4_22 [template = i32] // CHECK:STDOUT: %.loc4_22.2: type = converted %int.make_type_32.loc4_22, %.loc4_22.1 [template = i32] // CHECK:STDOUT: @Negate.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Sub.decl: Sub = fn_decl @Sub [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Sub.decl: = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_32.loc5_11 [template = i32] // CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_32.loc5_11, %.loc5_11.1 [template = i32] // CHECK:STDOUT: %a.loc5_8.1: i32 = param a // CHECK:STDOUT: @Sub.%a: i32 = bind_name a, %a.loc5_8.1 -// CHECK:STDOUT: %int.make_type_32.loc5_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc5_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_32.loc5_19 [template = i32] // CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_32.loc5_19, %.loc5_19.1 [template = i32] // CHECK:STDOUT: %b.loc5_16.1: i32 = param b // CHECK:STDOUT: @Sub.%b: i32 = bind_name b, %b.loc5_16.1 -// CHECK:STDOUT: %int.make_type_32.loc5_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc5_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_27.1: type = value_of_initializer %int.make_type_32.loc5_27 [template = i32] // CHECK:STDOUT: %.loc5_27.2: type = converted %int.make_type_32.loc5_27, %.loc5_27.1 [template = i32] // CHECK:STDOUT: @Sub.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_32.loc8, %.loc8_8.1 [template = i32] -// CHECK:STDOUT: %Negate.ref.loc8_14: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.2] -// CHECK:STDOUT: %Negate.ref.loc8_21: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Negate.ref.loc8_14: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc8_21: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc8_28: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %int.unegate.loc8_27: init i32 = call %Negate.ref.loc8_21(%.loc8_28) [template = constants.%.3] // CHECK:STDOUT: %.loc8_20.1: i32 = value_of_initializer %int.unegate.loc8_27 [template = constants.%.3] @@ -519,13 +519,13 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc8_40.1: i32 = value_of_initializer %int.unegate.loc8_20 [template = constants.%.2] // CHECK:STDOUT: %.loc8_40.2: i32 = converted %int.unegate.loc8_20, %.loc8_40.1 [template = constants.%.2] // CHECK:STDOUT: %a.loc8: i32 = bind_name a, %.loc8_40.2 -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_8.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_8.2: type = converted %int.make_type_32.loc11, %.loc11_8.1 [template = i32] -// CHECK:STDOUT: %Negate.ref.loc11_14: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.2] -// CHECK:STDOUT: %Sub.ref: Sub = name_ref Sub, %Sub.decl [template = constants.%struct.3] -// CHECK:STDOUT: %Negate.ref.loc11_25: Negate = name_ref Negate, %Negate.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Negate.ref.loc11_14: = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Sub.ref: = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc11_25: = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc11_32: i32 = int_literal 2147483647 [template = constants.%.2] // CHECK:STDOUT: %int.unegate.loc11_31: init i32 = call %Negate.ref.loc11_25(%.loc11_32) [template = constants.%.3] // CHECK:STDOUT: %.loc11_45: i32 = int_literal 1 [template = constants.%.4] diff --git a/toolchain/check/testdata/builtins/int/usub.carbon b/toolchain/check/testdata/builtins/int/usub.carbon index 24d02e58c68f..36f44841e9df 100644 --- a/toolchain/check/testdata/builtins/int/usub.carbon +++ b/toolchain/check/testdata/builtins/int/usub.carbon @@ -32,18 +32,18 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: --- int_sub.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Sub: type = fn_type @Sub [template] -// CHECK:STDOUT: %struct.2: Sub = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] +// CHECK:STDOUT: %Sub: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] // CHECK:STDOUT: %.6: type = ptr_type [i32; 1] [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.3: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -54,28 +54,28 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Sub.decl: Sub = fn_decl @Sub [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Sub.decl: = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] // CHECK:STDOUT: %a.loc2_8.1: i32 = param a // CHECK:STDOUT: @Sub.%a: i32 = bind_name a, %a.loc2_8.1 -// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] // CHECK:STDOUT: %b.loc2_16.1: i32 = param b // CHECK:STDOUT: @Sub.%b: i32 = bind_name b, %b.loc2_16.1 -// CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_32.loc2_27 [template = i32] // CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_32.loc2_27, %.loc2_27.1 [template = i32] // CHECK:STDOUT: @Sub.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %Sub.ref: Sub = name_ref Sub, %Sub.decl [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %Sub.ref: = name_ref Sub, %Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %.loc4_20: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.usub: init i32 = call %Sub.ref(%.loc4_20, %.loc4_23) [template = constants.%.4] @@ -84,8 +84,8 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %.loc4_25: type = array_type %int.usub, i32 [template = constants.%.5] // CHECK:STDOUT: %arr.var: ref [i32; 1] = var arr // CHECK:STDOUT: %arr: ref [i32; 1] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] @@ -94,21 +94,21 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %arr.ref: ref [i32; 1] = name_ref arr, %arr // CHECK:STDOUT: %.loc5_24: [i32; 1]* = addr_of %arr.ref // CHECK:STDOUT: %arr_p: [i32; 1]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] // CHECK:STDOUT: %a.loc7_16.1: i32 = param a // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 -// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] // CHECK:STDOUT: %b.loc7_24.1: i32 = param b // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 -// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] // CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_32.loc7_35, %.loc7_35.1 [template = i32] // CHECK:STDOUT: @RuntimeCall.%return: ref i32 = var @@ -121,7 +121,7 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Sub.ref: Sub = name_ref Sub, file.%Sub.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Sub.ref: = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.usub: init i32 = call %Sub.ref(%a.ref, %b.ref) @@ -133,11 +133,11 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: --- overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Sub: type = fn_type @Sub [template] -// CHECK:STDOUT: %struct.2: Sub = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] +// CHECK:STDOUT: %Sub: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2147483647 [template] // CHECK:STDOUT: %.4: i32 = int_literal -2147483647 [template] @@ -152,42 +152,42 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: .Sub = %Sub.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Sub.decl: Sub = fn_decl @Sub [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Sub.decl: = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] // CHECK:STDOUT: %a.loc4_8.1: i32 = param a // CHECK:STDOUT: @Sub.%a: i32 = bind_name a, %a.loc4_8.1 -// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] // CHECK:STDOUT: %b.loc4_16.1: i32 = param b // CHECK:STDOUT: @Sub.%b: i32 = bind_name b, %b.loc4_16.1 -// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4_27, %.loc4_27.1 [template = i32] // CHECK:STDOUT: @Sub.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_32.loc6, %.loc6_8.1 [template = i32] -// CHECK:STDOUT: %Sub.ref.loc6: Sub = name_ref Sub, %Sub.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Sub.ref.loc6: = name_ref Sub, %Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %.loc6_18: i32 = int_literal 0 [template = constants.%.2] // CHECK:STDOUT: %.loc6_21: i32 = int_literal 2147483647 [template = constants.%.3] // CHECK:STDOUT: %int.usub.loc6: init i32 = call %Sub.ref.loc6(%.loc6_18, %.loc6_21) [template = constants.%.4] // CHECK:STDOUT: %.loc6_32.1: i32 = value_of_initializer %int.usub.loc6 [template = constants.%.4] // CHECK:STDOUT: %.loc6_32.2: i32 = converted %int.usub.loc6, %.loc6_32.1 [template = constants.%.4] // CHECK:STDOUT: %a.loc6: i32 = bind_name a, %.loc6_32.2 -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_32.loc7, %.loc7_8.1 [template = i32] -// CHECK:STDOUT: %Sub.ref.loc7_14: Sub = name_ref Sub, %Sub.decl [template = constants.%struct.2] -// CHECK:STDOUT: %Sub.ref.loc7_18: Sub = name_ref Sub, %Sub.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Sub.ref.loc7_14: = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref.loc7_18: = name_ref Sub, %Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %.loc7_22: i32 = int_literal 0 [template = constants.%.2] // CHECK:STDOUT: %.loc7_25: i32 = int_literal 2147483647 [template = constants.%.3] // CHECK:STDOUT: %int.usub.loc7_21: init i32 = call %Sub.ref.loc7_18(%.loc7_22, %.loc7_25) [template = constants.%.4] @@ -198,12 +198,12 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %.loc7_40.1: i32 = value_of_initializer %int.usub.loc7_17 [template = constants.%.6] // CHECK:STDOUT: %.loc7_40.2: i32 = converted %int.usub.loc7_17, %.loc7_40.1 [template = constants.%.6] // CHECK:STDOUT: %b.loc7: i32 = bind_name b, %.loc7_40.2 -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_32.loc8, %.loc8_8.1 [template = i32] -// CHECK:STDOUT: %Sub.ref.loc8_14: Sub = name_ref Sub, %Sub.decl [template = constants.%struct.2] -// CHECK:STDOUT: %Sub.ref.loc8_18: Sub = name_ref Sub, %Sub.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Sub.ref.loc8_14: = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref.loc8_18: = name_ref Sub, %Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %.loc8_22: i32 = int_literal 0 [template = constants.%.2] // CHECK:STDOUT: %.loc8_25: i32 = int_literal 2147483647 [template = constants.%.3] // CHECK:STDOUT: %int.usub.loc8_21: init i32 = call %Sub.ref.loc8_18(%.loc8_22, %.loc8_25) [template = constants.%.4] diff --git a/toolchain/check/testdata/builtins/int/xor.carbon b/toolchain/check/testdata/builtins/int/xor.carbon index 05168c9022de..a1b95c6e63b3 100644 --- a/toolchain/check/testdata/builtins/int/xor.carbon +++ b/toolchain/check/testdata/builtins/int/xor.carbon @@ -22,18 +22,18 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: --- int_xor.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Xor: type = fn_type @Xor [template] -// CHECK:STDOUT: %struct.2: Xor = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Xor.type: type = fn_type @Xor [template] +// CHECK:STDOUT: %Xor: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 12 [template] // CHECK:STDOUT: %.3: i32 = int_literal 10 [template] // CHECK:STDOUT: %.4: i32 = int_literal 6 [template] // CHECK:STDOUT: %.5: type = array_type %.4, i32 [template] // CHECK:STDOUT: %.6: type = ptr_type [i32; 6] [template] -// CHECK:STDOUT: %RuntimeCall: type = fn_type @RuntimeCall [template] -// CHECK:STDOUT: %struct.3: RuntimeCall = struct_value () [template] +// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] +// CHECK:STDOUT: %RuntimeCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -44,28 +44,28 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Xor.decl: Xor = fn_decl @Xor [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Xor.decl: = fn_decl @Xor [template = constants.%Xor] { +// CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] // CHECK:STDOUT: %a.loc2_8.1: i32 = param a // CHECK:STDOUT: @Xor.%a: i32 = bind_name a, %a.loc2_8.1 -// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] // CHECK:STDOUT: %b.loc2_16.1: i32 = param b // CHECK:STDOUT: @Xor.%b: i32 = bind_name b, %b.loc2_16.1 -// CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_32.loc2_27 [template = i32] // CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_32.loc2_27, %.loc2_27.1 [template = i32] // CHECK:STDOUT: @Xor.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %Xor.ref: Xor = name_ref Xor, %Xor.decl [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %Xor.ref: = name_ref Xor, %Xor.decl [template = constants.%Xor] // CHECK:STDOUT: %.loc4_20: i32 = int_literal 12 [template = constants.%.2] // CHECK:STDOUT: %.loc4_24: i32 = int_literal 10 [template = constants.%.3] // CHECK:STDOUT: %int.xor: init i32 = call %Xor.ref(%.loc4_20, %.loc4_24) [template = constants.%.4] @@ -74,8 +74,8 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %.loc4_27: type = array_type %int.xor, i32 [template = constants.%.5] // CHECK:STDOUT: %arr.var: ref [i32; 6] = var arr // CHECK:STDOUT: %arr: ref [i32; 6] = bind_name arr, %arr.var -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18: i32 = int_literal 6 [template = constants.%.4] // CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_32.loc5, %.loc5_13.1 [template = i32] @@ -84,21 +84,21 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %arr.ref: ref [i32; 6] = name_ref arr, %arr // CHECK:STDOUT: %.loc5_24: [i32; 6]* = addr_of %arr.ref // CHECK:STDOUT: %arr_p: [i32; 6]* = bind_name arr_p, %.loc5_24 -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %RuntimeCall.decl: RuntimeCall = fn_decl @RuntimeCall [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %RuntimeCall.decl: = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { +// CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] // CHECK:STDOUT: %a.loc7_16.1: i32 = param a // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 -// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] // CHECK:STDOUT: %b.loc7_24.1: i32 = param b // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 -// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] // CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_32.loc7_35, %.loc7_35.1 [template = i32] // CHECK:STDOUT: @RuntimeCall.%return: ref i32 = var @@ -111,7 +111,7 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a: i32, %b: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Xor.ref: Xor = name_ref Xor, file.%Xor.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Xor.ref: = name_ref Xor, file.%Xor.decl [template = constants.%Xor] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %int.xor: init i32 = call %Xor.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/class/adapt.carbon b/toolchain/check/testdata/class/adapt.carbon index c655e48ae932..aacad83d1f71 100644 --- a/toolchain/check/testdata/class/adapt.carbon +++ b/toolchain/check/testdata/class/adapt.carbon @@ -49,9 +49,9 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %SomeClass: type = class_type @SomeClass [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type SomeClass, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %SomeClassAdapter: type = class_type @SomeClassAdapter [template] @@ -68,20 +68,20 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %SomeClass.decl: type = class_decl @SomeClass [template = constants.%SomeClass] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %SomeClassAdapter.decl: type = class_decl @SomeClassAdapter [template = constants.%SomeClassAdapter] {} // CHECK:STDOUT: %StructAdapter.decl: type = class_decl @StructAdapter [template = constants.%StructAdapter] {} -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @SomeClass { -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_32.loc5, %.loc5_10.1 [template = i32] // CHECK:STDOUT: %.loc5_8: = field_decl a, element0 [template] -// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_32.loc6, %.loc6_10.1 [template = i32] // CHECK:STDOUT: %.loc6_8: = field_decl b, element1 [template] @@ -101,10 +101,10 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @StructAdapter { -// CHECK:STDOUT: %int.make_type_32.loc14_14: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_14.1: type = value_of_initializer %int.make_type_32.loc14_14 [template = i32] // CHECK:STDOUT: %.loc14_14.2: type = converted %int.make_type_32.loc14_14, %.loc14_14.1 [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc14_23: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_23.1: type = value_of_initializer %int.make_type_32.loc14_23 [template = i32] // CHECK:STDOUT: %.loc14_23.2: type = converted %int.make_type_32.loc14_23, %.loc14_23.1 [template = i32] // CHECK:STDOUT: %.loc14_26: type = struct_type {.a: i32, .b: i32} [template = constants.%.3] @@ -120,14 +120,14 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Adapted: type = class_type @Adapted [template] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %AdaptNotExtend: type = class_type @AdaptNotExtend [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -140,7 +140,7 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Adapted.decl: type = class_decl @Adapted [template = constants.%Adapted] {} // CHECK:STDOUT: %AdaptNotExtend.decl: type = class_decl @AdaptNotExtend [template = constants.%AdaptNotExtend] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %AdaptNotExtend.ref: type = name_ref AdaptNotExtend, %AdaptNotExtend.decl [template = constants.%AdaptNotExtend] // CHECK:STDOUT: %a.loc12_6.1: AdaptNotExtend = param a // CHECK:STDOUT: @F.2.%a: AdaptNotExtend = bind_name a, %a.loc12_6.1 @@ -148,7 +148,7 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Adapted { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Adapted diff --git a/toolchain/check/testdata/class/base.carbon b/toolchain/check/testdata/class/base.carbon index fab9d3f0515b..a09f1e33742e 100644 --- a/toolchain/check/testdata/class/base.carbon +++ b/toolchain/check/testdata/class/base.carbon @@ -30,9 +30,9 @@ fn Access(d: Derived) -> (i32, i32) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type Base, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.b: i32} [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] @@ -40,20 +40,20 @@ fn Access(d: Derived) -> (i32, i32) { // CHECK:STDOUT: %.5: type = unbound_element_type Derived, Base [template] // CHECK:STDOUT: %.6: type = unbound_element_type Derived, i32 [template] // CHECK:STDOUT: %.7: type = struct_type {.base: Base, .d: i32} [template] -// CHECK:STDOUT: %Make: type = fn_type @Make [template] -// CHECK:STDOUT: %struct.2: Make = struct_value () [template] +// CHECK:STDOUT: %Make.type: type = fn_type @Make [template] +// CHECK:STDOUT: %Make: = struct_value () [template] // CHECK:STDOUT: %.8: type = struct_type {.base: {.b: i32}*, .d: i32} [template] // CHECK:STDOUT: %.9: type = ptr_type {.base: {.b: i32}*, .d: i32} [template] // CHECK:STDOUT: %.10: type = ptr_type {.base: Base, .d: i32} [template] // CHECK:STDOUT: %.11: i32 = int_literal 4 [template] // CHECK:STDOUT: %.12: i32 = int_literal 7 [template] // CHECK:STDOUT: %.13: type = struct_type {.base: {.b: i32}, .d: i32} [template] -// CHECK:STDOUT: %struct.3: Base = struct_value (%.11) [template] -// CHECK:STDOUT: %struct.4: Derived = struct_value (%struct.3, %.12) [template] +// CHECK:STDOUT: %struct.1: Base = struct_value (%.11) [template] +// CHECK:STDOUT: %struct.2: Derived = struct_value (%struct.1, %.12) [template] // CHECK:STDOUT: %.14: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.15: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %Access: type = fn_type @Access [template] -// CHECK:STDOUT: %struct.5: Access = struct_value () [template] +// CHECK:STDOUT: %Access.type: type = fn_type @Access [template] +// CHECK:STDOUT: %Access: = struct_value () [template] // CHECK:STDOUT: %.16: type = ptr_type (i32, i32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -67,21 +67,21 @@ fn Access(d: Derived) -> (i32, i32) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [template = constants.%Derived] {} -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Make.decl: Make = fn_decl @Make [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Make.decl: = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %Derived.ref.loc21: type = name_ref Derived, %Derived.decl [template = constants.%Derived] // CHECK:STDOUT: @Make.%return: ref Derived = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Access.decl: Access = fn_decl @Access [template = constants.%struct.5] { +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Access.decl: = fn_decl @Access [template = constants.%Access] { // CHECK:STDOUT: %Derived.ref.loc25: type = name_ref Derived, %Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %d.loc25_11.1: Derived = param d // CHECK:STDOUT: @Access.%d: Derived = bind_name d, %d.loc25_11.1 -// CHECK:STDOUT: %int.make_type_32.loc25_27: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc25_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc25_27: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc25_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc25_35.1: (type, type) = tuple_literal (%int.make_type_32.loc25_27, %int.make_type_32.loc25_32) // CHECK:STDOUT: %.loc25_35.2: type = value_of_initializer %int.make_type_32.loc25_27 [template = i32] // CHECK:STDOUT: %.loc25_35.3: type = converted %int.make_type_32.loc25_27, %.loc25_35.2 [template = i32] @@ -93,7 +93,7 @@ fn Access(d: Derived) -> (i32, i32) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %.loc12_8: = field_decl b, element0 [template] @@ -106,7 +106,7 @@ fn Access(d: Derived) -> (i32, i32) { // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc16: = base_decl Base, element0 [template] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc18_10.2: type = converted %int.make_type_32, %.loc18_10.1 [template = i32] // CHECK:STDOUT: %.loc18_8: = field_decl d, element1 [template] @@ -129,12 +129,12 @@ fn Access(d: Derived) -> (i32, i32) { // CHECK:STDOUT: %.loc22_35.2: ref Base = class_element_access %return, element0 // CHECK:STDOUT: %.loc22_26.2: ref i32 = class_element_access %.loc22_35.2, element0 // CHECK:STDOUT: %.loc22_26.3: init i32 = initialize_from %.loc22_25 to %.loc22_26.2 [template = constants.%.11] -// CHECK:STDOUT: %.loc22_26.4: init Base = class_init (%.loc22_26.3), %.loc22_35.2 [template = constants.%struct.3] -// CHECK:STDOUT: %.loc22_35.3: init Base = converted %.loc22_26.1, %.loc22_26.4 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc22_26.4: init Base = class_init (%.loc22_26.3), %.loc22_35.2 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc22_35.3: init Base = converted %.loc22_26.1, %.loc22_26.4 [template = constants.%struct.1] // CHECK:STDOUT: %.loc22_35.4: ref i32 = class_element_access %return, element1 // CHECK:STDOUT: %.loc22_35.5: init i32 = initialize_from %.loc22_34 to %.loc22_35.4 [template = constants.%.12] -// CHECK:STDOUT: %.loc22_35.6: init Derived = class_init (%.loc22_35.3, %.loc22_35.5), %return [template = constants.%struct.4] -// CHECK:STDOUT: %.loc22_36: init Derived = converted %.loc22_35.1, %.loc22_35.6 [template = constants.%struct.4] +// CHECK:STDOUT: %.loc22_35.6: init Derived = class_init (%.loc22_35.3, %.loc22_35.5), %return [template = constants.%struct.2] +// CHECK:STDOUT: %.loc22_36: init Derived = converted %.loc22_35.1, %.loc22_35.6 [template = constants.%struct.2] // CHECK:STDOUT: return %.loc22_36 to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/base_field.carbon b/toolchain/check/testdata/class/base_field.carbon index d14ca812cd9f..f7ead5a5dd2c 100644 --- a/toolchain/check/testdata/class/base_field.carbon +++ b/toolchain/check/testdata/class/base_field.carbon @@ -29,9 +29,9 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type Base, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32, .c: i32} [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] @@ -41,8 +41,8 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: %.7: type = struct_type {.base: Base, .d: i32, .e: i32} [template] // CHECK:STDOUT: %.8: type = ptr_type Derived [template] // CHECK:STDOUT: %.9: type = ptr_type i32 [template] -// CHECK:STDOUT: %Access: type = fn_type @Access [template] -// CHECK:STDOUT: %struct.2: Access = struct_value () [template] +// CHECK:STDOUT: %Access.type: type = fn_type @Access [template] +// CHECK:STDOUT: %Access: = struct_value () [template] // CHECK:STDOUT: %.10: type = struct_type {.base: {.a: i32, .b: i32, .c: i32}*, .d: i32, .e: i32} [template] // CHECK:STDOUT: %.11: type = ptr_type {.base: {.a: i32, .b: i32, .c: i32}*, .d: i32, .e: i32} [template] // CHECK:STDOUT: %.12: type = ptr_type {.base: Base, .d: i32, .e: i32} [template] @@ -57,19 +57,19 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [template = constants.%Derived] {} -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Access.decl: Access = fn_decl @Access [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Access.decl: = fn_decl @Access [template = constants.%Access] { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, %Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %.loc24_21: type = ptr_type Derived [template = constants.%.8] // CHECK:STDOUT: %p.loc24_11.1: Derived* = param p // CHECK:STDOUT: @Access.%p: Derived* = bind_name p, %p.loc24_11.1 -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc24_30.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc24_30.2: type = converted %int.make_type_32, %.loc24_30.1 [template = i32] // CHECK:STDOUT: %.loc24_30.3: type = ptr_type i32 [template = constants.%.9] @@ -78,15 +78,15 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %.loc12_8: = field_decl a, element0 [template] -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] // CHECK:STDOUT: %.loc13_8: = field_decl b, element1 [template] -// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] // CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_32.loc14, %.loc14_10.1 [template = i32] // CHECK:STDOUT: %.loc14_8: = field_decl c, element2 [template] @@ -101,11 +101,11 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc18: = base_decl Base, element0 [template] -// CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc20_10.1: type = value_of_initializer %int.make_type_32.loc20 [template = i32] // CHECK:STDOUT: %.loc20_10.2: type = converted %int.make_type_32.loc20, %.loc20_10.1 [template = i32] // CHECK:STDOUT: %.loc20_8: = field_decl d, element1 [template] -// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_10.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_10.2: type = converted %int.make_type_32.loc21, %.loc21_10.1 [template = i32] // CHECK:STDOUT: %.loc21_8: = field_decl e, element2 [template] diff --git a/toolchain/check/testdata/class/base_function_unqualified.carbon b/toolchain/check/testdata/class/base_function_unqualified.carbon index cb70b28f6551..6f30b6cb3503 100644 --- a/toolchain/check/testdata/class/base_function_unqualified.carbon +++ b/toolchain/check/testdata/class/base_function_unqualified.carbon @@ -27,17 +27,17 @@ fn Derived.H() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] // CHECK:STDOUT: %.4: type = unbound_element_type Derived, Base [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.2: G = struct_value () [template] -// CHECK:STDOUT: %H: type = fn_type @H [template] -// CHECK:STDOUT: %struct.3: H = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %H.type: type = fn_type @H [template] +// CHECK:STDOUT: %H: = struct_value () [template] // CHECK:STDOUT: %.5: type = struct_type {.base: Base} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -50,11 +50,11 @@ fn Derived.H() { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} // CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [template = constants.%Derived] {} -// CHECK:STDOUT: %H.decl: H = fn_decl @H [template = constants.%struct.3] {} +// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -64,8 +64,8 @@ fn Derived.H() { // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc16: = base_decl Base, element0 [template] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.2] {} -// CHECK:STDOUT: %H.decl: H = fn_decl @H [template = constants.%struct.3] {} +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} +// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -79,14 +79,14 @@ fn Derived.H() { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: F = name_ref F, @Base.%F.decl [template = constants.%struct.1] +// CHECK:STDOUT: %F.ref: = name_ref F, @Base.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init () = call %F.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @H() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: F = name_ref F, @Base.%F.decl [template = constants.%struct.1] +// CHECK:STDOUT: %F.ref: = name_ref F, @Base.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init () = call %F.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/base_method.carbon b/toolchain/check/testdata/class/base_method.carbon index cd08534c8c34..d802088b1ee7 100644 --- a/toolchain/check/testdata/class/base_method.carbon +++ b/toolchain/check/testdata/class/base_method.carbon @@ -30,13 +30,13 @@ fn Call(p: Derived*) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type Base, i32 [template] // CHECK:STDOUT: %.3: type = ptr_type Base [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.4: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %.5: type = ptr_type {.a: i32} [template] // CHECK:STDOUT: %.6: i32 = int_literal 1 [template] @@ -44,8 +44,8 @@ fn Call(p: Derived*) { // CHECK:STDOUT: %.7: type = unbound_element_type Derived, Base [template] // CHECK:STDOUT: %.8: type = struct_type {.base: Base} [template] // CHECK:STDOUT: %.9: type = ptr_type Derived [template] -// CHECK:STDOUT: %Call: type = fn_type @Call [template] -// CHECK:STDOUT: %struct.3: Call = struct_value () [template] +// CHECK:STDOUT: %Call.type: type = fn_type @Call [template] +// CHECK:STDOUT: %Call: = struct_value () [template] // CHECK:STDOUT: %.10: type = struct_type {.base: {.a: i32}*} [template] // CHECK:STDOUT: %.11: type = ptr_type {.base: Base} [template] // CHECK:STDOUT: } @@ -59,8 +59,8 @@ fn Call(p: Derived*) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Base.ref: type = name_ref Base, %Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc17_26: type = ptr_type Base [template = constants.%.3] // CHECK:STDOUT: %self.loc17_16.1: Base* = param self @@ -68,7 +68,7 @@ fn Call(p: Derived*) { // CHECK:STDOUT: @F.%.loc17: Base* = addr_pattern @F.%self // CHECK:STDOUT: } // CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [template = constants.%Derived] {} -// CHECK:STDOUT: %Call.decl: Call = fn_decl @Call [template = constants.%struct.3] { +// CHECK:STDOUT: %Call.decl: = fn_decl @Call [template = constants.%Call] { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, %Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %.loc25: type = ptr_type Derived [template = constants.%.9] // CHECK:STDOUT: %p.loc25_9.1: Derived* = param p @@ -77,11 +77,11 @@ fn Call(p: Derived*) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %.loc12_8: = field_decl a, element0 [template] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Base [template = constants.%Base] // CHECK:STDOUT: %.loc14_23: type = ptr_type Base [template = constants.%.3] // CHECK:STDOUT: %self.loc14_13.1: Base* = param self @@ -122,7 +122,7 @@ fn Call(p: Derived*) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: Derived* = name_ref p, %p // CHECK:STDOUT: %.loc26_4.1: ref Derived = deref %p.ref -// CHECK:STDOUT: %F.ref: F = name_ref F, @Base.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, @Base.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc26_7: = bound_method %.loc26_4.1, %F.ref // CHECK:STDOUT: %.loc26_4.2: Derived* = addr_of %.loc26_4.1 // CHECK:STDOUT: %.loc26_9.1: ref Derived = deref %.loc26_4.2 diff --git a/toolchain/check/testdata/class/base_method_qualified.carbon b/toolchain/check/testdata/class/base_method_qualified.carbon index 57bb545e3702..01d02a9050e3 100644 --- a/toolchain/check/testdata/class/base_method_qualified.carbon +++ b/toolchain/check/testdata/class/base_method_qualified.carbon @@ -43,32 +43,32 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Derived: type = class_type @Derived [template] // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %G.1: type = fn_type @G.1 [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] +// CHECK:STDOUT: %G.1: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] // CHECK:STDOUT: %.4: type = unbound_element_type Derived, Base [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.4: F = struct_value () [template] -// CHECK:STDOUT: %G.2: type = fn_type @G.2 [template] -// CHECK:STDOUT: %struct.5: G = struct_value () [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] +// CHECK:STDOUT: %G.2: = struct_value () [template] // CHECK:STDOUT: %.5: type = struct_type {.base: Base} [template] -// CHECK:STDOUT: %Call: type = fn_type @Call [template] -// CHECK:STDOUT: %struct.6: Call = struct_value () [template] +// CHECK:STDOUT: %Call.type: type = fn_type @Call [template] +// CHECK:STDOUT: %Call: = struct_value () [template] // CHECK:STDOUT: %.6: type = struct_type {.base: {}*} [template] // CHECK:STDOUT: %.7: type = ptr_type {.base: Base} [template] // CHECK:STDOUT: %.8: type = ptr_type Derived [template] -// CHECK:STDOUT: %CallIndirect: type = fn_type @CallIndirect [template] -// CHECK:STDOUT: %struct.7: CallIndirect = struct_value () [template] -// CHECK:STDOUT: %PassDerivedToBase: type = fn_type @PassDerivedToBase [template] -// CHECK:STDOUT: %struct.8: PassDerivedToBase = struct_value () [template] -// CHECK:STDOUT: %PassDerivedToBaseIndirect: type = fn_type @PassDerivedToBaseIndirect [template] -// CHECK:STDOUT: %struct.9: PassDerivedToBaseIndirect = struct_value () [template] +// CHECK:STDOUT: %CallIndirect.type: type = fn_type @CallIndirect [template] +// CHECK:STDOUT: %CallIndirect: = struct_value () [template] +// CHECK:STDOUT: %PassDerivedToBase.type: type = fn_type @PassDerivedToBase [template] +// CHECK:STDOUT: %PassDerivedToBase: = struct_value () [template] +// CHECK:STDOUT: %PassDerivedToBaseIndirect.type: type = fn_type @PassDerivedToBaseIndirect [template] +// CHECK:STDOUT: %PassDerivedToBaseIndirect: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -84,47 +84,47 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Derived.decl.loc11: type = class_decl @Derived [template = constants.%Derived] {} // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %Derived.decl.loc18: type = class_decl @Derived [template = constants.%Derived] {} -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Call.decl: Call = fn_decl @Call [template = constants.%struct.6] { +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Call.decl: = fn_decl @Call [template = constants.%Call] { // CHECK:STDOUT: %Derived.ref.loc25: type = name_ref Derived, %Derived.decl.loc11 [template = constants.%Derived] // CHECK:STDOUT: %a.loc25_9.1: Derived = param a // CHECK:STDOUT: @Call.%a: Derived = bind_name a, %a.loc25_9.1 -// CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc25_24.1: type = value_of_initializer %int.make_type_32.loc25 [template = i32] // CHECK:STDOUT: %.loc25_24.2: type = converted %int.make_type_32.loc25, %.loc25_24.1 [template = i32] // CHECK:STDOUT: @Call.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %CallIndirect.decl: CallIndirect = fn_decl @CallIndirect [template = constants.%struct.7] { +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %CallIndirect.decl: = fn_decl @CallIndirect [template = constants.%CallIndirect] { // CHECK:STDOUT: %Derived.ref.loc29: type = name_ref Derived, %Derived.decl.loc11 [template = constants.%Derived] // CHECK:STDOUT: %.loc29_27: type = ptr_type Derived [template = constants.%.8] // CHECK:STDOUT: %p.loc29_17.1: Derived* = param p // CHECK:STDOUT: @CallIndirect.%p: Derived* = bind_name p, %p.loc29_17.1 -// CHECK:STDOUT: %int.make_type_32.loc29: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc29: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc29_33.1: type = value_of_initializer %int.make_type_32.loc29 [template = i32] // CHECK:STDOUT: %.loc29_33.2: type = converted %int.make_type_32.loc29, %.loc29_33.1 [template = i32] // CHECK:STDOUT: @CallIndirect.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %PassDerivedToBase.decl: PassDerivedToBase = fn_decl @PassDerivedToBase [template = constants.%struct.8] { +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %PassDerivedToBase.decl: = fn_decl @PassDerivedToBase [template = constants.%PassDerivedToBase] { // CHECK:STDOUT: %Derived.ref.loc33: type = name_ref Derived, %Derived.decl.loc11 [template = constants.%Derived] // CHECK:STDOUT: %a.loc33_22.1: Derived = param a // CHECK:STDOUT: @PassDerivedToBase.%a: Derived = bind_name a, %a.loc33_22.1 -// CHECK:STDOUT: %int.make_type_32.loc33: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc33_37.1: type = value_of_initializer %int.make_type_32.loc33 [template = i32] // CHECK:STDOUT: %.loc33_37.2: type = converted %int.make_type_32.loc33, %.loc33_37.1 [template = i32] // CHECK:STDOUT: @PassDerivedToBase.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %PassDerivedToBaseIndirect.decl: PassDerivedToBaseIndirect = fn_decl @PassDerivedToBaseIndirect [template = constants.%struct.9] { +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %PassDerivedToBaseIndirect.decl: = fn_decl @PassDerivedToBaseIndirect [template = constants.%PassDerivedToBaseIndirect] { // CHECK:STDOUT: %Derived.ref.loc37: type = name_ref Derived, %Derived.decl.loc11 [template = constants.%Derived] // CHECK:STDOUT: %.loc37_40: type = ptr_type Derived [template = constants.%.8] // CHECK:STDOUT: %p.loc37_30.1: Derived* = param p // CHECK:STDOUT: @PassDerivedToBaseIndirect.%p: Derived* = bind_name p, %p.loc37_30.1 -// CHECK:STDOUT: %int.make_type_32.loc37: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc37: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc37_46.1: type = value_of_initializer %int.make_type_32.loc37 [template = i32] // CHECK:STDOUT: %.loc37_46.2: type = converted %int.make_type_32.loc37, %.loc37_46.1 [template = i32] // CHECK:STDOUT: @PassDerivedToBaseIndirect.%return: ref i32 = var @@ -134,12 +134,12 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc19: = base_decl Base, element0 [template] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.4] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %Self.ref.loc21: type = name_ref Self, constants.%Derived [template = constants.%Derived] // CHECK:STDOUT: %self.loc21_8.1: Derived = param self // CHECK:STDOUT: %self.loc21_8.2: Derived = bind_name self, %self.loc21_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: G = fn_decl @G.2 [template = constants.%struct.5] { +// CHECK:STDOUT: %G.decl: = fn_decl @G.2 [template = constants.%G.2] { // CHECK:STDOUT: %Self.ref.loc22: type = name_ref Self, constants.%Derived [template = constants.%Derived] // CHECK:STDOUT: %self.loc22_8.1: Derived = param self // CHECK:STDOUT: %self.loc22_8.2: Derived = bind_name self, %self.loc22_8.1 @@ -154,20 +154,20 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Base [template = constants.%Base] // CHECK:STDOUT: %self.loc14_8.1: Base = param self // CHECK:STDOUT: %self.loc14_8.2: Base = bind_name self, %self.loc14_8.1 -// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_25.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] // CHECK:STDOUT: %.loc14_25.2: type = converted %int.make_type_32.loc14, %.loc14_25.1 [template = i32] // CHECK:STDOUT: %return.var.loc14: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: G = fn_decl @G.1 [template = constants.%struct.3] { +// CHECK:STDOUT: %G.decl: = fn_decl @G.1 [template = constants.%G.1] { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc11 [template = constants.%Derived] // CHECK:STDOUT: %self.loc15_8.1: Derived = param self // CHECK:STDOUT: %self.loc15_8.2: Derived = bind_name self, %self.loc15_8.1 -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_28.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_28.2: type = converted %int.make_type_32.loc15, %.loc15_28.1 [template = i32] // CHECK:STDOUT: %return.var.loc15: ref i32 = var @@ -193,7 +193,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: Derived = name_ref a, %a // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %F.ref: F = name_ref F, @Base.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, @Base.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %.loc26_11: = bound_method %a.ref, %F.ref // CHECK:STDOUT: %.loc26_20.1: ref Base = class_element_access %a.ref, element0 // CHECK:STDOUT: %.loc26_20.2: ref Base = converted %a.ref, %.loc26_20.1 @@ -208,7 +208,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: Derived* = name_ref p, %p // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %F.ref: F = name_ref F, @Base.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, @Base.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %.loc30_11.1: ref Derived = deref %p.ref // CHECK:STDOUT: %.loc30_11.2: = bound_method %.loc30_11.1, %F.ref // CHECK:STDOUT: %.loc30_21.1: ref Base = class_element_access %.loc30_11.1, element0 @@ -224,7 +224,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: Derived = name_ref a, %a // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %G.ref: G = name_ref G, @Base.%G.decl [template = constants.%struct.3] +// CHECK:STDOUT: %G.ref: = name_ref G, @Base.%G.decl [template = constants.%G.1] // CHECK:STDOUT: %.loc34_11: = bound_method %a.ref, %G.ref // CHECK:STDOUT: %G.call: init i32 = call %.loc34_11(%a.ref) // CHECK:STDOUT: %.loc34_22.1: i32 = value_of_initializer %G.call @@ -236,7 +236,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: Derived* = name_ref p, %p // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %G.ref: G = name_ref G, @Base.%G.decl [template = constants.%struct.3] +// CHECK:STDOUT: %G.ref: = name_ref G, @Base.%G.decl [template = constants.%G.1] // CHECK:STDOUT: %.loc38_11.1: ref Derived = deref %p.ref // CHECK:STDOUT: %.loc38_11.2: = bound_method %.loc38_11.1, %G.ref // CHECK:STDOUT: %.loc38_11.3: Derived = bind_value %.loc38_11.1 diff --git a/toolchain/check/testdata/class/base_method_shadow.carbon b/toolchain/check/testdata/class/base_method_shadow.carbon index 90c29a03dcb4..ef5327784173 100644 --- a/toolchain/check/testdata/class/base_method_shadow.carbon +++ b/toolchain/check/testdata/class/base_method_shadow.carbon @@ -38,30 +38,30 @@ fn Call(a: A*, b: B*, c: C*, d: D*) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] // CHECK:STDOUT: %.1: type = ptr_type A [template] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] // CHECK:STDOUT: %.3: type = struct_type {} [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %.4: type = ptr_type {} [template] // CHECK:STDOUT: %.5: type = unbound_element_type B, A [template] // CHECK:STDOUT: %.6: type = ptr_type B [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] // CHECK:STDOUT: %.7: type = struct_type {.base: A} [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.8: type = struct_type {.base: {}*} [template] // CHECK:STDOUT: %.9: type = ptr_type {.base: A} [template] // CHECK:STDOUT: %.10: type = unbound_element_type C, B [template] // CHECK:STDOUT: %.11: type = ptr_type C [template] -// CHECK:STDOUT: %F.3: type = fn_type @F.3 [template] -// CHECK:STDOUT: %struct.3: F = struct_value () [template] +// CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] +// CHECK:STDOUT: %F.3: = struct_value () [template] // CHECK:STDOUT: %.12: type = struct_type {.base: B} [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %.13: type = unbound_element_type D, B [template] // CHECK:STDOUT: %.14: type = ptr_type D [template] -// CHECK:STDOUT: %Call: type = fn_type @Call [template] -// CHECK:STDOUT: %struct.4: Call = struct_value () [template] +// CHECK:STDOUT: %Call.type: type = fn_type @Call [template] +// CHECK:STDOUT: %Call: = struct_value () [template] // CHECK:STDOUT: %.15: type = struct_type {.base: {.base: A}*} [template] // CHECK:STDOUT: %.16: type = ptr_type {.base: B} [template] // CHECK:STDOUT: } @@ -80,7 +80,7 @@ fn Call(a: A*, b: B*, c: C*, d: D*) { // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} -// CHECK:STDOUT: %Call.decl: Call = fn_decl @Call [template = constants.%struct.4] { +// CHECK:STDOUT: %Call.decl: = fn_decl @Call [template = constants.%Call] { // CHECK:STDOUT: %A.ref: type = name_ref A, %A.decl [template = constants.%A] // CHECK:STDOUT: %.loc29_13: type = ptr_type A [template = constants.%.1] // CHECK:STDOUT: %a.loc29_9.1: A* = param a @@ -101,7 +101,7 @@ fn Call(a: A*, b: B*, c: C*, d: D*) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%A [template = constants.%A] // CHECK:STDOUT: %.loc12_23: type = ptr_type A [template = constants.%.1] // CHECK:STDOUT: %self.loc12_13.1: A* = param self @@ -117,7 +117,7 @@ fn Call(a: A*, b: B*, c: C*, d: D*) { // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %.loc16: = base_decl A, element0 [template] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B [template = constants.%B] // CHECK:STDOUT: %.loc17_23: type = ptr_type B [template = constants.%.6] // CHECK:STDOUT: %self.loc17_13.1: B* = param self @@ -135,7 +135,7 @@ fn Call(a: A*, b: B*, c: C*, d: D*) { // CHECK:STDOUT: class @C { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %.loc21: = base_decl B, element0 [template] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.3 [template = constants.%struct.3] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.3 [template = constants.%F.3] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %.loc22_23: type = ptr_type C [template = constants.%.11] // CHECK:STDOUT: %self.loc22_13.1: C* = param self @@ -170,25 +170,25 @@ fn Call(a: A*, b: B*, c: C*, d: D*) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: A* = name_ref a, %a // CHECK:STDOUT: %.loc30_4.1: ref A = deref %a.ref -// CHECK:STDOUT: %F.ref.loc30: F = name_ref F, @A.%F.decl [template = constants.%struct.1] +// CHECK:STDOUT: %F.ref.loc30: = name_ref F, @A.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %.loc30_7: = bound_method %.loc30_4.1, %F.ref.loc30 // CHECK:STDOUT: %.loc30_4.2: A* = addr_of %.loc30_4.1 // CHECK:STDOUT: %F.call.loc30: init () = call %.loc30_7(%.loc30_4.2) // CHECK:STDOUT: %b.ref: B* = name_ref b, %b // CHECK:STDOUT: %.loc31_4.1: ref B = deref %b.ref -// CHECK:STDOUT: %F.ref.loc31: F = name_ref F, @B.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref.loc31: = name_ref F, @B.%F.decl [template = constants.%F.2] // CHECK:STDOUT: %.loc31_7: = bound_method %.loc31_4.1, %F.ref.loc31 // CHECK:STDOUT: %.loc31_4.2: B* = addr_of %.loc31_4.1 // CHECK:STDOUT: %F.call.loc31: init () = call %.loc31_7(%.loc31_4.2) // CHECK:STDOUT: %c.ref: C* = name_ref c, %c // CHECK:STDOUT: %.loc32_4.1: ref C = deref %c.ref -// CHECK:STDOUT: %F.ref.loc32: F = name_ref F, @C.%F.decl [template = constants.%struct.3] +// CHECK:STDOUT: %F.ref.loc32: = name_ref F, @C.%F.decl [template = constants.%F.3] // CHECK:STDOUT: %.loc32_7: = bound_method %.loc32_4.1, %F.ref.loc32 // CHECK:STDOUT: %.loc32_4.2: C* = addr_of %.loc32_4.1 // CHECK:STDOUT: %F.call.loc32: init () = call %.loc32_7(%.loc32_4.2) // CHECK:STDOUT: %d.ref: D* = name_ref d, %d // CHECK:STDOUT: %.loc33_4.1: ref D = deref %d.ref -// CHECK:STDOUT: %F.ref.loc33: F = name_ref F, @B.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref.loc33: = name_ref F, @B.%F.decl [template = constants.%F.2] // CHECK:STDOUT: %.loc33_7: = bound_method %.loc33_4.1, %F.ref.loc33 // CHECK:STDOUT: %.loc33_4.2: D* = addr_of %.loc33_4.1 // CHECK:STDOUT: %.loc33_9.1: ref D = deref %.loc33_4.2 diff --git a/toolchain/check/testdata/class/basic.carbon b/toolchain/check/testdata/class/basic.carbon index 24bb5f88be15..283e52b3dc94 100644 --- a/toolchain/check/testdata/class/basic.carbon +++ b/toolchain/check/testdata/class/basic.carbon @@ -30,17 +30,17 @@ fn Run() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type Class, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.k: i32} [template] -// CHECK:STDOUT: %Run: type = fn_type @Run [template] -// CHECK:STDOUT: %struct.4: Run = struct_value () [template] +// CHECK:STDOUT: %Run.type: type = fn_type @Run [template] +// CHECK:STDOUT: %Run: = struct_value () [template] // CHECK:STDOUT: %.4: i32 = int_literal 4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -52,27 +52,27 @@ fn Run() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc21_15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %int.make_type_32.loc21_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_15.1: type = value_of_initializer %int.make_type_32.loc21_15 [template = i32] // CHECK:STDOUT: %.loc21_15.2: type = converted %int.make_type_32.loc21_15, %.loc21_15.1 [template = i32] // CHECK:STDOUT: %n.loc21_12.1: i32 = param n // CHECK:STDOUT: @G.%n: i32 = bind_name n, %n.loc21_12.1 -// CHECK:STDOUT: %int.make_type_32.loc21_23: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc21_23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_23.1: type = value_of_initializer %int.make_type_32.loc21_23 [template = i32] // CHECK:STDOUT: %.loc21_23.2: type = converted %int.make_type_32.loc21_23, %.loc21_23.1 [template = i32] // CHECK:STDOUT: @G.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Run.decl: Run = fn_decl @Run [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] { +// CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc25_13.1: type = value_of_initializer %int.make_type_32.loc25 [template = i32] // CHECK:STDOUT: %.loc25_13.2: type = converted %int.make_type_32.loc25, %.loc25_13.1 [template = i32] // CHECK:STDOUT: @Run.%return: ref i32 = var @@ -80,29 +80,29 @@ fn Run() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc12_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc12_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_11.1: type = value_of_initializer %int.make_type_32.loc12_11 [template = i32] // CHECK:STDOUT: %.loc12_11.2: type = converted %int.make_type_32.loc12_11, %.loc12_11.1 [template = i32] // CHECK:STDOUT: %n.loc12_8.1: i32 = param n // CHECK:STDOUT: %n.loc12_8.2: i32 = bind_name n, %n.loc12_8.1 -// CHECK:STDOUT: %int.make_type_32.loc12_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_19.1: type = value_of_initializer %int.make_type_32.loc12_19 [template = i32] // CHECK:STDOUT: %.loc12_19.2: type = converted %int.make_type_32.loc12_19, %.loc12_19.1 [template = i32] // CHECK:STDOUT: %return.var.loc12: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc16_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %int.make_type_32.loc16_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_11.1: type = value_of_initializer %int.make_type_32.loc16_11 [template = i32] // CHECK:STDOUT: %.loc16_11.2: type = converted %int.make_type_32.loc16_11, %.loc16_11.1 [template = i32] // CHECK:STDOUT: %n.loc16_8.1: i32 = param n // CHECK:STDOUT: %n.loc16_8.2: i32 = bind_name n, %n.loc16_8.1 -// CHECK:STDOUT: %int.make_type_32.loc16_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc16_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_32.loc16_19 [template = i32] // CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_32.loc16_19, %.loc16_19.1 [template = i32] // CHECK:STDOUT: %return.var.loc16: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_10.1: type = value_of_initializer %int.make_type_32.loc18 [template = i32] // CHECK:STDOUT: %.loc18_10.2: type = converted %int.make_type_32.loc18, %.loc18_10.1 [template = i32] // CHECK:STDOUT: %.loc18_8: = field_decl k, element0 [template] @@ -131,7 +131,7 @@ fn Run() -> i32 { // CHECK:STDOUT: fn @Run() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %F.ref: F = name_ref F, @Class.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, @Class.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc26_18: i32 = int_literal 4 [template = constants.%.4] // CHECK:STDOUT: %F.call: init i32 = call %F.ref(%.loc26_18) // CHECK:STDOUT: %.loc26_20.1: i32 = value_of_initializer %F.call diff --git a/toolchain/check/testdata/class/complete_in_member_fn.carbon b/toolchain/check/testdata/class/complete_in_member_fn.carbon index 080e164d2643..3e9c77d339c9 100644 --- a/toolchain/check/testdata/class/complete_in_member_fn.carbon +++ b/toolchain/check/testdata/class/complete_in_member_fn.carbon @@ -18,11 +18,11 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type C, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %.4: type = ptr_type {.a: i32} [template] @@ -35,21 +35,21 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.loc12_8.1: C = param c // CHECK:STDOUT: %c.loc12_8.2: C = bind_name c, %c.loc12_8.1 -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_17.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_17.2: type = converted %int.make_type_32.loc12, %.loc12_17.1 [template = i32] // CHECK:STDOUT: %return.var: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] // CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_32.loc14, %.loc14_10.1 [template = i32] // CHECK:STDOUT: %.loc14_8: = field_decl a, element0 [template] diff --git a/toolchain/check/testdata/class/compound_field.carbon b/toolchain/check/testdata/class/compound_field.carbon index fca15c548f5b..0a49a00e1adf 100644 --- a/toolchain/check/testdata/class/compound_field.carbon +++ b/toolchain/check/testdata/class/compound_field.carbon @@ -41,9 +41,9 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type Base, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32, .c: i32} [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] @@ -51,19 +51,19 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: %.5: type = unbound_element_type Derived, Base [template] // CHECK:STDOUT: %.6: type = unbound_element_type Derived, i32 [template] // CHECK:STDOUT: %.7: type = struct_type {.base: Base, .d: i32, .e: i32} [template] -// CHECK:STDOUT: %AccessDerived: type = fn_type @AccessDerived [template] -// CHECK:STDOUT: %struct.2: AccessDerived = struct_value () [template] +// CHECK:STDOUT: %AccessDerived.type: type = fn_type @AccessDerived [template] +// CHECK:STDOUT: %AccessDerived: = struct_value () [template] // CHECK:STDOUT: %.8: type = struct_type {.base: {.a: i32, .b: i32, .c: i32}*, .d: i32, .e: i32} [template] // CHECK:STDOUT: %.9: type = ptr_type {.base: {.a: i32, .b: i32, .c: i32}*, .d: i32, .e: i32} [template] // CHECK:STDOUT: %.10: type = ptr_type {.base: Base, .d: i32, .e: i32} [template] -// CHECK:STDOUT: %AccessBase: type = fn_type @AccessBase [template] -// CHECK:STDOUT: %struct.3: AccessBase = struct_value () [template] +// CHECK:STDOUT: %AccessBase.type: type = fn_type @AccessBase [template] +// CHECK:STDOUT: %AccessBase: = struct_value () [template] // CHECK:STDOUT: %.11: type = ptr_type Derived [template] // CHECK:STDOUT: %.12: type = ptr_type i32 [template] -// CHECK:STDOUT: %AccessDerivedIndirect: type = fn_type @AccessDerivedIndirect [template] -// CHECK:STDOUT: %struct.4: AccessDerivedIndirect = struct_value () [template] -// CHECK:STDOUT: %AccessBaseIndirect: type = fn_type @AccessBaseIndirect [template] -// CHECK:STDOUT: %struct.5: AccessBaseIndirect = struct_value () [template] +// CHECK:STDOUT: %AccessDerivedIndirect.type: type = fn_type @AccessDerivedIndirect [template] +// CHECK:STDOUT: %AccessDerivedIndirect: = struct_value () [template] +// CHECK:STDOUT: %AccessBaseIndirect.type: type = fn_type @AccessBaseIndirect [template] +// CHECK:STDOUT: %AccessBaseIndirect: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -78,51 +78,51 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [template = constants.%Derived] {} -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %AccessDerived.decl: AccessDerived = fn_decl @AccessDerived [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessDerived.decl: = fn_decl @AccessDerived [template = constants.%AccessDerived] { // CHECK:STDOUT: %Derived.ref.loc24: type = name_ref Derived, %Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %d.loc24_18.1: Derived = param d // CHECK:STDOUT: @AccessDerived.%d: Derived = bind_name d, %d.loc24_18.1 -// CHECK:STDOUT: %int.make_type_32.loc24: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc24_33.1: type = value_of_initializer %int.make_type_32.loc24 [template = i32] // CHECK:STDOUT: %.loc24_33.2: type = converted %int.make_type_32.loc24, %.loc24_33.1 [template = i32] // CHECK:STDOUT: @AccessDerived.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %AccessBase.decl: AccessBase = fn_decl @AccessBase [template = constants.%struct.3] { +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessBase.decl: = fn_decl @AccessBase [template = constants.%AccessBase] { // CHECK:STDOUT: %Derived.ref.loc28: type = name_ref Derived, %Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %d.loc28_15.1: Derived = param d // CHECK:STDOUT: @AccessBase.%d: Derived = bind_name d, %d.loc28_15.1 -// CHECK:STDOUT: %int.make_type_32.loc28: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc28: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc28_30.1: type = value_of_initializer %int.make_type_32.loc28 [template = i32] // CHECK:STDOUT: %.loc28_30.2: type = converted %int.make_type_32.loc28, %.loc28_30.1 [template = i32] // CHECK:STDOUT: @AccessBase.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %AccessDerivedIndirect.decl: AccessDerivedIndirect = fn_decl @AccessDerivedIndirect [template = constants.%struct.4] { +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessDerivedIndirect.decl: = fn_decl @AccessDerivedIndirect [template = constants.%AccessDerivedIndirect] { // CHECK:STDOUT: %Derived.ref.loc32: type = name_ref Derived, %Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %.loc32_36: type = ptr_type Derived [template = constants.%.11] // CHECK:STDOUT: %p.loc32_26.1: Derived* = param p // CHECK:STDOUT: @AccessDerivedIndirect.%p: Derived* = bind_name p, %p.loc32_26.1 -// CHECK:STDOUT: %int.make_type_32.loc32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc32_45.1: type = value_of_initializer %int.make_type_32.loc32 [template = i32] // CHECK:STDOUT: %.loc32_45.2: type = converted %int.make_type_32.loc32, %.loc32_45.1 [template = i32] // CHECK:STDOUT: %.loc32_45.3: type = ptr_type i32 [template = constants.%.12] // CHECK:STDOUT: @AccessDerivedIndirect.%return: ref i32* = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %AccessBaseIndirect.decl: AccessBaseIndirect = fn_decl @AccessBaseIndirect [template = constants.%struct.5] { +// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessBaseIndirect.decl: = fn_decl @AccessBaseIndirect [template = constants.%AccessBaseIndirect] { // CHECK:STDOUT: %Derived.ref.loc36: type = name_ref Derived, %Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %.loc36_33: type = ptr_type Derived [template = constants.%.11] // CHECK:STDOUT: %p.loc36_23.1: Derived* = param p // CHECK:STDOUT: @AccessBaseIndirect.%p: Derived* = bind_name p, %p.loc36_23.1 -// CHECK:STDOUT: %int.make_type_32.loc36: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc36: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc36_42.1: type = value_of_initializer %int.make_type_32.loc36 [template = i32] // CHECK:STDOUT: %.loc36_42.2: type = converted %int.make_type_32.loc36, %.loc36_42.1 [template = i32] // CHECK:STDOUT: %.loc36_42.3: type = ptr_type i32 [template = constants.%.12] @@ -131,15 +131,15 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %.loc12_8: = field_decl a, element0 [template] -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] // CHECK:STDOUT: %.loc13_8: = field_decl b, element1 [template] -// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] // CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_32.loc14, %.loc14_10.1 [template = i32] // CHECK:STDOUT: %.loc14_8: = field_decl c, element2 [template] @@ -154,11 +154,11 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc18: = base_decl Base, element0 [template] -// CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc20_10.1: type = value_of_initializer %int.make_type_32.loc20 [template = i32] // CHECK:STDOUT: %.loc20_10.2: type = converted %int.make_type_32.loc20, %.loc20_10.1 [template = i32] // CHECK:STDOUT: %.loc20_8: = field_decl d, element1 [template] -// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_10.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_10.2: type = converted %int.make_type_32.loc21, %.loc21_10.1 [template = i32] // CHECK:STDOUT: %.loc21_8: = field_decl e, element2 [template] diff --git a/toolchain/check/testdata/class/cross_package_import.carbon b/toolchain/check/testdata/class/cross_package_import.carbon index b4bb863197ca..e11729a0208d 100644 --- a/toolchain/check/testdata/class/cross_package_import.carbon +++ b/toolchain/check/testdata/class/cross_package_import.carbon @@ -150,9 +150,9 @@ var c: Other.C = {}; // CHECK:STDOUT: --- other_conflict.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %C: type = fn_type @C [template] +// CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %C: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -161,7 +161,7 @@ var c: Other.C = {}; // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %C.decl: C = fn_decl @C [template = constants.%struct] {} +// CHECK:STDOUT: %C.decl: = fn_decl @C [template = constants.%C] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @C() { diff --git a/toolchain/check/testdata/class/derived_to_base.carbon b/toolchain/check/testdata/class/derived_to_base.carbon index 906483830f19..32ebdc633919 100644 --- a/toolchain/check/testdata/class/derived_to_base.carbon +++ b/toolchain/check/testdata/class/derived_to_base.carbon @@ -42,9 +42,9 @@ fn ConvertInit() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type A, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %B: type = class_type @B [template] @@ -61,30 +61,30 @@ fn ConvertInit() { // CHECK:STDOUT: %.13: type = struct_type {.base: B, .c: i32} [template] // CHECK:STDOUT: %.14: type = ptr_type C [template] // CHECK:STDOUT: %.15: type = ptr_type B [template] -// CHECK:STDOUT: %ConvertCToB: type = fn_type @ConvertCToB [template] -// CHECK:STDOUT: %struct.2: ConvertCToB = struct_value () [template] +// CHECK:STDOUT: %ConvertCToB.type: type = fn_type @ConvertCToB [template] +// CHECK:STDOUT: %ConvertCToB: = struct_value () [template] // CHECK:STDOUT: %.16: type = struct_type {.base: {.base: A, .b: i32}*, .c: i32} [template] // CHECK:STDOUT: %.17: type = ptr_type {.base: {.base: A, .b: i32}*, .c: i32} [template] // CHECK:STDOUT: %.18: type = ptr_type {.base: B, .c: i32} [template] // CHECK:STDOUT: %.19: type = ptr_type A [template] -// CHECK:STDOUT: %ConvertBToA: type = fn_type @ConvertBToA [template] -// CHECK:STDOUT: %struct.3: ConvertBToA = struct_value () [template] -// CHECK:STDOUT: %ConvertCToA: type = fn_type @ConvertCToA [template] -// CHECK:STDOUT: %struct.4: ConvertCToA = struct_value () [template] -// CHECK:STDOUT: %ConvertValue: type = fn_type @ConvertValue [template] -// CHECK:STDOUT: %struct.5: ConvertValue = struct_value () [template] -// CHECK:STDOUT: %ConvertRef: type = fn_type @ConvertRef [template] -// CHECK:STDOUT: %struct.6: ConvertRef = struct_value () [template] -// CHECK:STDOUT: %ConvertInit: type = fn_type @ConvertInit [template] -// CHECK:STDOUT: %struct.7: ConvertInit = struct_value () [template] +// CHECK:STDOUT: %ConvertBToA.type: type = fn_type @ConvertBToA [template] +// CHECK:STDOUT: %ConvertBToA: = struct_value () [template] +// CHECK:STDOUT: %ConvertCToA.type: type = fn_type @ConvertCToA [template] +// CHECK:STDOUT: %ConvertCToA: = struct_value () [template] +// CHECK:STDOUT: %ConvertValue.type: type = fn_type @ConvertValue [template] +// CHECK:STDOUT: %ConvertValue: = struct_value () [template] +// CHECK:STDOUT: %ConvertRef.type: type = fn_type @ConvertRef [template] +// CHECK:STDOUT: %ConvertRef: = struct_value () [template] +// CHECK:STDOUT: %ConvertInit.type: type = fn_type @ConvertInit [template] +// CHECK:STDOUT: %ConvertInit: = struct_value () [template] // CHECK:STDOUT: %.20: i32 = int_literal 1 [template] // CHECK:STDOUT: %.21: i32 = int_literal 2 [template] // CHECK:STDOUT: %.22: type = struct_type {.base: {.a: i32}, .b: i32} [template] // CHECK:STDOUT: %.23: i32 = int_literal 3 [template] // CHECK:STDOUT: %.24: type = struct_type {.base: {.base: {.a: i32}, .b: i32}, .c: i32} [template] -// CHECK:STDOUT: %struct.8: A = struct_value (%.20) [template] -// CHECK:STDOUT: %struct.9: B = struct_value (%struct.8, %.21) [template] -// CHECK:STDOUT: %struct.10: C = struct_value (%struct.9, %.23) [template] +// CHECK:STDOUT: %struct.1: A = struct_value (%.20) [template] +// CHECK:STDOUT: %struct.2: B = struct_value (%struct.1, %.21) [template] +// CHECK:STDOUT: %struct.3: C = struct_value (%struct.2, %.23) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -102,12 +102,12 @@ fn ConvertInit() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %ConvertCToB.decl: ConvertCToB = fn_decl @ConvertCToB [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %ConvertCToB.decl: = fn_decl @ConvertCToB [template = constants.%ConvertCToB] { // CHECK:STDOUT: %C.ref.loc25: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc25_20: type = ptr_type C [template = constants.%.14] // CHECK:STDOUT: %p.loc25_16.1: C* = param p @@ -116,7 +116,7 @@ fn ConvertInit() { // CHECK:STDOUT: %.loc25_27: type = ptr_type B [template = constants.%.15] // CHECK:STDOUT: @ConvertCToB.%return: ref B* = var // CHECK:STDOUT: } -// CHECK:STDOUT: %ConvertBToA.decl: ConvertBToA = fn_decl @ConvertBToA [template = constants.%struct.3] { +// CHECK:STDOUT: %ConvertBToA.decl: = fn_decl @ConvertBToA [template = constants.%ConvertBToA] { // CHECK:STDOUT: %B.ref.loc26: type = name_ref B, %B.decl [template = constants.%B] // CHECK:STDOUT: %.loc26_20: type = ptr_type B [template = constants.%.15] // CHECK:STDOUT: %p.loc26_16.1: B* = param p @@ -125,7 +125,7 @@ fn ConvertInit() { // CHECK:STDOUT: %.loc26_27: type = ptr_type A [template = constants.%.19] // CHECK:STDOUT: @ConvertBToA.%return: ref A* = var // CHECK:STDOUT: } -// CHECK:STDOUT: %ConvertCToA.decl: ConvertCToA = fn_decl @ConvertCToA [template = constants.%struct.4] { +// CHECK:STDOUT: %ConvertCToA.decl: = fn_decl @ConvertCToA [template = constants.%ConvertCToA] { // CHECK:STDOUT: %C.ref.loc27: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc27_20: type = ptr_type C [template = constants.%.14] // CHECK:STDOUT: %p.loc27_16.1: C* = param p @@ -134,12 +134,12 @@ fn ConvertInit() { // CHECK:STDOUT: %.loc27_27: type = ptr_type A [template = constants.%.19] // CHECK:STDOUT: @ConvertCToA.%return: ref A* = var // CHECK:STDOUT: } -// CHECK:STDOUT: %ConvertValue.decl: ConvertValue = fn_decl @ConvertValue [template = constants.%struct.5] { +// CHECK:STDOUT: %ConvertValue.decl: = fn_decl @ConvertValue [template = constants.%ConvertValue] { // CHECK:STDOUT: %C.ref.loc29: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %c.loc29_17.1: C = param c // CHECK:STDOUT: @ConvertValue.%c: C = bind_name c, %c.loc29_17.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %ConvertRef.decl: ConvertRef = fn_decl @ConvertRef [template = constants.%struct.6] { +// CHECK:STDOUT: %ConvertRef.decl: = fn_decl @ConvertRef [template = constants.%ConvertRef] { // CHECK:STDOUT: %C.ref.loc33: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc33_19: type = ptr_type C [template = constants.%.14] // CHECK:STDOUT: %c.loc33_15.1: C* = param c @@ -148,11 +148,11 @@ fn ConvertInit() { // CHECK:STDOUT: %.loc33_26: type = ptr_type A [template = constants.%.19] // CHECK:STDOUT: @ConvertRef.%return: ref A* = var // CHECK:STDOUT: } -// CHECK:STDOUT: %ConvertInit.decl: ConvertInit = fn_decl @ConvertInit [template = constants.%struct.7] {} +// CHECK:STDOUT: %ConvertInit.decl: = fn_decl @ConvertInit [template = constants.%ConvertInit] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %.loc12_8: = field_decl a, element0 [template] @@ -165,7 +165,7 @@ fn ConvertInit() { // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %.loc16: = base_decl A, element0 [template] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc17_10.2: type = converted %int.make_type_32, %.loc17_10.1 [template = i32] // CHECK:STDOUT: %.loc17_8: = field_decl b, element1 [template] @@ -180,7 +180,7 @@ fn ConvertInit() { // CHECK:STDOUT: class @C { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %.loc21: = base_decl B, element0 [template] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc22_10.2: type = converted %int.make_type_32, %.loc22_10.1 [template = i32] // CHECK:STDOUT: %.loc22_8: = field_decl c, element1 [template] @@ -264,15 +264,15 @@ fn ConvertInit() { // CHECK:STDOUT: %.loc38_48.2: ref A = class_element_access %.loc38_57.3, element0 // CHECK:STDOUT: %.loc38_39.2: ref i32 = class_element_access %.loc38_48.2, element0 // CHECK:STDOUT: %.loc38_39.3: init i32 = initialize_from %.loc38_38 to %.loc38_39.2 [template = constants.%.20] -// CHECK:STDOUT: %.loc38_39.4: init A = class_init (%.loc38_39.3), %.loc38_48.2 [template = constants.%struct.8] -// CHECK:STDOUT: %.loc38_48.3: init A = converted %.loc38_39.1, %.loc38_39.4 [template = constants.%struct.8] +// CHECK:STDOUT: %.loc38_39.4: init A = class_init (%.loc38_39.3), %.loc38_48.2 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc38_48.3: init A = converted %.loc38_39.1, %.loc38_39.4 [template = constants.%struct.1] // CHECK:STDOUT: %.loc38_48.4: ref i32 = class_element_access %.loc38_57.3, element1 // CHECK:STDOUT: %.loc38_48.5: init i32 = initialize_from %.loc38_47 to %.loc38_48.4 [template = constants.%.21] -// CHECK:STDOUT: %.loc38_48.6: init B = class_init (%.loc38_48.3, %.loc38_48.5), %.loc38_57.3 [template = constants.%struct.9] -// CHECK:STDOUT: %.loc38_57.4: init B = converted %.loc38_48.1, %.loc38_48.6 [template = constants.%struct.9] +// CHECK:STDOUT: %.loc38_48.6: init B = class_init (%.loc38_48.3, %.loc38_48.5), %.loc38_57.3 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc38_57.4: init B = converted %.loc38_48.1, %.loc38_48.6 [template = constants.%struct.2] // CHECK:STDOUT: %.loc38_57.5: ref i32 = class_element_access %.loc38_57.2, element1 // CHECK:STDOUT: %.loc38_57.6: init i32 = initialize_from %.loc38_56 to %.loc38_57.5 [template = constants.%.23] -// CHECK:STDOUT: %.loc38_57.7: init C = class_init (%.loc38_57.4, %.loc38_57.6), %.loc38_57.2 [template = constants.%struct.10] +// CHECK:STDOUT: %.loc38_57.7: init C = class_init (%.loc38_57.4, %.loc38_57.6), %.loc38_57.2 [template = constants.%struct.3] // CHECK:STDOUT: %.loc38_57.8: ref C = temporary %.loc38_57.2, %.loc38_57.7 // CHECK:STDOUT: %.loc38_59: ref C = converted %.loc38_57.1, %.loc38_57.8 // CHECK:STDOUT: %.loc38_63.1: ref B = class_element_access %.loc38_59, element0 diff --git a/toolchain/check/testdata/class/extend_adapt.carbon b/toolchain/check/testdata/class/extend_adapt.carbon index 50c2f612a1fd..fe304945ff53 100644 --- a/toolchain/check/testdata/class/extend_adapt.carbon +++ b/toolchain/check/testdata/class/extend_adapt.carbon @@ -95,20 +95,20 @@ class StructAdapter { // CHECK:STDOUT: constants { // CHECK:STDOUT: %SomeClassAdapter: type = class_type @SomeClassAdapter [template] // CHECK:STDOUT: %SomeClass: type = class_type @SomeClass [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type SomeClass, i32 [template] -// CHECK:STDOUT: %StaticMemberFunction: type = fn_type @StaticMemberFunction [template] -// CHECK:STDOUT: %struct.2: StaticMemberFunction = struct_value () [template] -// CHECK:STDOUT: %AdapterMethod: type = fn_type @AdapterMethod [template] -// CHECK:STDOUT: %struct.3: AdapterMethod = struct_value () [template] +// CHECK:STDOUT: %StaticMemberFunction.type: type = fn_type @StaticMemberFunction [template] +// CHECK:STDOUT: %StaticMemberFunction: = struct_value () [template] +// CHECK:STDOUT: %AdapterMethod.type: type = fn_type @AdapterMethod [template] +// CHECK:STDOUT: %AdapterMethod: = struct_value () [template] // CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %.4: type = ptr_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %TestStaticMemberFunction: type = fn_type @TestStaticMemberFunction [template] -// CHECK:STDOUT: %struct.4: TestStaticMemberFunction = struct_value () [template] -// CHECK:STDOUT: %TestAdapterMethod: type = fn_type @TestAdapterMethod [template] -// CHECK:STDOUT: %struct.5: TestAdapterMethod = struct_value () [template] +// CHECK:STDOUT: %TestStaticMemberFunction.type: type = fn_type @TestStaticMemberFunction [template] +// CHECK:STDOUT: %TestStaticMemberFunction: = struct_value () [template] +// CHECK:STDOUT: %TestAdapterMethod.type: type = fn_type @TestAdapterMethod [template] +// CHECK:STDOUT: %TestAdapterMethod: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -122,15 +122,15 @@ class StructAdapter { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %SomeClassAdapter.decl.loc4: type = class_decl @SomeClassAdapter [template = constants.%SomeClassAdapter] {} // CHECK:STDOUT: %SomeClass.decl: type = class_decl @SomeClass [template = constants.%SomeClass] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %SomeClassAdapter.decl.loc15: type = class_decl @SomeClassAdapter [template = constants.%SomeClassAdapter] {} -// CHECK:STDOUT: %TestStaticMemberFunction.decl: TestStaticMemberFunction = fn_decl @TestStaticMemberFunction [template = constants.%struct.4] { +// CHECK:STDOUT: %TestStaticMemberFunction.decl: = fn_decl @TestStaticMemberFunction [template = constants.%TestStaticMemberFunction] { // CHECK:STDOUT: %SomeClassAdapter.ref.loc19: type = name_ref SomeClassAdapter, %SomeClassAdapter.decl.loc4 [template = constants.%SomeClassAdapter] // CHECK:STDOUT: %a.loc19_29.1: SomeClassAdapter = param a // CHECK:STDOUT: @TestStaticMemberFunction.%a: SomeClassAdapter = bind_name a, %a.loc19_29.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %TestAdapterMethod.decl: TestAdapterMethod = fn_decl @TestAdapterMethod [template = constants.%struct.5] { +// CHECK:STDOUT: %TestAdapterMethod.decl: = fn_decl @TestAdapterMethod [template = constants.%TestAdapterMethod] { // CHECK:STDOUT: %SomeClassAdapter.ref.loc23: type = name_ref SomeClassAdapter, %SomeClassAdapter.decl.loc4 [template = constants.%SomeClassAdapter] // CHECK:STDOUT: %a.loc23_22.1: SomeClassAdapter = param a // CHECK:STDOUT: @TestAdapterMethod.%a: SomeClassAdapter = bind_name a, %a.loc23_22.1 @@ -147,16 +147,16 @@ class StructAdapter { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @SomeClass { -// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_10.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_10.2: type = converted %int.make_type_32.loc7, %.loc7_10.1 [template = i32] // CHECK:STDOUT: %.loc7_8: = field_decl a, element0 [template] -// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_10.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_10.2: type = converted %int.make_type_32.loc8, %.loc8_10.1 [template = i32] // CHECK:STDOUT: %.loc8_8: = field_decl b, element1 [template] -// CHECK:STDOUT: %StaticMemberFunction.decl: StaticMemberFunction = fn_decl @StaticMemberFunction [template = constants.%struct.2] {} -// CHECK:STDOUT: %AdapterMethod.decl: AdapterMethod = fn_decl @AdapterMethod [template = constants.%struct.3] { +// CHECK:STDOUT: %StaticMemberFunction.decl: = fn_decl @StaticMemberFunction [template = constants.%StaticMemberFunction] {} +// CHECK:STDOUT: %AdapterMethod.decl: = fn_decl @AdapterMethod [template = constants.%AdapterMethod] { // CHECK:STDOUT: %SomeClassAdapter.ref: type = name_ref SomeClassAdapter, file.%SomeClassAdapter.decl.loc4 [template = constants.%SomeClassAdapter] // CHECK:STDOUT: %self.loc12_20.1: SomeClassAdapter = param self // CHECK:STDOUT: %self.loc12_20.2: SomeClassAdapter = bind_name self, %self.loc12_20.1 @@ -179,7 +179,7 @@ class StructAdapter { // CHECK:STDOUT: fn @TestStaticMemberFunction(%a: SomeClassAdapter) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: SomeClassAdapter = name_ref a, %a -// CHECK:STDOUT: %StaticMemberFunction.ref: StaticMemberFunction = name_ref StaticMemberFunction, @SomeClass.%StaticMemberFunction.decl [template = constants.%struct.2] +// CHECK:STDOUT: %StaticMemberFunction.ref: = name_ref StaticMemberFunction, @SomeClass.%StaticMemberFunction.decl [template = constants.%StaticMemberFunction] // CHECK:STDOUT: %StaticMemberFunction.call: init () = call %StaticMemberFunction.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -187,7 +187,7 @@ class StructAdapter { // CHECK:STDOUT: fn @TestAdapterMethod(%a: SomeClassAdapter) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: SomeClassAdapter = name_ref a, %a -// CHECK:STDOUT: %AdapterMethod.ref: AdapterMethod = name_ref AdapterMethod, @SomeClass.%AdapterMethod.decl [template = constants.%struct.3] +// CHECK:STDOUT: %AdapterMethod.ref: = name_ref AdapterMethod, @SomeClass.%AdapterMethod.decl [template = constants.%AdapterMethod] // CHECK:STDOUT: %.loc24: = bound_method %a.ref, %AdapterMethod.ref // CHECK:STDOUT: %AdapterMethod.call: init () = call %.loc24(%a.ref) // CHECK:STDOUT: return @@ -197,14 +197,14 @@ class StructAdapter { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %SomeClass: type = class_type @SomeClass [template] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %SomeClassAdapter: type = class_type @SomeClassAdapter [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -217,7 +217,7 @@ class StructAdapter { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %SomeClass.decl: type = class_decl @SomeClass [template = constants.%SomeClass] {} // CHECK:STDOUT: %SomeClassAdapter.decl: type = class_decl @SomeClassAdapter [template = constants.%SomeClassAdapter] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %SomeClassAdapter.ref: type = name_ref SomeClassAdapter, %SomeClassAdapter.decl [template = constants.%SomeClassAdapter] // CHECK:STDOUT: %a.loc12_6.1: SomeClassAdapter = param a // CHECK:STDOUT: @F.2.%a: SomeClassAdapter = bind_name a, %a.loc12_6.1 @@ -225,7 +225,7 @@ class StructAdapter { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @SomeClass { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%SomeClass [template = constants.%SomeClass] // CHECK:STDOUT: %self.loc5_8.1: SomeClass = param self // CHECK:STDOUT: %self.loc5_8.2: SomeClass = bind_name self, %self.loc5_8.1 @@ -250,7 +250,7 @@ class StructAdapter { // CHECK:STDOUT: fn @F.2(%a: SomeClassAdapter) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: SomeClassAdapter = name_ref a, %a -// CHECK:STDOUT: %F.ref: F = name_ref F, @SomeClass.%F.decl [template = constants.%struct.1] +// CHECK:STDOUT: %F.ref: = name_ref F, @SomeClass.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %.loc20: = bound_method %a.ref, %F.ref // CHECK:STDOUT: %F.call: init () = call %.loc20() [template = ] // CHECK:STDOUT: return @@ -260,15 +260,15 @@ class StructAdapter { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %SomeClass: type = class_type @SomeClass [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type SomeClass, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %SomeClassAdapter: type = class_type @SomeClassAdapter [template] // CHECK:STDOUT: %.4: type = ptr_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -280,15 +280,15 @@ class StructAdapter { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %SomeClass.decl: type = class_decl @SomeClass [template = constants.%SomeClass] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %SomeClassAdapter.decl: type = class_decl @SomeClassAdapter [template = constants.%SomeClassAdapter] {} -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %SomeClassAdapter.ref: type = name_ref SomeClassAdapter, %SomeClassAdapter.decl [template = constants.%SomeClassAdapter] // CHECK:STDOUT: %a.loc13_6.1: SomeClassAdapter = param a // CHECK:STDOUT: @F.%a: SomeClassAdapter = bind_name a, %a.loc13_6.1 -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_30.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc13_30.2: type = converted %int.make_type_32, %.loc13_30.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var @@ -296,11 +296,11 @@ class StructAdapter { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @SomeClass { -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_32.loc5, %.loc5_10.1 [template = i32] // CHECK:STDOUT: %.loc5_8: = field_decl a, element0 [template] -// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_32.loc6, %.loc6_10.1 [template = i32] // CHECK:STDOUT: %.loc6_8: = field_decl b, element1 [template] @@ -334,9 +334,9 @@ class StructAdapter { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %StructAdapter: type = class_type @StructAdapter [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %.3: type = ptr_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: } @@ -348,15 +348,15 @@ class StructAdapter { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %StructAdapter.decl: type = class_decl @StructAdapter [template = constants.%StructAdapter] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @StructAdapter { -// CHECK:STDOUT: %int.make_type_32.loc8_21: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc8_21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_21.1: type = value_of_initializer %int.make_type_32.loc8_21 [template = i32] // CHECK:STDOUT: %.loc8_21.2: type = converted %int.make_type_32.loc8_21, %.loc8_21.1 [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc8_30: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc8_30: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_30.1: type = value_of_initializer %int.make_type_32.loc8_30 [template = i32] // CHECK:STDOUT: %.loc8_30.2: type = converted %int.make_type_32.loc8_30, %.loc8_30.1 [template = i32] // CHECK:STDOUT: %.loc8_33: type = struct_type {.a: i32, .b: i32} [template = constants.%.2] diff --git a/toolchain/check/testdata/class/extern.carbon b/toolchain/check/testdata/class/extern.carbon index b1103cc7da03..52765fbb1730 100644 --- a/toolchain/check/testdata/class/extern.carbon +++ b/toolchain/check/testdata/class/extern.carbon @@ -346,9 +346,9 @@ extern class C; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.1: type = fn_type @.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: = struct_value () [template] +// CHECK:STDOUT: %.type: type = fn_type @.1 [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %.2: > = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -358,7 +358,7 @@ extern class C; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %.decl: = fn_decl @.1 [template = constants.%struct] {} +// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.2] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C; diff --git a/toolchain/check/testdata/class/fail_abstract.carbon b/toolchain/check/testdata/class/fail_abstract.carbon index 46177f59efb1..d4f00b1bcde7 100644 --- a/toolchain/check/testdata/class/fail_abstract.carbon +++ b/toolchain/check/testdata/class/fail_abstract.carbon @@ -34,9 +34,9 @@ fn Access(d: Derived) -> (i32, i32) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Abstract: type = class_type @Abstract [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type Abstract, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] @@ -44,8 +44,8 @@ fn Access(d: Derived) -> (i32, i32) { // CHECK:STDOUT: %.5: type = unbound_element_type Derived, Abstract [template] // CHECK:STDOUT: %.6: type = unbound_element_type Derived, i32 [template] // CHECK:STDOUT: %.7: type = struct_type {.base: Abstract, .d: i32} [template] -// CHECK:STDOUT: %Make: type = fn_type @Make [template] -// CHECK:STDOUT: %struct.2: Make = struct_value () [template] +// CHECK:STDOUT: %Make.type: type = fn_type @Make [template] +// CHECK:STDOUT: %Make: = struct_value () [template] // CHECK:STDOUT: %.8: type = struct_type {.base: {.a: i32}*, .d: i32} [template] // CHECK:STDOUT: %.9: type = ptr_type {.base: {.a: i32}*, .d: i32} [template] // CHECK:STDOUT: %.10: type = ptr_type {.base: Abstract, .d: i32} [template] @@ -54,8 +54,8 @@ fn Access(d: Derived) -> (i32, i32) { // CHECK:STDOUT: %.13: type = struct_type {.base: {.a: i32}, .d: i32} [template] // CHECK:STDOUT: %.14: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.15: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %Access: type = fn_type @Access [template] -// CHECK:STDOUT: %struct.3: Access = struct_value () [template] +// CHECK:STDOUT: %Access.type: type = fn_type @Access [template] +// CHECK:STDOUT: %Access: = struct_value () [template] // CHECK:STDOUT: %.16: type = ptr_type (i32, i32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -69,21 +69,21 @@ fn Access(d: Derived) -> (i32, i32) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Abstract.decl: type = class_decl @Abstract [template = constants.%Abstract] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [template = constants.%Derived] {} -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Make.decl: Make = fn_decl @Make [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Make.decl: = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %Derived.ref.loc21: type = name_ref Derived, %Derived.decl [template = constants.%Derived] // CHECK:STDOUT: @Make.%return: ref Derived = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Access.decl: Access = fn_decl @Access [template = constants.%struct.3] { +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Access.decl: = fn_decl @Access [template = constants.%Access] { // CHECK:STDOUT: %Derived.ref.loc29: type = name_ref Derived, %Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %d.loc29_11.1: Derived = param d // CHECK:STDOUT: @Access.%d: Derived = bind_name d, %d.loc29_11.1 -// CHECK:STDOUT: %int.make_type_32.loc29_27: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc29_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc29_27: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc29_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc29_35.1: (type, type) = tuple_literal (%int.make_type_32.loc29_27, %int.make_type_32.loc29_32) // CHECK:STDOUT: %.loc29_35.2: type = value_of_initializer %int.make_type_32.loc29_27 [template = i32] // CHECK:STDOUT: %.loc29_35.3: type = converted %int.make_type_32.loc29_27, %.loc29_35.2 [template = i32] @@ -95,7 +95,7 @@ fn Access(d: Derived) -> (i32, i32) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Abstract { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %.loc12_8: = field_decl a, element0 [template] @@ -108,7 +108,7 @@ fn Access(d: Derived) -> (i32, i32) { // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] // CHECK:STDOUT: %.loc16: = base_decl Abstract, element0 [template] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc18_10.2: type = converted %int.make_type_32, %.loc18_10.1 [template = i32] // CHECK:STDOUT: %.loc18_8: = field_decl d, element1 [template] diff --git a/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon b/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon index 30c3f19e1fc2..df0704b730e5 100644 --- a/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon +++ b/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon @@ -101,9 +101,9 @@ class C { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bad: type = class_type @Bad [template] // CHECK:STDOUT: %.1: i32 = int_literal 100 [template] -// CHECK:STDOUT: %Use: type = fn_type @Use [template] +// CHECK:STDOUT: %Use.type: type = fn_type @Use [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Use = struct_value () [template] +// CHECK:STDOUT: %Use: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -114,7 +114,7 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Bad.decl: type = class_decl @Bad [template = constants.%Bad] {} -// CHECK:STDOUT: %Use.decl: Use = fn_decl @Use [template = constants.%struct] { +// CHECK:STDOUT: %Use.decl: = fn_decl @Use [template = constants.%Use] { // CHECK:STDOUT: %Bad.ref: type = name_ref Bad, %Bad.decl [template = constants.%Bad] // CHECK:STDOUT: %b.loc16_8.1: Bad = param b // CHECK:STDOUT: @Use.%b: Bad = bind_name b, %b.loc16_8.1 @@ -141,9 +141,9 @@ class C { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bad: type = class_type @Bad [template] // CHECK:STDOUT: %.1: i32 = int_literal 100 [template] -// CHECK:STDOUT: %Use: type = fn_type @Use [template] +// CHECK:STDOUT: %Use.type: type = fn_type @Use [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Use = struct_value () [template] +// CHECK:STDOUT: %Use: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -154,7 +154,7 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Bad.decl: type = class_decl @Bad [template = constants.%Bad] {} -// CHECK:STDOUT: %Use.decl: Use = fn_decl @Use [template = constants.%struct] { +// CHECK:STDOUT: %Use.decl: = fn_decl @Use [template = constants.%Use] { // CHECK:STDOUT: %Bad.ref: type = name_ref Bad, %Bad.decl [template = constants.%Bad] // CHECK:STDOUT: %b.loc13_8.1: Bad = param b // CHECK:STDOUT: @Use.%b: Bad = bind_name b, %b.loc13_8.1 diff --git a/toolchain/check/testdata/class/fail_adapt_with_subobjects.carbon b/toolchain/check/testdata/class/fail_adapt_with_subobjects.carbon index 13cde042a5aa..7ec9b53f7deb 100644 --- a/toolchain/check/testdata/class/fail_adapt_with_subobjects.carbon +++ b/toolchain/check/testdata/class/fail_adapt_with_subobjects.carbon @@ -80,9 +80,9 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: %Base: type = class_type @Base [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %AdaptWithBase: type = class_type @AdaptWithBase [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] // CHECK:STDOUT: %.4: type = unbound_element_type AdaptWithBase, Base [template] // CHECK:STDOUT: } @@ -96,7 +96,7 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} // CHECK:STDOUT: %AdaptWithBase.decl: type = class_decl @AdaptWithBase [template = constants.%AdaptWithBase] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { @@ -105,7 +105,7 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @AdaptWithBase { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc10_12.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc10_12.2: type = converted %int.make_type_32, %.loc10_12.1 [template = i32] // CHECK:STDOUT: adapt_decl i32 @@ -124,9 +124,9 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %AdaptWithField: type = class_type @AdaptWithField [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type AdaptWithField, i32 [template] // CHECK:STDOUT: %AdaptWithFields: type = class_type @AdaptWithFields [template] // CHECK:STDOUT: %.3: type = unbound_element_type AdaptWithFields, i32 [template] @@ -140,21 +140,21 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %AdaptWithField.decl: type = class_decl @AdaptWithField [template = constants.%AdaptWithField] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %AdaptWithFields.decl: type = class_decl @AdaptWithFields [template = constants.%AdaptWithFields] {} -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @AdaptWithField { -// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_12.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_12.2: type = converted %int.make_type_32.loc8, %.loc8_12.1 [template = i32] // CHECK:STDOUT: adapt_decl i32 -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] // CHECK:STDOUT: %.loc13_8: = field_decl n, element0 [template] @@ -165,19 +165,19 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @AdaptWithFields { -// CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc20_12.1: type = value_of_initializer %int.make_type_32.loc20 [template = i32] // CHECK:STDOUT: %.loc20_12.2: type = converted %int.make_type_32.loc20, %.loc20_12.1 [template = i32] // CHECK:STDOUT: adapt_decl i32 -// CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc25_10.1: type = value_of_initializer %int.make_type_32.loc25 [template = i32] // CHECK:STDOUT: %.loc25_10.2: type = converted %int.make_type_32.loc25, %.loc25_10.1 [template = i32] // CHECK:STDOUT: %.loc25_8: = field_decl a, element0 [template] -// CHECK:STDOUT: %int.make_type_32.loc26: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc26_10.1: type = value_of_initializer %int.make_type_32.loc26 [template = i32] // CHECK:STDOUT: %.loc26_10.2: type = converted %int.make_type_32.loc26, %.loc26_10.1 [template = i32] // CHECK:STDOUT: %.loc26_8: = field_decl b, element1 [template] -// CHECK:STDOUT: %int.make_type_32.loc27: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc27_10.1: type = value_of_initializer %int.make_type_32.loc27 [template = i32] // CHECK:STDOUT: %.loc27_10.2: type = converted %int.make_type_32.loc27, %.loc27_10.1 [template = i32] // CHECK:STDOUT: %.loc27_8: = field_decl c, element2 [template] @@ -200,8 +200,8 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: %.2: type = tuple_type () [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] // CHECK:STDOUT: %.4: type = unbound_element_type AdaptWithBaseAndFields, Base [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.5: type = unbound_element_type AdaptWithBaseAndFields, i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -214,7 +214,7 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} // CHECK:STDOUT: %AdaptWithBaseAndFields.decl: type = class_decl @AdaptWithBaseAndFields [template = constants.%AdaptWithBaseAndFields] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { @@ -225,7 +225,7 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: class @AdaptWithBaseAndFields { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc7: = base_decl Base, element0 [template] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc8_10.2: type = converted %int.make_type_32, %.loc8_10.1 [template = i32] // CHECK:STDOUT: %.loc8_8: = field_decl n, element1 [template] diff --git a/toolchain/check/testdata/class/fail_addr_not_self.carbon b/toolchain/check/testdata/class/fail_addr_not_self.carbon index 4a7c5d29b94e..2500791334f6 100644 --- a/toolchain/check/testdata/class/fail_addr_not_self.carbon +++ b/toolchain/check/testdata/class/fail_addr_not_self.carbon @@ -26,11 +26,11 @@ class Class { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // CHECK:STDOUT: %.1: type = ptr_type Class [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.2: G = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.3: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -44,13 +44,13 @@ class Class { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Class.ref.loc16: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc16: type = ptr_type Class [template = constants.%.1] // CHECK:STDOUT: %a.loc16_13.1: Class* = param a // CHECK:STDOUT: %a.loc16_13.2: Class* = bind_name a, %a.loc16_13.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.2] { +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Class.ref.loc21: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc21: type = ptr_type Class [template = constants.%.1] // CHECK:STDOUT: %b.loc21_13.1: Class* = param b diff --git a/toolchain/check/testdata/class/fail_addr_self.carbon b/toolchain/check/testdata/class/fail_addr_self.carbon index 2fd2544dcd29..5d67f1c12ddf 100644 --- a/toolchain/check/testdata/class/fail_addr_self.carbon +++ b/toolchain/check/testdata/class/fail_addr_self.carbon @@ -49,14 +49,14 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // CHECK:STDOUT: %.1: type = ptr_type Class [template] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.2: G = struct_value () [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.3: F = struct_value () [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] // CHECK:STDOUT: %.4: type = ptr_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -68,7 +68,7 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.3] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %Class.ref.loc16_9: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %c.loc16_6.1: Class = param c // CHECK:STDOUT: @F.2.%c: Class = bind_name c, %c.loc16_6.1 @@ -80,14 +80,14 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %Class.ref.loc12: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc12_24: type = ptr_type Class [template = constants.%.1] // CHECK:STDOUT: %self.loc12_13.1: Class* = param self // CHECK:STDOUT: %self.loc12_13.3: Class* = bind_name self, %self.loc12_13.1 // CHECK:STDOUT: %.loc12_8: Class* = addr_pattern %self.loc12_13.3 // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.2] { +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Class.ref.loc13: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %self.loc13_13.1: Class = param self // CHECK:STDOUT: %self.loc13_13.3: Class = bind_name self, %self.loc13_13.1 @@ -107,22 +107,22 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: fn @F.2(%c: Class, %p: Class*) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref.loc24: Class = name_ref c, %c -// CHECK:STDOUT: %F.ref.loc24: F = name_ref F, @Class.%F.decl [template = constants.%struct.1] +// CHECK:STDOUT: %F.ref.loc24: = name_ref F, @Class.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %.loc24: = bound_method %c.ref.loc24, %F.ref.loc24 // CHECK:STDOUT: %F.call.loc24: init () = call %.loc24() [template = ] // CHECK:STDOUT: %c.ref.loc33: Class = name_ref c, %c -// CHECK:STDOUT: %G.ref.loc33: G = name_ref G, @Class.%G.decl [template = constants.%struct.2] +// CHECK:STDOUT: %G.ref.loc33: = name_ref G, @Class.%G.decl [template = constants.%G] // CHECK:STDOUT: %.loc33: = bound_method %c.ref.loc33, %G.ref.loc33 // CHECK:STDOUT: %G.call.loc33: init () = call %.loc33() [template = ] // CHECK:STDOUT: %p.ref.loc36: Class* = name_ref p, %p // CHECK:STDOUT: %.loc36_4.1: ref Class = deref %p.ref.loc36 -// CHECK:STDOUT: %F.ref.loc36: F = name_ref F, @Class.%F.decl [template = constants.%struct.1] +// CHECK:STDOUT: %F.ref.loc36: = name_ref F, @Class.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %.loc36_7: = bound_method %.loc36_4.1, %F.ref.loc36 // CHECK:STDOUT: %.loc36_4.2: Class* = addr_of %.loc36_4.1 // CHECK:STDOUT: %F.call.loc36: init () = call %.loc36_7(%.loc36_4.2) // CHECK:STDOUT: %p.ref.loc44: Class* = name_ref p, %p // CHECK:STDOUT: %.loc44_4.1: ref Class = deref %p.ref.loc44 -// CHECK:STDOUT: %G.ref.loc44: G = name_ref G, @Class.%G.decl [template = constants.%struct.2] +// CHECK:STDOUT: %G.ref.loc44: = name_ref G, @Class.%G.decl [template = constants.%G] // CHECK:STDOUT: %.loc44_7: = bound_method %.loc44_4.1, %G.ref.loc44 // CHECK:STDOUT: %.loc44_4.2: Class* = addr_of %.loc44_4.1 // CHECK:STDOUT: %G.call.loc44: init () = call %.loc44_7() [template = ] diff --git a/toolchain/check/testdata/class/fail_base_bad_type.carbon b/toolchain/check/testdata/class/fail_base_bad_type.carbon index a6b00d487763..737391fbed82 100644 --- a/toolchain/check/testdata/class/fail_base_bad_type.carbon +++ b/toolchain/check/testdata/class/fail_base_bad_type.carbon @@ -138,27 +138,27 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %Base: type = class_type @Base [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %Final: type = class_type @Final [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.3: type = unbound_element_type Final, i32 [template] // CHECK:STDOUT: %.4: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %DeriveFromError: type = class_type @DeriveFromError [template] // CHECK:STDOUT: %.5: type = ptr_type DeriveFromError [template] -// CHECK:STDOUT: %AccessMemberWithInvalidBaseError: type = fn_type @AccessMemberWithInvalidBaseError [template] -// CHECK:STDOUT: %struct.2: AccessMemberWithInvalidBaseError = struct_value () [template] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseError.type: type = fn_type @AccessMemberWithInvalidBaseError [template] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseError: = struct_value () [template] // CHECK:STDOUT: %DeriveFromNonType: type = class_type @DeriveFromNonType [template] // CHECK:STDOUT: %.6: i32 = int_literal 32 [template] // CHECK:STDOUT: %.7: type = ptr_type DeriveFromNonType [template] -// CHECK:STDOUT: %AccessMemberWithInvalidBasNonType: type = fn_type @AccessMemberWithInvalidBasNonType [template] -// CHECK:STDOUT: %struct.3: AccessMemberWithInvalidBasNonType = struct_value () [template] +// CHECK:STDOUT: %AccessMemberWithInvalidBasNonType.type: type = fn_type @AccessMemberWithInvalidBasNonType [template] +// CHECK:STDOUT: %AccessMemberWithInvalidBasNonType: = struct_value () [template] // CHECK:STDOUT: %DeriveFromi32: type = class_type @DeriveFromi32 [template] // CHECK:STDOUT: %.8: type = ptr_type DeriveFromi32 [template] // CHECK:STDOUT: %.9: type = ptr_type i32 [template] -// CHECK:STDOUT: %ConvertToBadBasei32: type = fn_type @ConvertToBadBasei32 [template] -// CHECK:STDOUT: %struct.4: ConvertToBadBasei32 = struct_value () [template] -// CHECK:STDOUT: %AccessMemberWithInvalidBasei32: type = fn_type @AccessMemberWithInvalidBasei32 [template] -// CHECK:STDOUT: %struct.5: AccessMemberWithInvalidBasei32 = struct_value () [template] +// CHECK:STDOUT: %ConvertToBadBasei32.type: type = fn_type @ConvertToBadBasei32 [template] +// CHECK:STDOUT: %ConvertToBadBasei32: = struct_value () [template] +// CHECK:STDOUT: %AccessMemberWithInvalidBasei32.type: type = fn_type @AccessMemberWithInvalidBasei32 [template] +// CHECK:STDOUT: %AccessMemberWithInvalidBasei32: = struct_value () [template] // CHECK:STDOUT: %DeriveFromTuple: type = class_type @DeriveFromTuple [template] // CHECK:STDOUT: %.10: type = tuple_type (type) [template] // CHECK:STDOUT: %.11: type = tuple_type (Base) [template] @@ -166,40 +166,40 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %.13: type = tuple_type ({}*) [template] // CHECK:STDOUT: %.14: type = ptr_type DeriveFromTuple [template] // CHECK:STDOUT: %.15: type = ptr_type (Base,) [template] -// CHECK:STDOUT: %ConvertToBadBaseTuple: type = fn_type @ConvertToBadBaseTuple [template] -// CHECK:STDOUT: %struct.6: ConvertToBadBaseTuple = struct_value () [template] -// CHECK:STDOUT: %AccessMemberWithInvalidBaseTuple: type = fn_type @AccessMemberWithInvalidBaseTuple [template] -// CHECK:STDOUT: %struct.7: AccessMemberWithInvalidBaseTuple = struct_value () [template] +// CHECK:STDOUT: %ConvertToBadBaseTuple.type: type = fn_type @ConvertToBadBaseTuple [template] +// CHECK:STDOUT: %ConvertToBadBaseTuple: = struct_value () [template] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseTuple.type: type = fn_type @AccessMemberWithInvalidBaseTuple [template] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseTuple: = struct_value () [template] // CHECK:STDOUT: %DeriveFromStruct: type = class_type @DeriveFromStruct [template] // CHECK:STDOUT: %.16: type = struct_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %.17: type = ptr_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %.18: type = ptr_type DeriveFromStruct [template] -// CHECK:STDOUT: %ConvertToBadBaseStruct: type = fn_type @ConvertToBadBaseStruct [template] -// CHECK:STDOUT: %struct.8: ConvertToBadBaseStruct = struct_value () [template] -// CHECK:STDOUT: %AccessMemberWithInvalidBaseStruct: type = fn_type @AccessMemberWithInvalidBaseStruct [template] -// CHECK:STDOUT: %struct.9: AccessMemberWithInvalidBaseStruct = struct_value () [template] +// CHECK:STDOUT: %ConvertToBadBaseStruct.type: type = fn_type @ConvertToBadBaseStruct [template] +// CHECK:STDOUT: %ConvertToBadBaseStruct: = struct_value () [template] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseStruct.type: type = fn_type @AccessMemberWithInvalidBaseStruct [template] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseStruct: = struct_value () [template] // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] // CHECK:STDOUT: %DeriveFromIncomplete: type = class_type @DeriveFromIncomplete [template] // CHECK:STDOUT: %.19: type = ptr_type DeriveFromIncomplete [template] // CHECK:STDOUT: %.20: type = ptr_type Incomplete [template] -// CHECK:STDOUT: %ConvertToBadBaseIncomplete: type = fn_type @ConvertToBadBaseIncomplete [template] -// CHECK:STDOUT: %struct.10: ConvertToBadBaseIncomplete = struct_value () [template] -// CHECK:STDOUT: %AccessMemberWithInvalidBaseIncomplete: type = fn_type @AccessMemberWithInvalidBaseIncomplete [template] -// CHECK:STDOUT: %struct.11: AccessMemberWithInvalidBaseIncomplete = struct_value () [template] +// CHECK:STDOUT: %ConvertToBadBaseIncomplete.type: type = fn_type @ConvertToBadBaseIncomplete [template] +// CHECK:STDOUT: %ConvertToBadBaseIncomplete: = struct_value () [template] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseIncomplete.type: type = fn_type @AccessMemberWithInvalidBaseIncomplete [template] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseIncomplete: = struct_value () [template] // CHECK:STDOUT: %DeriveFromFinal: type = class_type @DeriveFromFinal [template] // CHECK:STDOUT: %.21: type = ptr_type {.a: i32} [template] // CHECK:STDOUT: %.22: type = unbound_element_type DeriveFromFinal, Final [template] // CHECK:STDOUT: %.23: type = struct_type {.base: Final} [template] // CHECK:STDOUT: %.24: type = ptr_type DeriveFromFinal [template] // CHECK:STDOUT: %.25: type = ptr_type Final [template] -// CHECK:STDOUT: %ConvertToBadBaseFinal: type = fn_type @ConvertToBadBaseFinal [template] -// CHECK:STDOUT: %struct.12: ConvertToBadBaseFinal = struct_value () [template] +// CHECK:STDOUT: %ConvertToBadBaseFinal.type: type = fn_type @ConvertToBadBaseFinal [template] +// CHECK:STDOUT: %ConvertToBadBaseFinal: = struct_value () [template] // CHECK:STDOUT: %.26: type = struct_type {.base: {.a: i32}*} [template] // CHECK:STDOUT: %.27: type = ptr_type {.base: Final} [template] -// CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_WithMember: type = fn_type @AccessMemberWithInvalidBaseFinal_WithMember [template] -// CHECK:STDOUT: %struct.13: AccessMemberWithInvalidBaseFinal_WithMember = struct_value () [template] -// CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_NoMember: type = fn_type @AccessMemberWithInvalidBaseFinal_NoMember [template] -// CHECK:STDOUT: %struct.14: AccessMemberWithInvalidBaseFinal_NoMember = struct_value () [template] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_WithMember.type: type = fn_type @AccessMemberWithInvalidBaseFinal_WithMember [template] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_WithMember: = struct_value () [template] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_NoMember.type: type = fn_type @AccessMemberWithInvalidBaseFinal_NoMember [template] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_NoMember: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -232,58 +232,58 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} // CHECK:STDOUT: %Final.decl: type = class_decl @Final [template = constants.%Final] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %DeriveFromError.decl: type = class_decl @DeriveFromError [template = constants.%DeriveFromError] {} -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %AccessMemberWithInvalidBaseError.decl: AccessMemberWithInvalidBaseError = fn_decl @AccessMemberWithInvalidBaseError [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseError.decl: = fn_decl @AccessMemberWithInvalidBaseError [template = constants.%AccessMemberWithInvalidBaseError] { // CHECK:STDOUT: %DeriveFromError.ref: type = name_ref DeriveFromError, %DeriveFromError.decl [template = constants.%DeriveFromError] // CHECK:STDOUT: %.loc25_55: type = ptr_type DeriveFromError [template = constants.%.5] // CHECK:STDOUT: %p.loc25_37.1: DeriveFromError* = param p // CHECK:STDOUT: @AccessMemberWithInvalidBaseError.%p: DeriveFromError* = bind_name p, %p.loc25_37.1 -// CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc25_61.1: type = value_of_initializer %int.make_type_32.loc25 [template = i32] // CHECK:STDOUT: %.loc25_61.2: type = converted %int.make_type_32.loc25, %.loc25_61.1 [template = i32] // CHECK:STDOUT: @AccessMemberWithInvalidBaseError.%return: ref i32 = var // CHECK:STDOUT: } // CHECK:STDOUT: %DeriveFromNonType.decl: type = class_decl @DeriveFromNonType [template = constants.%DeriveFromNonType] {} -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %AccessMemberWithInvalidBasNonType.decl: AccessMemberWithInvalidBasNonType = fn_decl @AccessMemberWithInvalidBasNonType [template = constants.%struct.3] { +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessMemberWithInvalidBasNonType.decl: = fn_decl @AccessMemberWithInvalidBasNonType [template = constants.%AccessMemberWithInvalidBasNonType] { // CHECK:STDOUT: %DeriveFromNonType.ref: type = name_ref DeriveFromNonType, %DeriveFromNonType.decl [template = constants.%DeriveFromNonType] // CHECK:STDOUT: %.loc35_58: type = ptr_type DeriveFromNonType [template = constants.%.7] // CHECK:STDOUT: %p.loc35_38.1: DeriveFromNonType* = param p // CHECK:STDOUT: @AccessMemberWithInvalidBasNonType.%p: DeriveFromNonType* = bind_name p, %p.loc35_38.1 -// CHECK:STDOUT: %int.make_type_32.loc35: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc35_64.1: type = value_of_initializer %int.make_type_32.loc35 [template = i32] // CHECK:STDOUT: %.loc35_64.2: type = converted %int.make_type_32.loc35, %.loc35_64.1 [template = i32] // CHECK:STDOUT: @AccessMemberWithInvalidBasNonType.%return: ref i32 = var // CHECK:STDOUT: } // CHECK:STDOUT: %DeriveFromi32.decl: type = class_decl @DeriveFromi32 [template = constants.%DeriveFromi32] {} -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %ConvertToBadBasei32.decl: ConvertToBadBasei32 = fn_decl @ConvertToBadBasei32 [template = constants.%struct.4] { +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %ConvertToBadBasei32.decl: = fn_decl @ConvertToBadBasei32 [template = constants.%ConvertToBadBasei32] { // CHECK:STDOUT: %DeriveFromi32.ref.loc51: type = name_ref DeriveFromi32, %DeriveFromi32.decl [template = constants.%DeriveFromi32] // CHECK:STDOUT: %.loc51_40: type = ptr_type DeriveFromi32 [template = constants.%.8] // CHECK:STDOUT: %p.loc51_24.1: DeriveFromi32* = param p // CHECK:STDOUT: @ConvertToBadBasei32.%p: DeriveFromi32* = bind_name p, %p.loc51_24.1 -// CHECK:STDOUT: %int.make_type_32.loc51: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc51: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc51_49.1: type = value_of_initializer %int.make_type_32.loc51 [template = i32] // CHECK:STDOUT: %.loc51_49.2: type = converted %int.make_type_32.loc51, %.loc51_49.1 [template = i32] // CHECK:STDOUT: %.loc51_49.3: type = ptr_type i32 [template = constants.%.9] // CHECK:STDOUT: @ConvertToBadBasei32.%return: ref i32* = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %AccessMemberWithInvalidBasei32.decl: AccessMemberWithInvalidBasei32 = fn_decl @AccessMemberWithInvalidBasei32 [template = constants.%struct.5] { +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessMemberWithInvalidBasei32.decl: = fn_decl @AccessMemberWithInvalidBasei32 [template = constants.%AccessMemberWithInvalidBasei32] { // CHECK:STDOUT: %DeriveFromi32.ref.loc53: type = name_ref DeriveFromi32, %DeriveFromi32.decl [template = constants.%DeriveFromi32] // CHECK:STDOUT: %.loc53_51: type = ptr_type DeriveFromi32 [template = constants.%.8] // CHECK:STDOUT: %p.loc53_35.1: DeriveFromi32* = param p // CHECK:STDOUT: @AccessMemberWithInvalidBasei32.%p: DeriveFromi32* = bind_name p, %p.loc53_35.1 -// CHECK:STDOUT: %int.make_type_32.loc53: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc53: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc53_57.1: type = value_of_initializer %int.make_type_32.loc53 [template = i32] // CHECK:STDOUT: %.loc53_57.2: type = converted %int.make_type_32.loc53, %.loc53_57.1 [template = i32] // CHECK:STDOUT: @AccessMemberWithInvalidBasei32.%return: ref i32 = var // CHECK:STDOUT: } // CHECK:STDOUT: %DeriveFromTuple.decl: type = class_decl @DeriveFromTuple [template = constants.%DeriveFromTuple] {} -// CHECK:STDOUT: %ConvertToBadBaseTuple.decl: ConvertToBadBaseTuple = fn_decl @ConvertToBadBaseTuple [template = constants.%struct.6] { +// CHECK:STDOUT: %ConvertToBadBaseTuple.decl: = fn_decl @ConvertToBadBaseTuple [template = constants.%ConvertToBadBaseTuple] { // CHECK:STDOUT: %DeriveFromTuple.ref.loc67: type = name_ref DeriveFromTuple, %DeriveFromTuple.decl [template = constants.%DeriveFromTuple] // CHECK:STDOUT: %.loc67_44: type = ptr_type DeriveFromTuple [template = constants.%.14] // CHECK:STDOUT: %p.loc67_26.1: DeriveFromTuple* = param p @@ -294,51 +294,51 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %.loc67_57.2: type = ptr_type (Base,) [template = constants.%.15] // CHECK:STDOUT: @ConvertToBadBaseTuple.%return: ref (Base,)* = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %AccessMemberWithInvalidBaseTuple.decl: AccessMemberWithInvalidBaseTuple = fn_decl @AccessMemberWithInvalidBaseTuple [template = constants.%struct.7] { +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseTuple.decl: = fn_decl @AccessMemberWithInvalidBaseTuple [template = constants.%AccessMemberWithInvalidBaseTuple] { // CHECK:STDOUT: %DeriveFromTuple.ref.loc69: type = name_ref DeriveFromTuple, %DeriveFromTuple.decl [template = constants.%DeriveFromTuple] // CHECK:STDOUT: %.loc69_55: type = ptr_type DeriveFromTuple [template = constants.%.14] // CHECK:STDOUT: %p.loc69_37.1: DeriveFromTuple* = param p // CHECK:STDOUT: @AccessMemberWithInvalidBaseTuple.%p: DeriveFromTuple* = bind_name p, %p.loc69_37.1 -// CHECK:STDOUT: %int.make_type_32.loc69: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc69: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc69_61.1: type = value_of_initializer %int.make_type_32.loc69 [template = i32] // CHECK:STDOUT: %.loc69_61.2: type = converted %int.make_type_32.loc69, %.loc69_61.1 [template = i32] // CHECK:STDOUT: @AccessMemberWithInvalidBaseTuple.%return: ref i32 = var // CHECK:STDOUT: } // CHECK:STDOUT: %DeriveFromStruct.decl: type = class_decl @DeriveFromStruct [template = constants.%DeriveFromStruct] {} -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.9: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.10: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.11: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %ConvertToBadBaseStruct.decl: ConvertToBadBaseStruct = fn_decl @ConvertToBadBaseStruct [template = constants.%struct.8] { +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %ConvertToBadBaseStruct.decl: = fn_decl @ConvertToBadBaseStruct [template = constants.%ConvertToBadBaseStruct] { // CHECK:STDOUT: %DeriveFromStruct.ref.loc85: type = name_ref DeriveFromStruct, %DeriveFromStruct.decl [template = constants.%DeriveFromStruct] // CHECK:STDOUT: %.loc85_46: type = ptr_type DeriveFromStruct [template = constants.%.18] // CHECK:STDOUT: %p.loc85_27.1: DeriveFromStruct* = param p // CHECK:STDOUT: @ConvertToBadBaseStruct.%p: DeriveFromStruct* = bind_name p, %p.loc85_27.1 -// CHECK:STDOUT: %int.make_type_32.loc85_57: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc85_57: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc85_57.1: type = value_of_initializer %int.make_type_32.loc85_57 [template = i32] // CHECK:STDOUT: %.loc85_57.2: type = converted %int.make_type_32.loc85_57, %.loc85_57.1 [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc85_66: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc85_66: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc85_66.1: type = value_of_initializer %int.make_type_32.loc85_66 [template = i32] // CHECK:STDOUT: %.loc85_66.2: type = converted %int.make_type_32.loc85_66, %.loc85_66.1 [template = i32] // CHECK:STDOUT: %.loc85_69: type = struct_type {.a: i32, .b: i32} [template = constants.%.16] // CHECK:STDOUT: %.loc85_70: type = ptr_type {.a: i32, .b: i32} [template = constants.%.17] // CHECK:STDOUT: @ConvertToBadBaseStruct.%return: ref {.a: i32, .b: i32}* = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.12: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %AccessMemberWithInvalidBaseStruct.decl: AccessMemberWithInvalidBaseStruct = fn_decl @AccessMemberWithInvalidBaseStruct [template = constants.%struct.9] { +// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseStruct.decl: = fn_decl @AccessMemberWithInvalidBaseStruct [template = constants.%AccessMemberWithInvalidBaseStruct] { // CHECK:STDOUT: %DeriveFromStruct.ref.loc88: type = name_ref DeriveFromStruct, %DeriveFromStruct.decl [template = constants.%DeriveFromStruct] // CHECK:STDOUT: %.loc88_57: type = ptr_type DeriveFromStruct [template = constants.%.18] // CHECK:STDOUT: %p.loc88_38.1: DeriveFromStruct* = param p // CHECK:STDOUT: @AccessMemberWithInvalidBaseStruct.%p: DeriveFromStruct* = bind_name p, %p.loc88_38.1 -// CHECK:STDOUT: %int.make_type_32.loc88: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc88: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc88_63.1: type = value_of_initializer %int.make_type_32.loc88 [template = i32] // CHECK:STDOUT: %.loc88_63.2: type = converted %int.make_type_32.loc88, %.loc88_63.1 [template = i32] // CHECK:STDOUT: @AccessMemberWithInvalidBaseStruct.%return: ref i32 = var // CHECK:STDOUT: } // CHECK:STDOUT: %Incomplete.decl: type = class_decl @Incomplete [template = constants.%Incomplete] {} // CHECK:STDOUT: %DeriveFromIncomplete.decl: type = class_decl @DeriveFromIncomplete [template = constants.%DeriveFromIncomplete] {} -// CHECK:STDOUT: %ConvertToBadBaseIncomplete.decl: ConvertToBadBaseIncomplete = fn_decl @ConvertToBadBaseIncomplete [template = constants.%struct.10] { +// CHECK:STDOUT: %ConvertToBadBaseIncomplete.decl: = fn_decl @ConvertToBadBaseIncomplete [template = constants.%ConvertToBadBaseIncomplete] { // CHECK:STDOUT: %DeriveFromIncomplete.ref.loc107: type = name_ref DeriveFromIncomplete, %DeriveFromIncomplete.decl [template = constants.%DeriveFromIncomplete] // CHECK:STDOUT: %.loc107_54: type = ptr_type DeriveFromIncomplete [template = constants.%.19] // CHECK:STDOUT: %p.loc107_31.1: DeriveFromIncomplete* = param p @@ -347,19 +347,19 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %.loc107_70: type = ptr_type Incomplete [template = constants.%.20] // CHECK:STDOUT: @ConvertToBadBaseIncomplete.%return: ref Incomplete* = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.13: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %AccessMemberWithInvalidBaseIncomplete.decl: AccessMemberWithInvalidBaseIncomplete = fn_decl @AccessMemberWithInvalidBaseIncomplete [template = constants.%struct.11] { +// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseIncomplete.decl: = fn_decl @AccessMemberWithInvalidBaseIncomplete [template = constants.%AccessMemberWithInvalidBaseIncomplete] { // CHECK:STDOUT: %DeriveFromIncomplete.ref.loc109: type = name_ref DeriveFromIncomplete, %DeriveFromIncomplete.decl [template = constants.%DeriveFromIncomplete] // CHECK:STDOUT: %.loc109_65: type = ptr_type DeriveFromIncomplete [template = constants.%.19] // CHECK:STDOUT: %p.loc109_42.1: DeriveFromIncomplete* = param p // CHECK:STDOUT: @AccessMemberWithInvalidBaseIncomplete.%p: DeriveFromIncomplete* = bind_name p, %p.loc109_42.1 -// CHECK:STDOUT: %int.make_type_32.loc109: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc109: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc109_71.1: type = value_of_initializer %int.make_type_32.loc109 [template = i32] // CHECK:STDOUT: %.loc109_71.2: type = converted %int.make_type_32.loc109, %.loc109_71.1 [template = i32] // CHECK:STDOUT: @AccessMemberWithInvalidBaseIncomplete.%return: ref i32 = var // CHECK:STDOUT: } // CHECK:STDOUT: %DeriveFromFinal.decl: type = class_decl @DeriveFromFinal [template = constants.%DeriveFromFinal] {} -// CHECK:STDOUT: %ConvertToBadBaseFinal.decl: ConvertToBadBaseFinal = fn_decl @ConvertToBadBaseFinal [template = constants.%struct.12] { +// CHECK:STDOUT: %ConvertToBadBaseFinal.decl: = fn_decl @ConvertToBadBaseFinal [template = constants.%ConvertToBadBaseFinal] { // CHECK:STDOUT: %DeriveFromFinal.ref.loc120: type = name_ref DeriveFromFinal, %DeriveFromFinal.decl [template = constants.%DeriveFromFinal] // CHECK:STDOUT: %.loc120_44: type = ptr_type DeriveFromFinal [template = constants.%.24] // CHECK:STDOUT: %p.loc120_26.1: DeriveFromFinal* = param p @@ -368,24 +368,24 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %.loc120_55: type = ptr_type Final [template = constants.%.25] // CHECK:STDOUT: @ConvertToBadBaseFinal.%return: ref Final* = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.14: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_WithMember.decl: AccessMemberWithInvalidBaseFinal_WithMember = fn_decl @AccessMemberWithInvalidBaseFinal_WithMember [template = constants.%struct.13] { +// CHECK:STDOUT: %import_ref.14: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_WithMember.decl: = fn_decl @AccessMemberWithInvalidBaseFinal_WithMember [template = constants.%AccessMemberWithInvalidBaseFinal_WithMember] { // CHECK:STDOUT: %DeriveFromFinal.ref.loc124: type = name_ref DeriveFromFinal, %DeriveFromFinal.decl [template = constants.%DeriveFromFinal] // CHECK:STDOUT: %.loc124_66: type = ptr_type DeriveFromFinal [template = constants.%.24] // CHECK:STDOUT: %p.loc124_48.1: DeriveFromFinal* = param p // CHECK:STDOUT: @AccessMemberWithInvalidBaseFinal_WithMember.%p: DeriveFromFinal* = bind_name p, %p.loc124_48.1 -// CHECK:STDOUT: %int.make_type_32.loc124: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc124: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc124_72.1: type = value_of_initializer %int.make_type_32.loc124 [template = i32] // CHECK:STDOUT: %.loc124_72.2: type = converted %int.make_type_32.loc124, %.loc124_72.1 [template = i32] // CHECK:STDOUT: @AccessMemberWithInvalidBaseFinal_WithMember.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.15: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_NoMember.decl: AccessMemberWithInvalidBaseFinal_NoMember = fn_decl @AccessMemberWithInvalidBaseFinal_NoMember [template = constants.%struct.14] { +// CHECK:STDOUT: %import_ref.15: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_NoMember.decl: = fn_decl @AccessMemberWithInvalidBaseFinal_NoMember [template = constants.%AccessMemberWithInvalidBaseFinal_NoMember] { // CHECK:STDOUT: %DeriveFromFinal.ref.loc128: type = name_ref DeriveFromFinal, %DeriveFromFinal.decl [template = constants.%DeriveFromFinal] // CHECK:STDOUT: %.loc128_64: type = ptr_type DeriveFromFinal [template = constants.%.24] // CHECK:STDOUT: %p.loc128_46.1: DeriveFromFinal* = param p // CHECK:STDOUT: @AccessMemberWithInvalidBaseFinal_NoMember.%p: DeriveFromFinal* = bind_name p, %p.loc128_46.1 -// CHECK:STDOUT: %int.make_type_32.loc128: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc128: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc128_70.1: type = value_of_initializer %int.make_type_32.loc128 [template = i32] // CHECK:STDOUT: %.loc128_70.2: type = converted %int.make_type_32.loc128, %.loc128_70.1 [template = i32] // CHECK:STDOUT: @AccessMemberWithInvalidBaseFinal_NoMember.%return: ref i32 = var @@ -398,7 +398,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Final { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32, %.loc13_10.1 [template = i32] // CHECK:STDOUT: %.loc13_8: = field_decl a, element0 [template] @@ -429,7 +429,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @DeriveFromi32 { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc42_16.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc42_16.2: type = converted %int.make_type_32, %.loc42_16.1 [template = i32] // CHECK:STDOUT: %.loc42_19: = base_decl , element0 [template] @@ -453,10 +453,10 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @DeriveFromStruct { -// CHECK:STDOUT: %int.make_type_32.loc78_21: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc78_21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc78_21.1: type = value_of_initializer %int.make_type_32.loc78_21 [template = i32] // CHECK:STDOUT: %.loc78_21.2: type = converted %int.make_type_32.loc78_21, %.loc78_21.1 [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc78_30: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc78_30: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc78_30.1: type = value_of_initializer %int.make_type_32.loc78_30 [template = i32] // CHECK:STDOUT: %.loc78_30.2: type = converted %int.make_type_32.loc78_30, %.loc78_30.1 [template = i32] // CHECK:STDOUT: %.loc78_33: type = struct_type {.a: i32, .b: i32} [template = constants.%.16] diff --git a/toolchain/check/testdata/class/fail_base_method_define.carbon b/toolchain/check/testdata/class/fail_base_method_define.carbon index f846fce174b4..a73386fcbfed 100644 --- a/toolchain/check/testdata/class/fail_base_method_define.carbon +++ b/toolchain/check/testdata/class/fail_base_method_define.carbon @@ -35,21 +35,21 @@ fn D.C.F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] // CHECK:STDOUT: %.4: type = unbound_element_type D, B [template] // CHECK:STDOUT: %.5: type = struct_type {.base: B} [template] -// CHECK:STDOUT: %F.3: type = fn_type @F.3 [template] -// CHECK:STDOUT: %struct.3: F = struct_value () [template] -// CHECK:STDOUT: %.6: type = fn_type @.1 [template] -// CHECK:STDOUT: %struct.4: = struct_value () [template] +// CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] +// CHECK:STDOUT: %F.3: = struct_value () [template] +// CHECK:STDOUT: %.type: type = fn_type @.1 [template] +// CHECK:STDOUT: %.6: > = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -61,12 +61,12 @@ fn D.C.F() {} // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F.3 [template = constants.%struct.3] {} -// CHECK:STDOUT: %.decl: = fn_decl @.1 [template = constants.%struct.4] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F.3 [template = constants.%F.3] {} +// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.6] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -76,7 +76,7 @@ fn D.C.F() {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.2] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C diff --git a/toolchain/check/testdata/class/fail_base_misplaced.carbon b/toolchain/check/testdata/class/fail_base_misplaced.carbon index a9003dc83203..426ec14acb50 100644 --- a/toolchain/check/testdata/class/fail_base_misplaced.carbon +++ b/toolchain/check/testdata/class/fail_base_misplaced.carbon @@ -32,9 +32,9 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file {} diff --git a/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon b/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon index 1a16a94de042..90d438f38225 100644 --- a/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon +++ b/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon @@ -27,16 +27,16 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type A, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %.4: type = unbound_element_type B, i32 [template] // CHECK:STDOUT: %.5: type = struct_type {.b: i32} [template] -// CHECK:STDOUT: %AccessBInA: type = fn_type @AccessBInA [template] -// CHECK:STDOUT: %struct.2: AccessBInA = struct_value () [template] +// CHECK:STDOUT: %AccessBInA.type: type = fn_type @AccessBInA [template] +// CHECK:STDOUT: %AccessBInA: = struct_value () [template] // CHECK:STDOUT: %.6: type = ptr_type {.a: i32} [template] // CHECK:STDOUT: %.7: type = ptr_type {.b: i32} [template] // CHECK:STDOUT: } @@ -50,15 +50,15 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %AccessBInA.decl: AccessBInA = fn_decl @AccessBInA [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AccessBInA.decl: = fn_decl @AccessBInA [template = constants.%AccessBInA] { // CHECK:STDOUT: %A.ref: type = name_ref A, %A.decl [template = constants.%A] // CHECK:STDOUT: %a.loc19_15.1: A = param a // CHECK:STDOUT: @AccessBInA.%a: A = bind_name a, %a.loc19_15.1 -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_24.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc19_24.2: type = converted %int.make_type_32, %.loc19_24.1 [template = i32] // CHECK:STDOUT: @AccessBInA.%return: ref i32 = var @@ -66,7 +66,7 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %.loc12_8: = field_decl a, element0 [template] @@ -77,7 +77,7 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc16_10.2: type = converted %int.make_type_32, %.loc16_10.1 [template = i32] // CHECK:STDOUT: %.loc16_8: = field_decl b, element0 [template] diff --git a/toolchain/check/testdata/class/fail_convert_to_invalid.carbon b/toolchain/check/testdata/class/fail_convert_to_invalid.carbon index 9cbc17100ee2..1c2582334134 100644 --- a/toolchain/check/testdata/class/fail_convert_to_invalid.carbon +++ b/toolchain/check/testdata/class/fail_convert_to_invalid.carbon @@ -23,9 +23,9 @@ fn Make() -> C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %Make: type = fn_type @Make [template] +// CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Make = struct_value () [template] +// CHECK:STDOUT: %Make: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 123 [template] // CHECK:STDOUT: %.3: type = struct_type {.a: i32} [template] // CHECK:STDOUT: } @@ -38,7 +38,7 @@ fn Make() -> C { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %Make.decl: Make = fn_decl @Make [template = constants.%struct] { +// CHECK:STDOUT: %Make.decl: = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: @Make.%return: ref C = var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/fail_derived_to_base.carbon b/toolchain/check/testdata/class/fail_derived_to_base.carbon index 6b92bc2b38d6..88dfc19708ec 100644 --- a/toolchain/check/testdata/class/fail_derived_to_base.carbon +++ b/toolchain/check/testdata/class/fail_derived_to_base.carbon @@ -38,9 +38,9 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A1: type = class_type @A1 [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type A1, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %A2: type = class_type @A2 [template] @@ -52,16 +52,16 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: %.8: type = struct_type {.base: A2, .b: i32} [template] // CHECK:STDOUT: %.9: type = ptr_type B2 [template] // CHECK:STDOUT: %.10: type = ptr_type A1 [template] -// CHECK:STDOUT: %ConvertUnrelated: type = fn_type @ConvertUnrelated [template] -// CHECK:STDOUT: %struct.2: ConvertUnrelated = struct_value () [template] +// CHECK:STDOUT: %ConvertUnrelated.type: type = fn_type @ConvertUnrelated [template] +// CHECK:STDOUT: %ConvertUnrelated: = struct_value () [template] // CHECK:STDOUT: %.11: type = struct_type {.base: {.a: i32}*, .b: i32} [template] // CHECK:STDOUT: %.12: type = ptr_type {.base: {.a: i32}*, .b: i32} [template] // CHECK:STDOUT: %.13: type = ptr_type {.base: A2, .b: i32} [template] // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] // CHECK:STDOUT: %.14: type = ptr_type Incomplete [template] // CHECK:STDOUT: %.15: type = ptr_type A2 [template] -// CHECK:STDOUT: %ConvertIncomplete: type = fn_type @ConvertIncomplete [template] -// CHECK:STDOUT: %struct.3: ConvertIncomplete = struct_value () [template] +// CHECK:STDOUT: %ConvertIncomplete.type: type = fn_type @ConvertIncomplete [template] +// CHECK:STDOUT: %ConvertIncomplete: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,12 +76,12 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %A1.decl: type = class_decl @A1 [template = constants.%A1] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %A2.decl: type = class_decl @A2 [template = constants.%A2] {} -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %B2.decl: type = class_decl @B2 [template = constants.%B2] {} -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %ConvertUnrelated.decl: ConvertUnrelated = fn_decl @ConvertUnrelated [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %ConvertUnrelated.decl: = fn_decl @ConvertUnrelated [template = constants.%ConvertUnrelated] { // CHECK:STDOUT: %B2.ref: type = name_ref B2, %B2.decl [template = constants.%B2] // CHECK:STDOUT: %.loc28_26: type = ptr_type B2 [template = constants.%.9] // CHECK:STDOUT: %p.loc28_21.1: B2* = param p @@ -91,7 +91,7 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: @ConvertUnrelated.%return: ref A1* = var // CHECK:STDOUT: } // CHECK:STDOUT: %Incomplete.decl: type = class_decl @Incomplete [template = constants.%Incomplete] {} -// CHECK:STDOUT: %ConvertIncomplete.decl: ConvertIncomplete = fn_decl @ConvertIncomplete [template = constants.%struct.3] { +// CHECK:STDOUT: %ConvertIncomplete.decl: = fn_decl @ConvertIncomplete [template = constants.%ConvertIncomplete] { // CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, %Incomplete.decl [template = constants.%Incomplete] // CHECK:STDOUT: %.loc35_35: type = ptr_type Incomplete [template = constants.%.14] // CHECK:STDOUT: %p.loc35_22.1: Incomplete* = param p @@ -103,7 +103,7 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A1 { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %.loc12_8: = field_decl a, element0 [template] @@ -114,7 +114,7 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A2 { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc16_10.2: type = converted %int.make_type_32, %.loc16_10.1 [template = i32] // CHECK:STDOUT: %.loc16_8: = field_decl a, element0 [template] @@ -127,7 +127,7 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: class @B2 { // CHECK:STDOUT: %A2.ref: type = name_ref A2, file.%A2.decl [template = constants.%A2] // CHECK:STDOUT: %.loc20: = base_decl A2, element0 [template] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc21_10.2: type = converted %int.make_type_32, %.loc21_10.1 [template = i32] // CHECK:STDOUT: %.loc21_8: = field_decl b, element1 [template] diff --git a/toolchain/check/testdata/class/fail_field_modifiers.carbon b/toolchain/check/testdata/class/fail_field_modifiers.carbon index 532697435d13..bc04a7902678 100644 --- a/toolchain/check/testdata/class/fail_field_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_field_modifiers.carbon @@ -38,9 +38,9 @@ class Class { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type Class, i32 [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] @@ -54,27 +54,27 @@ class Class { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_18.1: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_18.2: type = converted %int.make_type_32.loc17, %.loc17_18.1 [template = i32] // CHECK:STDOUT: %.loc17_16: = field_decl j, element0 [template] -// CHECK:STDOUT: %int.make_type_32.loc23: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_16.1: type = value_of_initializer %int.make_type_32.loc23 [template = i32] // CHECK:STDOUT: %.loc23_16.2: type = converted %int.make_type_32.loc23, %.loc23_16.1 [template = i32] // CHECK:STDOUT: %.loc23_14: = field_decl k, element1 [template] -// CHECK:STDOUT: %int.make_type_32.loc29: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc29: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc29_18.1: type = value_of_initializer %int.make_type_32.loc29 [template = i32] // CHECK:STDOUT: %.loc29_18.2: type = converted %int.make_type_32.loc29, %.loc29_18.1 [template = i32] // CHECK:STDOUT: %.loc29_24: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %l: i32 = bind_name l, %.loc29_24 -// CHECK:STDOUT: %int.make_type_32.loc34: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc34_16.1: type = value_of_initializer %int.make_type_32.loc34 [template = i32] // CHECK:STDOUT: %.loc34_16.2: type = converted %int.make_type_32.loc34, %.loc34_16.1 [template = i32] // CHECK:STDOUT: %.loc34_22: i32 = int_literal 1 [template = constants.%.4] diff --git a/toolchain/check/testdata/class/fail_generic_method.carbon b/toolchain/check/testdata/class/fail_generic_method.carbon index 6f603165cd7b..e416723009d8 100644 --- a/toolchain/check/testdata/class/fail_generic_method.carbon +++ b/toolchain/check/testdata/class/fail_generic_method.carbon @@ -35,19 +35,19 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %Class.1: type = generic_class_type @Class [template] +// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Class = struct_value () [template] +// CHECK:STDOUT: %Class.1: = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class [template] // CHECK:STDOUT: %.2: type = unbound_element_type Class, T [symbolic] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.3: type = struct_type {.a: T} [symbolic] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.3: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %N: i32 = bind_symbolic_name N 0 [symbolic] -// CHECK:STDOUT: %.4: type = fn_type @.1 [template] -// CHECK:STDOUT: %struct.4: = struct_value () [template] +// CHECK:STDOUT: %.type: type = fn_type @.1 [template] +// CHECK:STDOUT: %.4: > = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -56,13 +56,13 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: .Class = %Class.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Class.decl: Class = class_decl @Class [template = constants.%struct.1] { +// CHECK:STDOUT: %Class.decl: = class_decl @Class [template = constants.%Class.1] { // CHECK:STDOUT: %T.loc11_13.1: type = param T // CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %.decl: = fn_decl @.1 [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.3() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.4] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc32_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc32_14.2: type = converted %int.make_type_32, %.loc32_14.1 [template = i32] // CHECK:STDOUT: %N.loc32_10.1: i32 = param N @@ -79,7 +79,7 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: class @Class { // CHECK:STDOUT: %T.ref.loc12: type = name_ref T, file.%T.loc11_13.2 [symbolic = constants.%T] // CHECK:STDOUT: %.loc12: = field_decl a, element0 [template] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class.2 [template = constants.%Class.2] // CHECK:STDOUT: %self.loc13_8.1: Class = param self // CHECK:STDOUT: %self.loc13_8.2: Class = bind_name self, %self.loc13_8.1 diff --git a/toolchain/check/testdata/class/fail_incomplete.carbon b/toolchain/check/testdata/class/fail_incomplete.carbon index 9282243b67ac..801e4d10c30c 100644 --- a/toolchain/check/testdata/class/fail_incomplete.carbon +++ b/toolchain/check/testdata/class/fail_incomplete.carbon @@ -139,33 +139,33 @@ fn CallReturnIncomplete() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %.1: type = fn_type @.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: = struct_value () [template] -// CHECK:STDOUT: %CallClassFunction: type = fn_type @CallClassFunction [template] -// CHECK:STDOUT: %struct.2: CallClassFunction = struct_value () [template] -// CHECK:STDOUT: %ConvertFromStruct: type = fn_type @ConvertFromStruct [template] -// CHECK:STDOUT: %struct.3: ConvertFromStruct = struct_value () [template] +// CHECK:STDOUT: %.type: type = fn_type @.1 [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %.2: > = struct_value () [template] +// CHECK:STDOUT: %CallClassFunction.type: type = fn_type @CallClassFunction [template] +// CHECK:STDOUT: %CallClassFunction: = struct_value () [template] +// CHECK:STDOUT: %ConvertFromStruct.type: type = fn_type @ConvertFromStruct [template] +// CHECK:STDOUT: %ConvertFromStruct: = struct_value () [template] // CHECK:STDOUT: %.3: type = struct_type {} [template] // CHECK:STDOUT: %.4: type = ptr_type Class [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.4: Int32 = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.5: G = struct_value () [template] -// CHECK:STDOUT: %MemberAccess: type = fn_type @MemberAccess [template] -// CHECK:STDOUT: %struct.6: MemberAccess = struct_value () [template] -// CHECK:STDOUT: %Copy: type = fn_type @Copy [template] -// CHECK:STDOUT: %struct.7: Copy = struct_value () [template] -// CHECK:STDOUT: %Let: type = fn_type @Let [template] -// CHECK:STDOUT: %struct.8: Let = struct_value () [template] -// CHECK:STDOUT: %TakeIncomplete: type = fn_type @TakeIncomplete [template] -// CHECK:STDOUT: %struct.9: TakeIncomplete = struct_value () [template] -// CHECK:STDOUT: %ReturnIncomplete: type = fn_type @ReturnIncomplete [template] -// CHECK:STDOUT: %struct.10: ReturnIncomplete = struct_value () [template] -// CHECK:STDOUT: %CallTakeIncomplete: type = fn_type @CallTakeIncomplete [template] -// CHECK:STDOUT: %struct.11: CallTakeIncomplete = struct_value () [template] -// CHECK:STDOUT: %CallReturnIncomplete: type = fn_type @CallReturnIncomplete [template] -// CHECK:STDOUT: %struct.12: CallReturnIncomplete = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %MemberAccess.type: type = fn_type @MemberAccess [template] +// CHECK:STDOUT: %MemberAccess: = struct_value () [template] +// CHECK:STDOUT: %Copy.type: type = fn_type @Copy [template] +// CHECK:STDOUT: %Copy: = struct_value () [template] +// CHECK:STDOUT: %Let.type: type = fn_type @Let [template] +// CHECK:STDOUT: %Let: = struct_value () [template] +// CHECK:STDOUT: %TakeIncomplete.type: type = fn_type @TakeIncomplete [template] +// CHECK:STDOUT: %TakeIncomplete: = struct_value () [template] +// CHECK:STDOUT: %ReturnIncomplete.type: type = fn_type @ReturnIncomplete [template] +// CHECK:STDOUT: %ReturnIncomplete: = struct_value () [template] +// CHECK:STDOUT: %CallTakeIncomplete.type: type = fn_type @CallTakeIncomplete [template] +// CHECK:STDOUT: %CallTakeIncomplete: = struct_value () [template] +// CHECK:STDOUT: %CallReturnIncomplete.type: type = fn_type @CallReturnIncomplete [template] +// CHECK:STDOUT: %CallReturnIncomplete: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -186,38 +186,38 @@ fn CallReturnIncomplete() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %.decl: = fn_decl @.1 [template = constants.%struct.1] {} -// CHECK:STDOUT: %CallClassFunction.decl: CallClassFunction = fn_decl @CallClassFunction [template = constants.%struct.2] {} +// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.2] {} +// CHECK:STDOUT: %CallClassFunction.decl: = fn_decl @CallClassFunction [template = constants.%CallClassFunction] {} // CHECK:STDOUT: %Class.ref.loc40: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %global_var.var: ref = var global_var // CHECK:STDOUT: %global_var: ref = bind_name global_var, %global_var.var -// CHECK:STDOUT: %ConvertFromStruct.decl: ConvertFromStruct = fn_decl @ConvertFromStruct [template = constants.%struct.3] { +// CHECK:STDOUT: %ConvertFromStruct.decl: = fn_decl @ConvertFromStruct [template = constants.%ConvertFromStruct] { // CHECK:STDOUT: %Class.ref.loc49: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: @ConvertFromStruct.%return: ref Class = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.5] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Class.ref.loc51: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc51_14: type = ptr_type Class [template = constants.%.4] // CHECK:STDOUT: %p.loc51_6.1: Class* = param p // CHECK:STDOUT: @G.%p: Class* = bind_name p, %p.loc51_6.1 -// CHECK:STDOUT: %int.make_type_32.loc51: init type = call constants.%struct.4() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc51: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc51_20.1: type = value_of_initializer %int.make_type_32.loc51 [template = i32] // CHECK:STDOUT: %.loc51_20.2: type = converted %int.make_type_32.loc51, %.loc51_20.1 [template = i32] // CHECK:STDOUT: @G.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %MemberAccess.decl: MemberAccess = fn_decl @MemberAccess [template = constants.%struct.6] { +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %MemberAccess.decl: = fn_decl @MemberAccess [template = constants.%MemberAccess] { // CHECK:STDOUT: %Class.ref.loc62: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc62_25: type = ptr_type Class [template = constants.%.4] // CHECK:STDOUT: %p.loc62_17.1: Class* = param p // CHECK:STDOUT: @MemberAccess.%p: Class* = bind_name p, %p.loc62_17.1 -// CHECK:STDOUT: %int.make_type_32.loc62: init type = call constants.%struct.4() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc62: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc62_31.1: type = value_of_initializer %int.make_type_32.loc62 [template = i32] // CHECK:STDOUT: %.loc62_31.2: type = converted %int.make_type_32.loc62, %.loc62_31.1 [template = i32] // CHECK:STDOUT: @MemberAccess.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Copy.decl: Copy = fn_decl @Copy [template = constants.%struct.7] { +// CHECK:STDOUT: %Copy.decl: = fn_decl @Copy [template = constants.%Copy] { // CHECK:STDOUT: %Class.ref.loc80_12: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc80: type = ptr_type Class [template = constants.%.4] // CHECK:STDOUT: %p.loc80_9.1: Class* = param p @@ -225,28 +225,28 @@ fn CallReturnIncomplete() { // CHECK:STDOUT: %Class.ref.loc80_23: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: @Copy.%return: ref Class = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Let.decl: Let = fn_decl @Let [template = constants.%struct.8] { +// CHECK:STDOUT: %Let.decl: = fn_decl @Let [template = constants.%Let] { // CHECK:STDOUT: %Class.ref.loc84: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc84: type = ptr_type Class [template = constants.%.4] // CHECK:STDOUT: %p.loc84_8.1: Class* = param p // CHECK:STDOUT: @Let.%p: Class* = bind_name p, %p.loc84_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %TakeIncomplete.decl: TakeIncomplete = fn_decl @TakeIncomplete [template = constants.%struct.9] { +// CHECK:STDOUT: %TakeIncomplete.decl: = fn_decl @TakeIncomplete [template = constants.%TakeIncomplete] { // CHECK:STDOUT: %Class.ref.loc95: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %c.loc95_19.1: Class = param c // CHECK:STDOUT: @TakeIncomplete.%c: Class = bind_name c, %c.loc95_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %ReturnIncomplete.decl: ReturnIncomplete = fn_decl @ReturnIncomplete [template = constants.%struct.10] { +// CHECK:STDOUT: %ReturnIncomplete.decl: = fn_decl @ReturnIncomplete [template = constants.%ReturnIncomplete] { // CHECK:STDOUT: %Class.ref.loc97: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: @ReturnIncomplete.%return: ref Class = var // CHECK:STDOUT: } -// CHECK:STDOUT: %CallTakeIncomplete.decl: CallTakeIncomplete = fn_decl @CallTakeIncomplete [template = constants.%struct.11] { +// CHECK:STDOUT: %CallTakeIncomplete.decl: = fn_decl @CallTakeIncomplete [template = constants.%CallTakeIncomplete] { // CHECK:STDOUT: %Class.ref.loc99: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc99: type = ptr_type Class [template = constants.%.4] // CHECK:STDOUT: %p.loc99_23.1: Class* = param p // CHECK:STDOUT: @CallTakeIncomplete.%p: Class* = bind_name p, %p.loc99_23.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %CallReturnIncomplete.decl: CallReturnIncomplete = fn_decl @CallReturnIncomplete [template = constants.%struct.12] {} +// CHECK:STDOUT: %CallReturnIncomplete.decl: = fn_decl @CallReturnIncomplete [template = constants.%CallReturnIncomplete] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class; @@ -307,11 +307,11 @@ fn CallReturnIncomplete() { // CHECK:STDOUT: // CHECK:STDOUT: fn @CallTakeIncomplete(%p: Class*) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %TakeIncomplete.ref.loc110: TakeIncomplete = name_ref TakeIncomplete, file.%TakeIncomplete.decl [template = constants.%struct.9] +// CHECK:STDOUT: %TakeIncomplete.ref.loc110: = name_ref TakeIncomplete, file.%TakeIncomplete.decl [template = constants.%TakeIncomplete] // CHECK:STDOUT: %p.ref: Class* = name_ref p, %p // CHECK:STDOUT: %.loc110: ref Class = deref %p.ref // CHECK:STDOUT: %TakeIncomplete.call.loc110: init () = call %TakeIncomplete.ref.loc110() [template = ] -// CHECK:STDOUT: %TakeIncomplete.ref.loc122: TakeIncomplete = name_ref TakeIncomplete, file.%TakeIncomplete.decl [template = constants.%struct.9] +// CHECK:STDOUT: %TakeIncomplete.ref.loc122: = name_ref TakeIncomplete, file.%TakeIncomplete.decl [template = constants.%TakeIncomplete] // CHECK:STDOUT: %.loc122: {} = struct_literal () // CHECK:STDOUT: %TakeIncomplete.call.loc122: init () = call %TakeIncomplete.ref.loc122() [template = ] // CHECK:STDOUT: return @@ -319,7 +319,7 @@ fn CallReturnIncomplete() { // CHECK:STDOUT: // CHECK:STDOUT: fn @CallReturnIncomplete() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %ReturnIncomplete.ref: ReturnIncomplete = name_ref ReturnIncomplete, file.%ReturnIncomplete.decl [template = constants.%struct.10] +// CHECK:STDOUT: %ReturnIncomplete.ref: = name_ref ReturnIncomplete, file.%ReturnIncomplete.decl [template = constants.%ReturnIncomplete] // CHECK:STDOUT: %ReturnIncomplete.call: init = call %ReturnIncomplete.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/fail_init.carbon b/toolchain/check/testdata/class/fail_init.carbon index 744e54b2c3a1..359bdd1cbe01 100644 --- a/toolchain/check/testdata/class/fail_init.carbon +++ b/toolchain/check/testdata/class/fail_init.carbon @@ -34,13 +34,13 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type Class, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %.6: type = ptr_type {.a: i32, .b: i32} [template] @@ -58,17 +58,17 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] {} +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %.loc12_8: = field_decl a, element0 [template] -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] // CHECK:STDOUT: %.loc13_8: = field_decl b, element1 [template] diff --git a/toolchain/check/testdata/class/fail_init_as_inplace.carbon b/toolchain/check/testdata/class/fail_init_as_inplace.carbon index 7522f9371b05..3a5734a81caf 100644 --- a/toolchain/check/testdata/class/fail_init_as_inplace.carbon +++ b/toolchain/check/testdata/class/fail_init_as_inplace.carbon @@ -30,20 +30,20 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type Class, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %.4: type = ptr_type Class [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.2: G = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.3: F = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.5: type = ptr_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %.6: i32 = int_literal 1 [template] // CHECK:STDOUT: %.7: i32 = int_literal 2 [template] -// CHECK:STDOUT: %struct.4: Class = struct_value (%.6, %.7) [template] +// CHECK:STDOUT: %struct: Class = struct_value (%.6, %.7) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -55,23 +55,23 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Class.ref: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc16: type = ptr_type Class [template = constants.%.4] // CHECK:STDOUT: %p.loc16_6.1: Class* = param p // CHECK:STDOUT: @G.%p: Class* = bind_name p, %p.loc16_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.3] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %.loc12_8: = field_decl a, element0 [template] -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] // CHECK:STDOUT: %.loc13_8: = field_decl b, element1 [template] @@ -100,12 +100,12 @@ fn F() { // CHECK:STDOUT: %.loc25_33.4: init i32 = initialize_from %.loc25_24 to %.loc25_33.3 [template = constants.%.6] // CHECK:STDOUT: %.loc25_33.5: ref i32 = class_element_access %.loc25_33.2, element1 // CHECK:STDOUT: %.loc25_33.6: init i32 = initialize_from %.loc25_32 to %.loc25_33.5 [template = constants.%.7] -// CHECK:STDOUT: %.loc25_33.7: init Class = class_init (%.loc25_33.4, %.loc25_33.6), %.loc25_33.2 [template = constants.%struct.4] +// CHECK:STDOUT: %.loc25_33.7: init Class = class_init (%.loc25_33.4, %.loc25_33.6), %.loc25_33.2 [template = constants.%struct] // CHECK:STDOUT: %.loc25_33.8: ref Class = temporary %.loc25_33.2, %.loc25_33.7 // CHECK:STDOUT: %.loc25_35.1: ref Class = converted %.loc25_33.1, %.loc25_33.8 // CHECK:STDOUT: %.loc25_35.2: Class = bind_value %.loc25_35.1 // CHECK:STDOUT: assign %c.var, -// CHECK:STDOUT: %G.ref: G = name_ref G, file.%G.decl [template = constants.%struct.2] +// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %c.ref: ref Class = name_ref c, %c // CHECK:STDOUT: %.loc26: Class* = addr_of %c.ref // CHECK:STDOUT: %G.call: init () = call %G.ref(%.loc26) diff --git a/toolchain/check/testdata/class/fail_memaccess_category.carbon b/toolchain/check/testdata/class/fail_memaccess_category.carbon index 569f853b7b4a..9c739b4fd363 100644 --- a/toolchain/check/testdata/class/fail_memaccess_category.carbon +++ b/toolchain/check/testdata/class/fail_memaccess_category.carbon @@ -43,16 +43,16 @@ fn F(s: {.a: A}, b: B) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] // CHECK:STDOUT: %.1: type = ptr_type A [template] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] // CHECK:STDOUT: %.3: type = struct_type {} [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %.4: type = ptr_type {} [template] // CHECK:STDOUT: %.5: type = unbound_element_type B, A [template] // CHECK:STDOUT: %.6: type = struct_type {.a: A} [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] // CHECK:STDOUT: %.7: type = struct_type {.a: {}*} [template] // CHECK:STDOUT: %.8: type = ptr_type {.a: A} [template] // CHECK:STDOUT: } @@ -67,7 +67,7 @@ fn F(s: {.a: A}, b: B) { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %A.ref: type = name_ref A, %A.decl [template = constants.%A] // CHECK:STDOUT: %.loc19: type = struct_type {.a: A} [template = constants.%.6] // CHECK:STDOUT: %s.loc19_6.1: {.a: A} = param s @@ -79,7 +79,7 @@ fn F(s: {.a: A}, b: B) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %.loc12_20: type = ptr_type A [template = constants.%.1] // CHECK:STDOUT: %self.loc12_13.1: A* = param self @@ -107,14 +107,14 @@ fn F(s: {.a: A}, b: B) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %s.ref: {.a: A} = name_ref s, %s // CHECK:STDOUT: %.loc28_4: A = struct_access %s.ref, element0 -// CHECK:STDOUT: %F.ref.loc28: F = name_ref F, @A.%F.decl [template = constants.%struct.1] +// CHECK:STDOUT: %F.ref.loc28: = name_ref F, @A.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %.loc28_6: = bound_method %.loc28_4, %F.ref.loc28 // CHECK:STDOUT: %F.call.loc28: init () = call %.loc28_6() [template = ] // CHECK:STDOUT: %b.ref: B = name_ref b, %b // CHECK:STDOUT: %a.ref: = name_ref a, @B.%.loc16 [template = @B.%.loc16] // CHECK:STDOUT: %.loc38_4.1: ref A = class_element_access %b.ref, element0 // CHECK:STDOUT: %.loc38_4.2: A = bind_value %.loc38_4.1 -// CHECK:STDOUT: %F.ref.loc38: F = name_ref F, @A.%F.decl [template = constants.%struct.1] +// CHECK:STDOUT: %F.ref.loc38: = name_ref F, @A.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %.loc38_6: = bound_method %.loc38_4.2, %F.ref.loc38 // CHECK:STDOUT: %F.call.loc38: init () = call %.loc38_6() [template = ] // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/class/fail_member_of_let.carbon b/toolchain/check/testdata/class/fail_member_of_let.carbon index b7b1f758714e..14402ab5a355 100644 --- a/toolchain/check/testdata/class/fail_member_of_let.carbon +++ b/toolchain/check/testdata/class/fail_member_of_let.carbon @@ -26,14 +26,14 @@ fn T.F() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: type = fn_type @.1 [template] -// CHECK:STDOUT: %struct.3: = struct_value () [template] +// CHECK:STDOUT: %.type: type = fn_type @.1 [template] +// CHECK:STDOUT: %.3: > = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -43,15 +43,15 @@ fn T.F() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %Class.ref: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %T: type = bind_name T, %Class.ref -// CHECK:STDOUT: %.decl: = fn_decl @.1 [template = constants.%struct.3] {} +// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.3] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_32, %.loc12_13.1 [template = i32] // CHECK:STDOUT: %return.var: ref i32 = var diff --git a/toolchain/check/testdata/class/fail_method.carbon b/toolchain/check/testdata/class/fail_method.carbon index 794920028f69..6ca209ef1273 100644 --- a/toolchain/check/testdata/class/fail_method.carbon +++ b/toolchain/check/testdata/class/fail_method.carbon @@ -50,14 +50,14 @@ fn F(c: Class) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %NoSelf: type = fn_type @NoSelf [template] +// CHECK:STDOUT: %NoSelf.type: type = fn_type @NoSelf [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: NoSelf = struct_value () [template] -// CHECK:STDOUT: %WithSelf: type = fn_type @WithSelf [template] -// CHECK:STDOUT: %struct.2: WithSelf = struct_value () [template] +// CHECK:STDOUT: %NoSelf: = struct_value () [template] +// CHECK:STDOUT: %WithSelf.type: type = fn_type @WithSelf [template] +// CHECK:STDOUT: %WithSelf: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.3: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -71,9 +71,9 @@ fn F(c: Class) { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} // CHECK:STDOUT: %Class.ref.loc16: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %WithSelf.ref: WithSelf = name_ref WithSelf, @Class.%WithSelf.decl [template = constants.%struct.2] -// CHECK:STDOUT: %A: WithSelf = bind_alias A, @Class.%WithSelf.decl [template = constants.%struct.2] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.3] { +// CHECK:STDOUT: %WithSelf.ref: = name_ref WithSelf, @Class.%WithSelf.decl [template = constants.%WithSelf] +// CHECK:STDOUT: %A: = bind_alias A, @Class.%WithSelf.decl [template = constants.%WithSelf] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Class.ref.loc18: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %c.loc18_6.1: Class = param c // CHECK:STDOUT: @F.%c: Class = bind_name c, %c.loc18_6.1 @@ -81,8 +81,8 @@ fn F(c: Class) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %NoSelf.decl: NoSelf = fn_decl @NoSelf [template = constants.%struct.1] {} -// CHECK:STDOUT: %WithSelf.decl: WithSelf = fn_decl @WithSelf [template = constants.%struct.2] { +// CHECK:STDOUT: %NoSelf.decl: = fn_decl @NoSelf [template = constants.%NoSelf] {} +// CHECK:STDOUT: %WithSelf.decl: = fn_decl @WithSelf [template = constants.%WithSelf] { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %self.loc13_15.1: Class = param self // CHECK:STDOUT: %self.loc13_15.2: Class = bind_name self, %self.loc13_15.1 @@ -101,23 +101,23 @@ fn F(c: Class) { // CHECK:STDOUT: fn @F(%c: Class) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref.loc19: Class = name_ref c, %c -// CHECK:STDOUT: %NoSelf.ref.loc19: NoSelf = name_ref NoSelf, @Class.%NoSelf.decl [template = constants.%struct.1] +// CHECK:STDOUT: %NoSelf.ref.loc19: = name_ref NoSelf, @Class.%NoSelf.decl [template = constants.%NoSelf] // CHECK:STDOUT: %NoSelf.call.loc19: init () = call %NoSelf.ref.loc19() // CHECK:STDOUT: %c.ref.loc20: Class = name_ref c, %c -// CHECK:STDOUT: %WithSelf.ref.loc20: WithSelf = name_ref WithSelf, @Class.%WithSelf.decl [template = constants.%struct.2] +// CHECK:STDOUT: %WithSelf.ref.loc20: = name_ref WithSelf, @Class.%WithSelf.decl [template = constants.%WithSelf] // CHECK:STDOUT: %.loc20: = bound_method %c.ref.loc20, %WithSelf.ref.loc20 // CHECK:STDOUT: %WithSelf.call.loc20: init () = call %.loc20(%c.ref.loc20) // CHECK:STDOUT: %Class.ref.loc22: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %NoSelf.ref.loc22: NoSelf = name_ref NoSelf, @Class.%NoSelf.decl [template = constants.%struct.1] +// CHECK:STDOUT: %NoSelf.ref.loc22: = name_ref NoSelf, @Class.%NoSelf.decl [template = constants.%NoSelf] // CHECK:STDOUT: %NoSelf.call.loc22: init () = call %NoSelf.ref.loc22() // CHECK:STDOUT: %Class.ref.loc30: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %WithSelf.ref.loc30: WithSelf = name_ref WithSelf, @Class.%WithSelf.decl [template = constants.%struct.2] +// CHECK:STDOUT: %WithSelf.ref.loc30: = name_ref WithSelf, @Class.%WithSelf.decl [template = constants.%WithSelf] // CHECK:STDOUT: %WithSelf.call.loc30: init () = call %WithSelf.ref.loc30() [template = ] // CHECK:STDOUT: %Class.ref.loc38: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %WithSelf.ref.loc38: WithSelf = name_ref WithSelf, @Class.%WithSelf.decl [template = constants.%struct.2] +// CHECK:STDOUT: %WithSelf.ref.loc38: = name_ref WithSelf, @Class.%WithSelf.decl [template = constants.%WithSelf] // CHECK:STDOUT: %c.ref.loc38: Class = name_ref c, %c // CHECK:STDOUT: %WithSelf.call.loc38: init () = call %WithSelf.ref.loc38() [template = ] -// CHECK:STDOUT: %A.ref: WithSelf = name_ref A, file.%A [template = constants.%struct.2] +// CHECK:STDOUT: %A.ref: = name_ref A, file.%A [template = constants.%WithSelf] // CHECK:STDOUT: %WithSelf.call.loc46: init () = call %A.ref() [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/fail_method_modifiers.carbon b/toolchain/check/testdata/class/fail_method_modifiers.carbon index 25b7ee26c570..9f768a142ab7 100644 --- a/toolchain/check/testdata/class/fail_method_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_method_modifiers.carbon @@ -59,20 +59,20 @@ base class BaseClass { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %FinalClass: type = class_type @FinalClass [template] -// CHECK:STDOUT: %Abstract.1: type = fn_type @Abstract.1 [template] +// CHECK:STDOUT: %Abstract.type.1: type = fn_type @Abstract.1 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Abstract = struct_value () [template] -// CHECK:STDOUT: %Virtual: type = fn_type @Virtual [template] -// CHECK:STDOUT: %struct.2: Virtual = struct_value () [template] +// CHECK:STDOUT: %Abstract.1: = struct_value () [template] +// CHECK:STDOUT: %Virtual.type: type = fn_type @Virtual [template] +// CHECK:STDOUT: %Virtual: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %AbstractClass: type = class_type @AbstractClass [template] -// CHECK:STDOUT: %Default: type = fn_type @Default [template] -// CHECK:STDOUT: %struct.3: Default = struct_value () [template] -// CHECK:STDOUT: %Final: type = fn_type @Final [template] -// CHECK:STDOUT: %struct.4: Final = struct_value () [template] +// CHECK:STDOUT: %Default.type: type = fn_type @Default [template] +// CHECK:STDOUT: %Default: = struct_value () [template] +// CHECK:STDOUT: %Final.type: type = fn_type @Final [template] +// CHECK:STDOUT: %Final: = struct_value () [template] // CHECK:STDOUT: %BaseClass: type = class_type @BaseClass [template] -// CHECK:STDOUT: %Abstract.2: type = fn_type @Abstract.2 [template] -// CHECK:STDOUT: %struct.5: Abstract = struct_value () [template] +// CHECK:STDOUT: %Abstract.type.2: type = fn_type @Abstract.2 [template] +// CHECK:STDOUT: %Abstract.2: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -89,12 +89,12 @@ base class BaseClass { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @FinalClass { -// CHECK:STDOUT: %Abstract.decl: Abstract = fn_decl @Abstract.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %Abstract.decl: = fn_decl @Abstract.1 [template = constants.%Abstract.1] { // CHECK:STDOUT: %Self.ref.loc20: type = name_ref Self, constants.%FinalClass [template = constants.%FinalClass] // CHECK:STDOUT: %self.loc20_24.1: FinalClass = param self // CHECK:STDOUT: %self.loc20_24.2: FinalClass = bind_name self, %self.loc20_24.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %Virtual.decl: Virtual = fn_decl @Virtual [template = constants.%struct.2] { +// CHECK:STDOUT: %Virtual.decl: = fn_decl @Virtual [template = constants.%Virtual] { // CHECK:STDOUT: %Self.ref.loc29: type = name_ref Self, constants.%FinalClass [template = constants.%FinalClass] // CHECK:STDOUT: %self.loc29_22.1: FinalClass = param self // CHECK:STDOUT: %self.loc29_22.2: FinalClass = bind_name self, %self.loc29_22.1 @@ -107,12 +107,12 @@ base class BaseClass { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @AbstractClass { -// CHECK:STDOUT: %Default.decl: Default = fn_decl @Default [template = constants.%struct.3] { +// CHECK:STDOUT: %Default.decl: = fn_decl @Default [template = constants.%Default] { // CHECK:STDOUT: %Self.ref.loc38: type = name_ref Self, constants.%AbstractClass [template = constants.%AbstractClass] // CHECK:STDOUT: %self.loc38_22.1: AbstractClass = param self // CHECK:STDOUT: %self.loc38_22.2: AbstractClass = bind_name self, %self.loc38_22.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %Final.decl: Final = fn_decl @Final [template = constants.%struct.4] { +// CHECK:STDOUT: %Final.decl: = fn_decl @Final [template = constants.%Final] { // CHECK:STDOUT: %Self.ref.loc44: type = name_ref Self, constants.%AbstractClass [template = constants.%AbstractClass] // CHECK:STDOUT: %self.loc44_18.1: AbstractClass = param self // CHECK:STDOUT: %self.loc44_18.2: AbstractClass = bind_name self, %self.loc44_18.1 @@ -125,7 +125,7 @@ base class BaseClass { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @BaseClass { -// CHECK:STDOUT: %Abstract.decl: Abstract = fn_decl @Abstract.2 [template = constants.%struct.5] { +// CHECK:STDOUT: %Abstract.decl: = fn_decl @Abstract.2 [template = constants.%Abstract.2] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%BaseClass [template = constants.%BaseClass] // CHECK:STDOUT: %self.loc55_24.1: BaseClass = param self // CHECK:STDOUT: %self.loc55_24.2: BaseClass = bind_name self, %self.loc55_24.1 diff --git a/toolchain/check/testdata/class/fail_method_redefinition.carbon b/toolchain/check/testdata/class/fail_method_redefinition.carbon index c87b35764b9c..67611f4b2c32 100644 --- a/toolchain/check/testdata/class/fail_method_redefinition.carbon +++ b/toolchain/check/testdata/class/fail_method_redefinition.carbon @@ -23,9 +23,9 @@ class Class { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -39,8 +39,8 @@ class Class { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl.loc12: F = fn_decl @F [template = constants.%struct] {} -// CHECK:STDOUT: %F.decl.loc19: F = fn_decl @F [template = constants.%struct] {} +// CHECK:STDOUT: %F.decl.loc12: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl.loc19: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class diff --git a/toolchain/check/testdata/class/fail_out_of_line_decl.carbon b/toolchain/check/testdata/class/fail_out_of_line_decl.carbon index bebde0ee707e..f93e82e27cc0 100644 --- a/toolchain/check/testdata/class/fail_out_of_line_decl.carbon +++ b/toolchain/check/testdata/class/fail_out_of_line_decl.carbon @@ -20,9 +20,9 @@ fn C.F() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -32,7 +32,7 @@ fn C.F() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { diff --git a/toolchain/check/testdata/class/fail_redefinition.carbon b/toolchain/check/testdata/class/fail_redefinition.carbon index 984548e04445..f3ee4676a3f4 100644 --- a/toolchain/check/testdata/class/fail_redefinition.carbon +++ b/toolchain/check/testdata/class/fail_redefinition.carbon @@ -46,23 +46,23 @@ fn Class.I() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %H.1: type = fn_type @H.1 [template] -// CHECK:STDOUT: %struct.2: H = struct_value () [template] -// CHECK:STDOUT: %I.1: type = fn_type @I.1 [template] -// CHECK:STDOUT: %struct.3: I = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %H.type.1: type = fn_type @H.1 [template] +// CHECK:STDOUT: %H.1: = struct_value () [template] +// CHECK:STDOUT: %I.type.1: type = fn_type @I.1 [template] +// CHECK:STDOUT: %I.1: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %.3: type = class_type @.1 [template] -// CHECK:STDOUT: %G.1: type = fn_type @G.1 [template] -// CHECK:STDOUT: %struct.4: G = struct_value () [template] -// CHECK:STDOUT: %H.2: type = fn_type @H.2 [template] -// CHECK:STDOUT: %struct.5: H = struct_value () [template] -// CHECK:STDOUT: %I.2: type = fn_type @I.2 [template] -// CHECK:STDOUT: %struct.6: I = struct_value () [template] -// CHECK:STDOUT: %G.2: type = fn_type @G.2 [template] -// CHECK:STDOUT: %struct.7: G = struct_value () [template] +// CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] +// CHECK:STDOUT: %G.1: = struct_value () [template] +// CHECK:STDOUT: %H.type.2: type = fn_type @H.2 [template] +// CHECK:STDOUT: %H.2: = struct_value () [template] +// CHECK:STDOUT: %I.type.2: type = fn_type @I.2 [template] +// CHECK:STDOUT: %I.2: = struct_value () [template] +// CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] +// CHECK:STDOUT: %G.2: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -73,16 +73,16 @@ fn Class.I() {} // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} // CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.3] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] {} -// CHECK:STDOUT: %G.decl: G = fn_decl @G.2 [template = constants.%struct.7] {} -// CHECK:STDOUT: %H.decl: H = fn_decl @H.1 [template = constants.%struct.2] {} -// CHECK:STDOUT: %I.decl: I = fn_decl @I.1 [template = constants.%struct.3] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %G.decl: = fn_decl @G.2 [template = constants.%G.2] {} +// CHECK:STDOUT: %H.decl: = fn_decl @H.1 [template = constants.%H.1] {} +// CHECK:STDOUT: %I.decl: = fn_decl @I.1 [template = constants.%I.1] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] {} -// CHECK:STDOUT: %H.decl: H = fn_decl @H.1 [template = constants.%struct.2] {} -// CHECK:STDOUT: %I.decl: I = fn_decl @I.1 [template = constants.%struct.3] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %H.decl: = fn_decl @H.1 [template = constants.%H.1] {} +// CHECK:STDOUT: %I.decl: = fn_decl @I.1 [template = constants.%I.1] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -93,9 +93,9 @@ fn Class.I() {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @.1 { -// CHECK:STDOUT: %G.decl: G = fn_decl @G.1 [template = constants.%struct.4] {} -// CHECK:STDOUT: %H.decl: H = fn_decl @H.2 [template = constants.%struct.5] {} -// CHECK:STDOUT: %I.decl: I = fn_decl @I.2 [template = constants.%struct.6] {} +// CHECK:STDOUT: %G.decl: = fn_decl @G.1 [template = constants.%G.1] {} +// CHECK:STDOUT: %H.decl: = fn_decl @H.2 [template = constants.%H.2] {} +// CHECK:STDOUT: %I.decl: = fn_decl @I.2 [template = constants.%I.2] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%.3 diff --git a/toolchain/check/testdata/class/fail_scope.carbon b/toolchain/check/testdata/class/fail_scope.carbon index 8967318a20fd..f22036f7134a 100644 --- a/toolchain/check/testdata/class/fail_scope.carbon +++ b/toolchain/check/testdata/class/fail_scope.carbon @@ -25,15 +25,15 @@ fn G() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -44,10 +44,10 @@ fn G() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc17_11.2: type = converted %int.make_type_32, %.loc17_11.1 [template = i32] // CHECK:STDOUT: @G.%return: ref i32 = var @@ -55,8 +55,8 @@ fn G() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_32, %.loc12_13.1 [template = i32] // CHECK:STDOUT: %return.var: ref i32 = var diff --git a/toolchain/check/testdata/class/fail_self.carbon b/toolchain/check/testdata/class/fail_self.carbon index 7d82744e90f2..a31864279b1c 100644 --- a/toolchain/check/testdata/class/fail_self.carbon +++ b/toolchain/check/testdata/class/fail_self.carbon @@ -56,18 +56,18 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.2: G = struct_value () [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] // CHECK:STDOUT: %WrongSelf: type = class_type @WrongSelf [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.3: F = struct_value () [template] -// CHECK:STDOUT: %CallWrongSelf: type = fn_type @CallWrongSelf [template] -// CHECK:STDOUT: %struct.4: CallWrongSelf = struct_value () [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %CallWrongSelf.type: type = fn_type @CallWrongSelf [template] +// CHECK:STDOUT: %CallWrongSelf: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -79,17 +79,17 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %Self.ref.loc25: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.loc25_12.1: Class = param self // CHECK:STDOUT: @F.1.%self: Class = bind_name self, %self.loc25_12.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.2] { +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref.loc28: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: @G.%return: ref Class = var // CHECK:STDOUT: } // CHECK:STDOUT: %WrongSelf.decl: type = class_decl @WrongSelf [template = constants.%WrongSelf] {} -// CHECK:STDOUT: %CallWrongSelf.decl: CallWrongSelf = fn_decl @CallWrongSelf [template = constants.%struct.4] { +// CHECK:STDOUT: %CallWrongSelf.decl: = fn_decl @CallWrongSelf [template = constants.%CallWrongSelf] { // CHECK:STDOUT: %WrongSelf.ref: type = name_ref WrongSelf, %WrongSelf.decl [template = constants.%WrongSelf] // CHECK:STDOUT: %ws.loc45_18.1: WrongSelf = param ws // CHECK:STDOUT: @CallWrongSelf.%ws: WrongSelf = bind_name ws, %ws.loc45_18.1 @@ -97,12 +97,12 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %Self.ref.loc16: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.loc16_8.1: Class = param self // CHECK:STDOUT: %self.loc16_8.2: Class = bind_name self, %self.loc16_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.2] { +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref.loc18: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %return.var: ref Class = var // CHECK:STDOUT: } @@ -114,7 +114,7 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @WrongSelf { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.3] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %self.loc42_8.1: Class = param self // CHECK:STDOUT: %self.loc42_8.2: Class = bind_name self, %self.loc42_8.1 @@ -145,7 +145,7 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: fn @CallWrongSelf(%ws: WrongSelf) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ws.ref: WrongSelf = name_ref ws, %ws -// CHECK:STDOUT: %F.ref: F = name_ref F, @WrongSelf.%F.decl [template = constants.%struct.3] +// CHECK:STDOUT: %F.ref: = name_ref F, @WrongSelf.%F.decl [template = constants.%F.2] // CHECK:STDOUT: %.loc52: = bound_method %ws.ref, %F.ref // CHECK:STDOUT: %F.call: init () = call %.loc52() [template = ] // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/class/fail_self_type_member.carbon b/toolchain/check/testdata/class/fail_self_type_member.carbon index 0c7a687dc832..70314fe9dd36 100644 --- a/toolchain/check/testdata/class/fail_self_type_member.carbon +++ b/toolchain/check/testdata/class/fail_self_type_member.carbon @@ -29,22 +29,22 @@ fn F() -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Bool = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type Class, bool [template] // CHECK:STDOUT: %.3: type = struct_type {.b: bool} [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.4: type = ptr_type {.b: bool} [template] // CHECK:STDOUT: %.5: bool = bool_literal true [template] -// CHECK:STDOUT: %struct.3: Class = struct_value (%.5) [template] +// CHECK:STDOUT: %struct: Class = struct_value (%.5) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file {} // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc12_10.2: type = converted %bool.make_type, %.loc12_10.1 [template = bool] // CHECK:STDOUT: %.loc12_8: = field_decl b, element0 [template] diff --git a/toolchain/check/testdata/class/fail_todo_local_class.carbon b/toolchain/check/testdata/class/fail_todo_local_class.carbon index f62a1546958a..06f01b84b706 100644 --- a/toolchain/check/testdata/class/fail_todo_local_class.carbon +++ b/toolchain/check/testdata/class/fail_todo_local_class.carbon @@ -30,16 +30,16 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file {} // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A diff --git a/toolchain/check/testdata/class/fail_todo_modifiers.carbon b/toolchain/check/testdata/class/fail_todo_modifiers.carbon index 235fd31418d5..fa547fa73fe2 100644 --- a/toolchain/check/testdata/class/fail_todo_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_todo_modifiers.carbon @@ -58,28 +58,28 @@ abstract class Abstract { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Access: type = class_type @Access [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.2: G = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.3: Int32 = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type Access, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.k: i32, .l: i32} [template] // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %H: type = fn_type @H [template] -// CHECK:STDOUT: %struct.4: H = struct_value () [template] -// CHECK:STDOUT: %I: type = fn_type @I [template] -// CHECK:STDOUT: %struct.5: I = struct_value () [template] +// CHECK:STDOUT: %H.type: type = fn_type @H [template] +// CHECK:STDOUT: %H: = struct_value () [template] +// CHECK:STDOUT: %I.type: type = fn_type @I [template] +// CHECK:STDOUT: %I: = struct_value () [template] // CHECK:STDOUT: %.4: type = struct_type {} [template] // CHECK:STDOUT: %Abstract: type = class_type @Abstract [template] -// CHECK:STDOUT: %J: type = fn_type @J [template] -// CHECK:STDOUT: %struct.6: J = struct_value () [template] -// CHECK:STDOUT: %K: type = fn_type @K [template] -// CHECK:STDOUT: %struct.7: K = struct_value () [template] -// CHECK:STDOUT: %L: type = fn_type @L [template] -// CHECK:STDOUT: %struct.8: L = struct_value () [template] +// CHECK:STDOUT: %J.type: type = fn_type @J [template] +// CHECK:STDOUT: %J: = struct_value () [template] +// CHECK:STDOUT: %K.type: type = fn_type @K [template] +// CHECK:STDOUT: %K: = struct_value () [template] +// CHECK:STDOUT: %L.type: type = fn_type @L [template] +// CHECK:STDOUT: %L: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -91,20 +91,20 @@ abstract class Abstract { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Access.decl: type = class_decl @Access [template = constants.%Access] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} // CHECK:STDOUT: %Abstract.decl: type = class_decl @Abstract [template = constants.%Abstract] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Access { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] {} -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.2] {} -// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%struct.3() [template = i32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} +// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_18.1: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_18.2: type = converted %int.make_type_32.loc17, %.loc17_18.1 [template = i32] // CHECK:STDOUT: %.loc17_16: = field_decl k, element0 [template] -// CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%struct.3() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_20.1: type = value_of_initializer %int.make_type_32.loc19 [template = i32] // CHECK:STDOUT: %.loc19_20.2: type = converted %int.make_type_32.loc19, %.loc19_20.1 [template = i32] // CHECK:STDOUT: %.loc19_18: = field_decl l, element1 [template] @@ -118,8 +118,8 @@ abstract class Abstract { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %H.decl: H = fn_decl @H [template = constants.%struct.4] {} -// CHECK:STDOUT: %I.decl: I = fn_decl @I [template = constants.%struct.5] {} +// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] {} +// CHECK:STDOUT: %I.decl: = fn_decl @I [template = constants.%I] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -128,9 +128,9 @@ abstract class Abstract { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Abstract { -// CHECK:STDOUT: %J.decl: J = fn_decl @J [template = constants.%struct.6] {} -// CHECK:STDOUT: %K.decl: K = fn_decl @K [template = constants.%struct.7] {} -// CHECK:STDOUT: %L.decl: L = fn_decl @L [template = constants.%struct.8] {} +// CHECK:STDOUT: %J.decl: = fn_decl @J [template = constants.%J] {} +// CHECK:STDOUT: %K.decl: = fn_decl @K [template = constants.%K] {} +// CHECK:STDOUT: %L.decl: = fn_decl @L [template = constants.%L] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Abstract diff --git a/toolchain/check/testdata/class/fail_unbound_field.carbon b/toolchain/check/testdata/class/fail_unbound_field.carbon index 1a68a95e8597..cb372f492de9 100644 --- a/toolchain/check/testdata/class/fail_unbound_field.carbon +++ b/toolchain/check/testdata/class/fail_unbound_field.carbon @@ -30,15 +30,15 @@ fn G() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type Class, i32 [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.3: type = struct_type {.field: i32} [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -49,11 +49,11 @@ fn G() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc22_11.2: type = converted %int.make_type_32, %.loc22_11.1 [template = i32] // CHECK:STDOUT: @G.%return: ref i32 = var @@ -61,12 +61,12 @@ fn G() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_14.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_14.2: type = converted %int.make_type_32.loc12, %.loc12_14.1 [template = i32] // CHECK:STDOUT: %.loc12_12: = field_decl field, element0 [template] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_13.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_13.2: type = converted %int.make_type_32.loc13, %.loc13_13.1 [template = i32] // CHECK:STDOUT: %return.var: ref i32 = var diff --git a/toolchain/check/testdata/class/fail_unknown_member.carbon b/toolchain/check/testdata/class/fail_unknown_member.carbon index 42def61ad49f..257af3ad9ad0 100644 --- a/toolchain/check/testdata/class/fail_unknown_member.carbon +++ b/toolchain/check/testdata/class/fail_unknown_member.carbon @@ -24,13 +24,13 @@ fn G(c: Class) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type Class, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.n: i32} [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.2: G = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.4: type = ptr_type {.n: i32} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -42,13 +42,13 @@ fn G(c: Class) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Class.ref: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %c.loc15_6.1: Class = param c // CHECK:STDOUT: @G.%c: Class = bind_name c, %c.loc15_6.1 -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_19.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc15_19.2: type = converted %int.make_type_32, %.loc15_19.1 [template = i32] // CHECK:STDOUT: @G.%return: ref i32 = var @@ -56,7 +56,7 @@ fn G(c: Class) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %.loc12_8: = field_decl n, element0 [template] diff --git a/toolchain/check/testdata/class/field_access.carbon b/toolchain/check/testdata/class/field_access.carbon index f0187dbf6a8d..6f160eb61ff7 100644 --- a/toolchain/check/testdata/class/field_access.carbon +++ b/toolchain/check/testdata/class/field_access.carbon @@ -25,13 +25,13 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type Class, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.j: i32, .k: i32} [template] -// CHECK:STDOUT: %Run: type = fn_type @Run [template] -// CHECK:STDOUT: %struct.2: Run = struct_value () [template] +// CHECK:STDOUT: %Run.type: type = fn_type @Run [template] +// CHECK:STDOUT: %Run: = struct_value () [template] // CHECK:STDOUT: %.4: type = ptr_type {.j: i32, .k: i32} [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] @@ -45,19 +45,19 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Run.decl: Run = fn_decl @Run [template = constants.%struct.2] {} -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %.loc12_8: = field_decl j, element0 [template] -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] // CHECK:STDOUT: %.loc13_8: = field_decl k, element1 [template] @@ -85,7 +85,7 @@ fn Run() { // CHECK:STDOUT: %.loc19_4: ref i32 = class_element_access %c.ref.loc19, element1 // CHECK:STDOUT: %.loc19_9: i32 = int_literal 2 [template = constants.%.6] // CHECK:STDOUT: assign %.loc19_4, %.loc19_9 -// CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc20_11.1: type = value_of_initializer %int.make_type_32.loc20 [template = i32] // CHECK:STDOUT: %.loc20_11.2: type = converted %int.make_type_32.loc20, %.loc20_11.1 [template = i32] // CHECK:STDOUT: %cj.var: ref i32 = var cj @@ -95,7 +95,7 @@ fn Run() { // CHECK:STDOUT: %.loc20_18.1: ref i32 = class_element_access %c.ref.loc20, element0 // CHECK:STDOUT: %.loc20_18.2: i32 = bind_value %.loc20_18.1 // CHECK:STDOUT: assign %cj.var, %.loc20_18.2 -// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_11.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_11.2: type = converted %int.make_type_32.loc21, %.loc21_11.1 [template = i32] // CHECK:STDOUT: %ck.var: ref i32 = var ck diff --git a/toolchain/check/testdata/class/field_access_in_value.carbon b/toolchain/check/testdata/class/field_access_in_value.carbon index 6edc846f6ffc..262f616b23e4 100644 --- a/toolchain/check/testdata/class/field_access_in_value.carbon +++ b/toolchain/check/testdata/class/field_access_in_value.carbon @@ -26,13 +26,13 @@ fn Test() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type Class, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.j: i32, .k: i32} [template] -// CHECK:STDOUT: %Test: type = fn_type @Test [template] -// CHECK:STDOUT: %struct.2: Test = struct_value () [template] +// CHECK:STDOUT: %Test.type: type = fn_type @Test [template] +// CHECK:STDOUT: %Test: = struct_value () [template] // CHECK:STDOUT: %.4: type = ptr_type {.j: i32, .k: i32} [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] @@ -46,19 +46,19 @@ fn Test() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Test.decl: Test = fn_decl @Test [template = constants.%struct.2] {} -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Test.decl: = fn_decl @Test [template = constants.%Test] {} +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %.loc12_8: = field_decl j, element0 [template] -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] // CHECK:STDOUT: %.loc13_8: = field_decl k, element1 [template] @@ -90,7 +90,7 @@ fn Test() { // CHECK:STDOUT: %cv.ref.loc20: ref Class = name_ref cv, %cv // CHECK:STDOUT: %.loc20: Class = bind_value %cv.ref.loc20 // CHECK:STDOUT: %c: Class = bind_name c, %.loc20 -// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_11.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_11.2: type = converted %int.make_type_32.loc21, %.loc21_11.1 [template = i32] // CHECK:STDOUT: %cj.var: ref i32 = var cj @@ -100,7 +100,7 @@ fn Test() { // CHECK:STDOUT: %.loc21_18.1: ref i32 = class_element_access %c.ref.loc21, element0 // CHECK:STDOUT: %.loc21_18.2: i32 = bind_value %.loc21_18.1 // CHECK:STDOUT: assign %cj.var, %.loc21_18.2 -// CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_11.1: type = value_of_initializer %int.make_type_32.loc22 [template = i32] // CHECK:STDOUT: %.loc22_11.2: type = converted %int.make_type_32.loc22, %.loc22_11.1 [template = i32] // CHECK:STDOUT: %ck.var: ref i32 = var ck diff --git a/toolchain/check/testdata/class/forward_declared.carbon b/toolchain/check/testdata/class/forward_declared.carbon index e61b688696ed..5eeae3655357 100644 --- a/toolchain/check/testdata/class/forward_declared.carbon +++ b/toolchain/check/testdata/class/forward_declared.carbon @@ -17,9 +17,9 @@ fn F(p: Class*) -> Class* { return p; } // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // CHECK:STDOUT: %.1: type = ptr_type Class [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -30,7 +30,7 @@ fn F(p: Class*) -> Class* { return p; } // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Class.ref.loc13_9: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc13_14: type = ptr_type Class [template = constants.%.1] // CHECK:STDOUT: %p.loc13_6.1: Class* = param p diff --git a/toolchain/check/testdata/class/generic.carbon b/toolchain/check/testdata/class/generic.carbon index ac9bb0852854..a6a0d189c04d 100644 --- a/toolchain/check/testdata/class/generic.carbon +++ b/toolchain/check/testdata/class/generic.carbon @@ -13,9 +13,9 @@ class C[](); // CHECK:STDOUT: --- generic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %C.1: type = generic_class_type @C [template] +// CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %C.1: = struct_value () [template] // CHECK:STDOUT: %C.2: type = class_type @C [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -25,7 +25,7 @@ class C[](); // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %C.decl: C = class_decl @C [template = constants.%struct] {} +// CHECK:STDOUT: %C.decl: = class_decl @C [template = constants.%C.1] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C; diff --git a/toolchain/check/testdata/class/generic/basic.carbon b/toolchain/check/testdata/class/generic/basic.carbon index b851419718e3..d0aad854bf5a 100644 --- a/toolchain/check/testdata/class/generic/basic.carbon +++ b/toolchain/check/testdata/class/generic/basic.carbon @@ -26,16 +26,16 @@ class Class(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %Class.1: type = generic_class_type @Class [template] +// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Class = struct_value () [template] +// CHECK:STDOUT: %Class.1: = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class [template] // CHECK:STDOUT: %.2: type = ptr_type Class [template] // CHECK:STDOUT: %.3: type = ptr_type T [symbolic] -// CHECK:STDOUT: %GetAddr: type = fn_type @GetAddr [template] -// CHECK:STDOUT: %struct.2: GetAddr = struct_value () [template] -// CHECK:STDOUT: %GetValue: type = fn_type @GetValue [template] -// CHECK:STDOUT: %struct.3: GetValue = struct_value () [template] +// CHECK:STDOUT: %GetAddr.type: type = fn_type @GetAddr [template] +// CHECK:STDOUT: %GetAddr: = struct_value () [template] +// CHECK:STDOUT: %GetValue.type: type = fn_type @GetValue [template] +// CHECK:STDOUT: %GetValue: = struct_value () [template] // CHECK:STDOUT: %.4: type = unbound_element_type Class, T [symbolic] // CHECK:STDOUT: %.5: type = struct_type {.k: T} [symbolic] // CHECK:STDOUT: %.6: type = ptr_type {.k: T} [symbolic] @@ -47,14 +47,14 @@ class Class(T:! type) { // CHECK:STDOUT: .Class = %Class.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Class.decl: Class = class_decl @Class [template = constants.%struct.1] { +// CHECK:STDOUT: %Class.decl: = class_decl @Class [template = constants.%Class.1] { // CHECK:STDOUT: %T.loc11_13.1: type = param T // CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = constants.%T] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %GetAddr.decl: GetAddr = fn_decl @GetAddr [template = constants.%struct.2] { +// CHECK:STDOUT: %GetAddr.decl: = fn_decl @GetAddr [template = constants.%GetAddr] { // CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, constants.%Class.2 [template = constants.%Class.2] // CHECK:STDOUT: %.loc12_29: type = ptr_type Class [template = constants.%.2] // CHECK:STDOUT: %self.loc12_19.1: Class* = param self @@ -64,7 +64,7 @@ class Class(T:! type) { // CHECK:STDOUT: %.loc12_38: type = ptr_type T [symbolic = constants.%.3] // CHECK:STDOUT: %return.var.loc12: ref T* = var // CHECK:STDOUT: } -// CHECK:STDOUT: %GetValue.decl: GetValue = fn_decl @GetValue [template = constants.%struct.3] { +// CHECK:STDOUT: %GetValue.decl: = fn_decl @GetValue [template = constants.%GetValue] { // CHECK:STDOUT: %Self.ref.loc17: type = name_ref Self, constants.%Class.2 [template = constants.%Class.2] // CHECK:STDOUT: %self.loc17_15.1: Class = param self // CHECK:STDOUT: %self.loc17_15.2: Class = bind_name self, %self.loc17_15.1 diff --git a/toolchain/check/testdata/class/generic/call.carbon b/toolchain/check/testdata/class/generic/call.carbon index 7a71f602f0e1..3ab067c68c65 100644 --- a/toolchain/check/testdata/class/generic/call.carbon +++ b/toolchain/check/testdata/class/generic/call.carbon @@ -67,12 +67,12 @@ var a: Class(5, i32*); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %N: i32 = bind_symbolic_name N 1 [symbolic] -// CHECK:STDOUT: %Class.1: type = generic_class_type @Class [template] -// CHECK:STDOUT: %struct.2: Class = struct_value () [template] +// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] +// CHECK:STDOUT: %Class.1: = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %.3: type = ptr_type i32 [template] @@ -91,19 +91,19 @@ var a: Class(5, i32*); // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Class.decl: Class = class_decl @Class [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Class.decl: = class_decl @Class [template = constants.%Class.1] { // CHECK:STDOUT: %T.loc4_13.1: type = param T // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = constants.%T] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4, %.loc4_27.1 [template = i32] // CHECK:STDOUT: %N.loc4_23.1: i32 = param N // CHECK:STDOUT: %N.loc4_23.2: i32 = bind_symbolic_name N 1, %N.loc4_23.1 [symbolic = constants.%N] // CHECK:STDOUT: } -// CHECK:STDOUT: %Class.ref.loc6: Class = name_ref Class, %Class.decl [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %Class.ref.loc6: = name_ref Class, %Class.decl [template = constants.%Class.1] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_17.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_17.2: type = converted %int.make_type_32.loc6, %.loc6_17.1 [template = i32] // CHECK:STDOUT: %.loc6_17.3: type = ptr_type i32 [template = constants.%.3] @@ -111,7 +111,7 @@ var a: Class(5, i32*); // CHECK:STDOUT: %Class.loc6: type = class_type @Class, (%.loc6_17.3, %.loc6_20) [template = constants.%Class.3] // CHECK:STDOUT: %a.var: ref Class = var a // CHECK:STDOUT: %a: ref Class = bind_name a, %a.var -// CHECK:STDOUT: %Class.ref.loc9: Class = name_ref Class, %Class.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Class.ref.loc9: = name_ref Class, %Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %.loc9_15: () = tuple_literal () // CHECK:STDOUT: %.loc9_18: i32 = int_literal 0 [template = constants.%.6] // CHECK:STDOUT: %.loc9_13: type = converted %.loc9_15, constants.%.1 [template = constants.%.1] @@ -131,12 +131,12 @@ var a: Class(5, i32*); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %N: i32 = bind_symbolic_name N 1 [symbolic] -// CHECK:STDOUT: %Class.1: type = generic_class_type @Class [template] -// CHECK:STDOUT: %struct.2: Class = struct_value () [template] +// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] +// CHECK:STDOUT: %Class.1: = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %.3: type = ptr_type i32 [template] @@ -150,19 +150,19 @@ var a: Class(5, i32*); // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Class.decl: Class = class_decl @Class [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Class.decl: = class_decl @Class [template = constants.%Class.1] { // CHECK:STDOUT: %T.loc4_13.1: type = param T // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = constants.%T] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4, %.loc4_27.1 [template = i32] // CHECK:STDOUT: %N.loc4_23.1: i32 = param N // CHECK:STDOUT: %N.loc4_23.2: i32 = bind_symbolic_name N 1, %N.loc4_23.1 [symbolic = constants.%N] // CHECK:STDOUT: } -// CHECK:STDOUT: %Class.ref: Class = name_ref Class, %Class.decl [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %Class.ref: = name_ref Class, %Class.decl [template = constants.%Class.1] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_17.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_17.2: type = converted %int.make_type_32.loc13, %.loc13_17.1 [template = i32] // CHECK:STDOUT: %.loc13_17.3: type = ptr_type i32 [template = constants.%.3] @@ -182,12 +182,12 @@ var a: Class(5, i32*); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %N: i32 = bind_symbolic_name N 1 [symbolic] -// CHECK:STDOUT: %Class.1: type = generic_class_type @Class [template] -// CHECK:STDOUT: %struct.2: Class = struct_value () [template] +// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] +// CHECK:STDOUT: %Class.1: = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %.3: type = ptr_type i32 [template] @@ -203,19 +203,19 @@ var a: Class(5, i32*); // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Class.decl: Class = class_decl @Class [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Class.decl: = class_decl @Class [template = constants.%Class.1] { // CHECK:STDOUT: %T.loc4_13.1: type = param T // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = constants.%T] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4, %.loc4_27.1 [template = i32] // CHECK:STDOUT: %N.loc4_23.1: i32 = param N // CHECK:STDOUT: %N.loc4_23.2: i32 = bind_symbolic_name N 1, %N.loc4_23.1 [symbolic = constants.%N] // CHECK:STDOUT: } -// CHECK:STDOUT: %Class.ref: Class = name_ref Class, %Class.decl [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %Class.ref: = name_ref Class, %Class.decl [template = constants.%Class.1] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_17.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_17.2: type = converted %int.make_type_32.loc13, %.loc13_17.1 [template = i32] // CHECK:STDOUT: %.loc13_17.3: type = ptr_type i32 [template = constants.%.3] @@ -237,12 +237,12 @@ var a: Class(5, i32*); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %N: i32 = bind_symbolic_name N 1 [symbolic] -// CHECK:STDOUT: %Class.1: type = generic_class_type @Class [template] -// CHECK:STDOUT: %struct.2: Class = struct_value () [template] +// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] +// CHECK:STDOUT: %Class.1: = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %.3: i32 = int_literal 5 [template] @@ -257,20 +257,20 @@ var a: Class(5, i32*); // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Class.decl: Class = class_decl @Class [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Class.decl: = class_decl @Class [template = constants.%Class.1] { // CHECK:STDOUT: %T.loc4_13.1: type = param T // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = constants.%T] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4, %.loc4_27.1 [template = i32] // CHECK:STDOUT: %N.loc4_23.1: i32 = param N // CHECK:STDOUT: %N.loc4_23.2: i32 = bind_symbolic_name N 1, %N.loc4_23.1 [symbolic = constants.%N] // CHECK:STDOUT: } -// CHECK:STDOUT: %Class.ref: Class = name_ref Class, %Class.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Class.ref: = name_ref Class, %Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %.loc12_14: i32 = int_literal 5 [template = constants.%.3] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_20.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_20.2: type = converted %int.make_type_32.loc12, %.loc12_20.1 [template = i32] // CHECK:STDOUT: %.loc12_20.3: type = ptr_type i32 [template = constants.%.4] diff --git a/toolchain/check/testdata/class/generic/fail_todo_use.carbon b/toolchain/check/testdata/class/generic/fail_todo_use.carbon index be4f3c0f4d3e..e8092a3d14f0 100644 --- a/toolchain/check/testdata/class/generic/fail_todo_use.carbon +++ b/toolchain/check/testdata/class/generic/fail_todo_use.carbon @@ -40,21 +40,21 @@ fn Run() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %Class.1: type = generic_class_type @Class [template] +// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Class = struct_value () [template] +// CHECK:STDOUT: %Class.1: = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class [template] // CHECK:STDOUT: %.2: type = ptr_type Class [template] // CHECK:STDOUT: %.3: type = ptr_type T [symbolic] -// CHECK:STDOUT: %Get: type = fn_type @Get [template] -// CHECK:STDOUT: %struct.2: Get = struct_value () [template] +// CHECK:STDOUT: %Get.type: type = fn_type @Get [template] +// CHECK:STDOUT: %Get: = struct_value () [template] // CHECK:STDOUT: %.4: type = unbound_element_type Class, T [symbolic] // CHECK:STDOUT: %.5: type = struct_type {.k: T} [symbolic] // CHECK:STDOUT: %.6: type = ptr_type {.k: T} [symbolic] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.3: Int32 = struct_value () [template] -// CHECK:STDOUT: %Run: type = fn_type @Run [template] -// CHECK:STDOUT: %struct.4: Run = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Run.type: type = fn_type @Run [template] +// CHECK:STDOUT: %Run: = struct_value () [template] // CHECK:STDOUT: %Class.3: type = class_type @Class, (@Run.%.loc25_15.2) [template] // CHECK:STDOUT: %.7: i32 = int_literal 0 [template] // CHECK:STDOUT: %.8: type = struct_type {.k: i32} [template] @@ -68,22 +68,22 @@ fn Run() -> i32 { // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Class.decl: Class = class_decl @Class [template = constants.%struct.1] { +// CHECK:STDOUT: %Class.decl: = class_decl @Class [template = constants.%Class.1] { // CHECK:STDOUT: %T.loc11_13.1: type = param T // CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %Run.decl: Run = fn_decl @Run [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.3() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc20_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc20_13.2: type = converted %int.make_type_32, %.loc20_13.1 [template = i32] // CHECK:STDOUT: @Run.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %Get.decl: Get = fn_decl @Get [template = constants.%struct.2] { +// CHECK:STDOUT: %Get.decl: = fn_decl @Get [template = constants.%Get] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class.2 [template = constants.%Class.2] // CHECK:STDOUT: %.loc12_25: type = ptr_type Class [template = constants.%.2] // CHECK:STDOUT: %self.loc12_15.1: Class* = param self @@ -116,8 +116,8 @@ fn Run() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Class.ref: Class = name_ref Class, file.%Class.decl [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.3() [template = i32] +// CHECK:STDOUT: %Class.ref: = name_ref Class, file.%Class.decl [template = constants.%Class.1] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc25_15.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc25_15.2: type = converted %int.make_type_32, %.loc25_15.1 [template = i32] // CHECK:STDOUT: %Class: type = class_type @Class, (%.loc25_15.2) [template = constants.%Class.3] @@ -127,7 +127,7 @@ fn Run() -> i32 { // CHECK:STDOUT: %.loc25_30: {.k: i32} = struct_literal (%.loc25_29) // CHECK:STDOUT: assign %v.var, // CHECK:STDOUT: %v.ref: ref Class = name_ref v, %v -// CHECK:STDOUT: %Get.ref: Get = name_ref Get, @Class.%Get.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Get.ref: = name_ref Get, @Class.%Get.decl [template = constants.%Get] // CHECK:STDOUT: %.loc36_11: = bound_method %v.ref, %Get.ref // CHECK:STDOUT: %.loc36_10: Class* = addr_of %v.ref // CHECK:STDOUT: %Get.call: init T* = call %.loc36_11() [template = ] diff --git a/toolchain/check/testdata/class/generic/import.carbon b/toolchain/check/testdata/class/generic/import.carbon index 1d05e94421b7..afc8d0be02c7 100644 --- a/toolchain/check/testdata/class/generic/import.carbon +++ b/toolchain/check/testdata/class/generic/import.carbon @@ -42,9 +42,9 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %Class.1: type = generic_class_type @Class [template] +// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Class = struct_value () [template] +// CHECK:STDOUT: %Class.1: = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -54,7 +54,7 @@ class Class(U:! type) { // CHECK:STDOUT: .Class = %Class.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Class.decl: Class = class_decl @Class [template = constants.%struct] { +// CHECK:STDOUT: %Class.decl: = class_decl @Class [template = constants.%Class.1] { // CHECK:STDOUT: %T.loc4_13.1: type = param T // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = constants.%T] // CHECK:STDOUT: } @@ -66,10 +66,10 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0, [symbolic] -// CHECK:STDOUT: %Class: type = generic_class_type @Class [template] +// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Class = struct_value () [template] -// CHECK:STDOUT: %struct.2: type = struct_value () [template] +// CHECK:STDOUT: %Class: = struct_value () [template] +// CHECK:STDOUT: %struct: type = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type , T [symbolic] // CHECK:STDOUT: %.3: type = struct_type {.x: T} [symbolic] // CHECK:STDOUT: } @@ -79,9 +79,9 @@ class Class(U:! type) { // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: .Class = %Class.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: Class = import_ref ir0, inst+5, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref: = import_ref ir0, inst+5, loaded [template = constants.%Class] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%struct.2] { +// CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%struct] { // CHECK:STDOUT: %T.loc4_13.1: type = param T // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = constants.%T] // CHECK:STDOUT: } @@ -92,7 +92,7 @@ class Class(U:! type) { // CHECK:STDOUT: %.loc5: > = field_decl x, element0 [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%struct.1 +// CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .x = %.loc5 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -100,12 +100,12 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %U: type = bind_symbolic_name U 0 [symbolic] -// CHECK:STDOUT: %Class: type = generic_class_type @Class [template] +// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Class = struct_value () [template] +// CHECK:STDOUT: %Class: = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T 0, [symbolic] -// CHECK:STDOUT: %.2: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %struct.2: = struct_value () [template] +// CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] +// CHECK:STDOUT: %.2: > = struct_value () [template] // CHECK:STDOUT: %.3: type = class_type @.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -114,9 +114,9 @@ class Class(U:! type) { // CHECK:STDOUT: .Class = %import_ref // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: Class = import_ref ir0, inst+5, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref: = import_ref ir0, inst+5, loaded [template = constants.%Class] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.decl: = class_decl @.1 [template = constants.%struct.2] { +// CHECK:STDOUT: %.decl: > = class_decl @.1 [template = constants.%.2] { // CHECK:STDOUT: %U.loc9_13.1: type = param U // CHECK:STDOUT: %U.loc9_13.2: type = bind_symbolic_name U 0, %U.loc9_13.1 [symbolic = constants.%U] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/member_inline.carbon b/toolchain/check/testdata/class/generic/member_inline.carbon index c8ebd81ab42f..6627e647e846 100644 --- a/toolchain/check/testdata/class/generic/member_inline.carbon +++ b/toolchain/check/testdata/class/generic/member_inline.carbon @@ -18,12 +18,12 @@ class Class(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %Class.1: type = generic_class_type @Class [template] +// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Class = struct_value () [template] +// CHECK:STDOUT: %Class.1: = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -33,14 +33,14 @@ class Class(T:! type) { // CHECK:STDOUT: .Class = %Class.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Class.decl: Class = class_decl @Class [template = constants.%struct.1] { +// CHECK:STDOUT: %Class.decl: = class_decl @Class [template = constants.%Class.1] { // CHECK:STDOUT: %T.loc11_13.1: type = param T // CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = constants.%T] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.ref.loc12_11: type = name_ref T, file.%T.loc11_13.2 [symbolic = constants.%T] // CHECK:STDOUT: %n.loc12_8.1: T = param n // CHECK:STDOUT: %n.loc12_8.2: T = bind_name n, %n.loc12_8.1 diff --git a/toolchain/check/testdata/class/generic/member_out_of_line.carbon b/toolchain/check/testdata/class/generic/member_out_of_line.carbon index 4a7e92126474..ba05f01d51f5 100644 --- a/toolchain/check/testdata/class/generic/member_out_of_line.carbon +++ b/toolchain/check/testdata/class/generic/member_out_of_line.carbon @@ -103,12 +103,12 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %Class.1: type = generic_class_type @Class [template] +// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Class = struct_value () [template] +// CHECK:STDOUT: %Class.1: = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -118,11 +118,11 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: .Class = %Class.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Class.decl: Class = class_decl @Class [template = constants.%struct.1] { +// CHECK:STDOUT: %Class.decl: = class_decl @Class [template = constants.%Class.1] { // CHECK:STDOUT: %T.loc4_13.1: type = param T // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc8_10.1: type = param T // CHECK:STDOUT: %T.loc8_10.2: type = bind_symbolic_name T 0, %T.loc8_10.1 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref.loc8_25: type = name_ref T, %T.loc8_10.2 [symbolic = constants.%T] @@ -134,7 +134,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.ref.loc5_11: type = name_ref T, file.%T.loc4_13.2 [symbolic = constants.%T] // CHECK:STDOUT: %n.loc5_8.1: T = param n // CHECK:STDOUT: %n.loc5_8.2: T = bind_name n, %n.loc5_8.1 @@ -157,16 +157,16 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %A.1: type = generic_class_type @A [template] +// CHECK:STDOUT: %A.type: type = generic_class_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: A = struct_value () [template] +// CHECK:STDOUT: %A.1: = struct_value () [template] // CHECK:STDOUT: %A.2: type = class_type @A [template] // CHECK:STDOUT: %N: T = bind_symbolic_name N 1 [symbolic] -// CHECK:STDOUT: %B.1: type = generic_class_type @B [template] -// CHECK:STDOUT: %struct.2: B = struct_value () [template] +// CHECK:STDOUT: %B.type: type = generic_class_type @B [template] +// CHECK:STDOUT: %B.1: = struct_value () [template] // CHECK:STDOUT: %B.2: type = class_type @B [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.3: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] // CHECK:STDOUT: } @@ -177,11 +177,11 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: A = class_decl @A [template = constants.%struct.1] { +// CHECK:STDOUT: %A.decl: = class_decl @A [template = constants.%A.1] { // CHECK:STDOUT: %T.loc4_9.1: type = param T // CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T 0, %T.loc4_9.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.3] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc10_6.1: type = param T // CHECK:STDOUT: %T.loc10_6.2: type = bind_symbolic_name T 0, %T.loc10_6.1 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref.loc10_22: type = name_ref T, %T.loc10_6.2 [symbolic = constants.%T] @@ -197,7 +197,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %B.decl: B = class_decl @B [template = constants.%struct.2] { +// CHECK:STDOUT: %B.decl: = class_decl @B [template = constants.%B.1] { // CHECK:STDOUT: %T.ref: type = name_ref T, file.%T.loc4_9.2 [symbolic = constants.%T] // CHECK:STDOUT: %N.loc5_11.1: T = param N // CHECK:STDOUT: %N.loc5_11.2: T = bind_symbolic_name N 1, %N.loc5_11.1 [symbolic = constants.%N] @@ -209,7 +209,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.3] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B.2 [template = constants.%B.2] // CHECK:STDOUT: %self.loc6_10.1: B = param self // CHECK:STDOUT: %self.loc6_10.2: B = bind_name self, %self.loc6_10.1 @@ -232,13 +232,13 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %NotGeneric: type = class_type @NotGeneric [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %.3: type = fn_type @.1 [template] -// CHECK:STDOUT: %struct.2: = struct_value () [template] +// CHECK:STDOUT: %.type: type = fn_type @.1 [template] +// CHECK:STDOUT: %.3: > = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -248,14 +248,14 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %NotGeneric.decl: type = class_decl @NotGeneric [template = constants.%NotGeneric] {} -// CHECK:STDOUT: %.decl: = fn_decl @.1 [template = constants.%struct.2] { +// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %T.loc15_15.1: type = param T // CHECK:STDOUT: %T.loc15_15.2: type = bind_symbolic_name T 0, %T.loc15_15.1 [symbolic = constants.%T] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @NotGeneric { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%NotGeneric @@ -273,15 +273,15 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %Generic.1: type = generic_class_type @Generic [template] +// CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Generic = struct_value () [template] +// CHECK:STDOUT: %Generic.1: = struct_value () [template] // CHECK:STDOUT: %Generic.2: type = class_type @Generic [template] -// CHECK:STDOUT: %TooFew: type = fn_type @TooFew [template] -// CHECK:STDOUT: %struct.2: TooFew = struct_value () [template] +// CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] +// CHECK:STDOUT: %TooFew: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %.3: type = fn_type @.1 [template] -// CHECK:STDOUT: %struct.3: = struct_value () [template] +// CHECK:STDOUT: %.type: type = fn_type @.1 [template] +// CHECK:STDOUT: %.3: > = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -290,15 +290,15 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: .Generic = %Generic.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Generic.decl: Generic = class_decl @Generic [template = constants.%struct.1] { +// CHECK:STDOUT: %Generic.decl: = class_decl @Generic [template = constants.%Generic.1] { // CHECK:STDOUT: %T.loc4_15.1: type = param T // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T 0, %T.loc4_15.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: = fn_decl @.1 [template = constants.%struct.3] {} +// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.3] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Generic { -// CHECK:STDOUT: %TooFew.decl: TooFew = fn_decl @TooFew [template = constants.%struct.2] {} +// CHECK:STDOUT: %TooFew.decl: = fn_decl @TooFew [template = constants.%TooFew] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Generic.2 @@ -316,16 +316,16 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %Generic.1: type = generic_class_type @Generic [template] +// CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Generic = struct_value () [template] +// CHECK:STDOUT: %Generic.1: = struct_value () [template] // CHECK:STDOUT: %Generic.2: type = class_type @Generic [template] -// CHECK:STDOUT: %TooMany: type = fn_type @TooMany [template] -// CHECK:STDOUT: %struct.2: TooMany = struct_value () [template] +// CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] +// CHECK:STDOUT: %TooMany: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %U: type = bind_symbolic_name U 1 [symbolic] -// CHECK:STDOUT: %.3: type = fn_type @.1 [template] -// CHECK:STDOUT: %struct.3: = struct_value () [template] +// CHECK:STDOUT: %.type: type = fn_type @.1 [template] +// CHECK:STDOUT: %.3: > = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -334,11 +334,11 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: .Generic = %Generic.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Generic.decl: Generic = class_decl @Generic [template = constants.%struct.1] { +// CHECK:STDOUT: %Generic.decl: = class_decl @Generic [template = constants.%Generic.1] { // CHECK:STDOUT: %T.loc4_15.1: type = param T // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T 0, %T.loc4_15.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: = fn_decl @.1 [template = constants.%struct.3] { +// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %T.loc15_12.1: type = param T // CHECK:STDOUT: %T.loc15_12.2: type = bind_symbolic_name T 0, %T.loc15_12.1 [symbolic = constants.%T] // CHECK:STDOUT: %U.loc15_22.1: type = param U @@ -347,7 +347,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Generic { -// CHECK:STDOUT: %TooMany.decl: TooMany = fn_decl @TooMany [template = constants.%struct.2] {} +// CHECK:STDOUT: %TooMany.decl: = fn_decl @TooMany [template = constants.%TooMany] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Generic.2 @@ -365,16 +365,16 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %Generic.1: type = generic_class_type @Generic [template] +// CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Generic = struct_value () [template] +// CHECK:STDOUT: %Generic.1: = struct_value () [template] // CHECK:STDOUT: %Generic.2: type = class_type @Generic [template] -// CHECK:STDOUT: %WrongType: type = fn_type @WrongType [template] -// CHECK:STDOUT: %struct.2: WrongType = struct_value () [template] +// CHECK:STDOUT: %WrongType.type: type = fn_type @WrongType [template] +// CHECK:STDOUT: %WrongType: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %T.2: () = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %.3: type = fn_type @.1 [template] -// CHECK:STDOUT: %struct.3: = struct_value () [template] +// CHECK:STDOUT: %.type: type = fn_type @.1 [template] +// CHECK:STDOUT: %.3: > = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -383,11 +383,11 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: .Generic = %Generic.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Generic.decl: Generic = class_decl @Generic [template = constants.%struct.1] { +// CHECK:STDOUT: %Generic.decl: = class_decl @Generic [template = constants.%Generic.1] { // CHECK:STDOUT: %T.loc4_15.1: type = param T // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T 0, %T.loc4_15.1 [symbolic = constants.%T.1] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: = fn_decl @.1 [template = constants.%struct.3] { +// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %.loc14_17.1: () = tuple_literal () // CHECK:STDOUT: %.loc14_17.2: type = converted %.loc14_17.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %T.loc14_12.1: () = param T @@ -396,7 +396,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Generic { -// CHECK:STDOUT: %WrongType.decl: WrongType = fn_decl @WrongType [template = constants.%struct.2] {} +// CHECK:STDOUT: %WrongType.decl: = fn_decl @WrongType [template = constants.%WrongType] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Generic.2 diff --git a/toolchain/check/testdata/class/generic/redeclare.carbon b/toolchain/check/testdata/class/generic/redeclare.carbon index 60b3a30da403..75807e354f15 100644 --- a/toolchain/check/testdata/class/generic/redeclare.carbon +++ b/toolchain/check/testdata/class/generic/redeclare.carbon @@ -90,11 +90,11 @@ class E(U:! type) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %Generic.1: type = generic_class_type @Generic [template] +// CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Generic = struct_value () [template] +// CHECK:STDOUT: %Generic.1: = struct_value () [template] // CHECK:STDOUT: %Generic.2: type = class_type @Generic [template] -// CHECK:STDOUT: %struct.2: type = struct_value () [template] +// CHECK:STDOUT: %struct: type = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -104,11 +104,11 @@ class E(U:! type) {} // CHECK:STDOUT: .Generic = %Generic.decl.loc4 // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Generic.decl.loc4: Generic = class_decl @Generic [template = constants.%struct.1] { +// CHECK:STDOUT: %Generic.decl.loc4: = class_decl @Generic [template = constants.%Generic.1] { // CHECK:STDOUT: %T.loc4_15.1: type = param T // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T 0, %T.loc4_15.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %Generic.decl.loc6: type = class_decl @Generic [template = constants.%struct.2] { +// CHECK:STDOUT: %Generic.decl.loc6: type = class_decl @Generic [template = constants.%struct] { // CHECK:STDOUT: %T.loc6_15.1: type = param T // CHECK:STDOUT: %T.loc6_15.2: type = bind_symbolic_name T 0, %T.loc6_15.1 [symbolic = constants.%T] // CHECK:STDOUT: } @@ -124,9 +124,9 @@ class E(U:! type) {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %.1: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: = struct_value () [template] +// CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %.2: > = struct_value () [template] // CHECK:STDOUT: %.3: type = class_type @.1 [template] // CHECK:STDOUT: %.4: type = struct_type {} [template] // CHECK:STDOUT: } @@ -138,7 +138,7 @@ class E(U:! type) {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %.decl: = class_decl @.1 [template = constants.%struct] { +// CHECK:STDOUT: %.decl: > = class_decl @.1 [template = constants.%.2] { // CHECK:STDOUT: %T.loc12_9.1: type = param T // CHECK:STDOUT: %T.loc12_9.2: type = bind_symbolic_name T 0, %T.loc12_9.1 [symbolic = constants.%T] // CHECK:STDOUT: } @@ -154,17 +154,17 @@ class E(U:! type) {} // CHECK:STDOUT: --- fail_mismatch_implicit_param_list.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %N.1: i32 = bind_symbolic_name N 0 [symbolic] -// CHECK:STDOUT: %B.1: type = generic_class_type @B [template] -// CHECK:STDOUT: %struct.2: B = struct_value () [template] +// CHECK:STDOUT: %B.type: type = generic_class_type @B [template] +// CHECK:STDOUT: %B.1: = struct_value () [template] // CHECK:STDOUT: %B.2: type = class_type @B [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %N.2: T = bind_symbolic_name N 1 [symbolic] -// CHECK:STDOUT: %.2: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %struct.3: = struct_value () [template] +// CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] +// CHECK:STDOUT: %.2: > = struct_value () [template] // CHECK:STDOUT: %.3: type = class_type @.1 [template] // CHECK:STDOUT: %.4: type = struct_type {} [template] // CHECK:STDOUT: } @@ -175,15 +175,15 @@ class E(U:! type) {} // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %B.decl: B = class_decl @B [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl: = class_decl @B [template = constants.%B.1] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_13.2: type = converted %int.make_type_32, %.loc4_13.1 [template = i32] // CHECK:STDOUT: %N.loc4_9.1: i32 = param N // CHECK:STDOUT: %N.loc4_9.2: i32 = bind_symbolic_name N 0, %N.loc4_9.1 [symbolic = constants.%N.1] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: = class_decl @.1 [template = constants.%struct.3] { +// CHECK:STDOUT: %.decl: > = class_decl @.1 [template = constants.%.2] { // CHECK:STDOUT: %T.loc12_9.1: type = param T // CHECK:STDOUT: %T.loc12_9.2: type = bind_symbolic_name T 0, %T.loc12_9.1 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc12_9.2 [symbolic = constants.%T] @@ -205,15 +205,15 @@ class E(U:! type) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %C.1: type = generic_class_type @C [template] +// CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: C = struct_value () [template] +// CHECK:STDOUT: %C.1: = struct_value () [template] // CHECK:STDOUT: %C.2: type = class_type @C [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %U: i32 = bind_symbolic_name U 1 [symbolic] -// CHECK:STDOUT: %.2: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %struct.3: = struct_value () [template] +// CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] +// CHECK:STDOUT: %.2: > = struct_value () [template] // CHECK:STDOUT: %.3: type = class_type @.1 [template] // CHECK:STDOUT: %.4: type = struct_type {} [template] // CHECK:STDOUT: } @@ -224,15 +224,15 @@ class E(U:! type) {} // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %C.decl: C = class_decl @C [template = constants.%struct.1] { +// CHECK:STDOUT: %C.decl: = class_decl @C [template = constants.%C.1] { // CHECK:STDOUT: %T.loc4_9.1: type = param T // CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T 0, %T.loc4_9.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %.decl: = class_decl @.1 [template = constants.%struct.3] { +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %.decl: > = class_decl @.1 [template = constants.%.2] { // CHECK:STDOUT: %T.loc12_9.1: type = param T // CHECK:STDOUT: %T.loc12_9.2: type = bind_symbolic_name T 0, %T.loc12_9.1 [symbolic = constants.%T] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_23.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_23.2: type = converted %int.make_type_32, %.loc12_23.1 [template = i32] // CHECK:STDOUT: %U.loc12_19.1: i32 = param U @@ -253,15 +253,15 @@ class E(U:! type) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %D.1: type = generic_class_type @D [template] +// CHECK:STDOUT: %D.type: type = generic_class_type @D [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: D = struct_value () [template] +// CHECK:STDOUT: %D.1: = struct_value () [template] // CHECK:STDOUT: %D.2: type = class_type @D [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %T.2: i32 = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %.2: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %struct.3: = struct_value () [template] +// CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] +// CHECK:STDOUT: %.2: > = struct_value () [template] // CHECK:STDOUT: %.3: type = class_type @.1 [template] // CHECK:STDOUT: %.4: type = struct_type {} [template] // CHECK:STDOUT: } @@ -272,13 +272,13 @@ class E(U:! type) {} // CHECK:STDOUT: .D = %D.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %D.decl: D = class_decl @D [template = constants.%struct.1] { +// CHECK:STDOUT: %D.decl: = class_decl @D [template = constants.%D.1] { // CHECK:STDOUT: %T.loc4_9.1: type = param T // CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T 0, %T.loc4_9.1 [symbolic = constants.%T.1] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %.decl: = class_decl @.1 [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %.decl: > = class_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_32, %.loc12_13.1 [template = i32] // CHECK:STDOUT: %T.loc12_9.1: i32 = param T @@ -299,13 +299,13 @@ class E(U:! type) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %E.1: type = generic_class_type @E [template] +// CHECK:STDOUT: %E.type: type = generic_class_type @E [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: E = struct_value () [template] +// CHECK:STDOUT: %E.1: = struct_value () [template] // CHECK:STDOUT: %E.2: type = class_type @E [template] // CHECK:STDOUT: %U: type = bind_symbolic_name U 0 [symbolic] -// CHECK:STDOUT: %.2: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %struct.2: = struct_value () [template] +// CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] +// CHECK:STDOUT: %.2: > = struct_value () [template] // CHECK:STDOUT: %.3: type = class_type @.1 [template] // CHECK:STDOUT: %.4: type = struct_type {} [template] // CHECK:STDOUT: } @@ -316,11 +316,11 @@ class E(U:! type) {} // CHECK:STDOUT: .E = %E.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %E.decl: E = class_decl @E [template = constants.%struct.1] { +// CHECK:STDOUT: %E.decl: = class_decl @E [template = constants.%E.1] { // CHECK:STDOUT: %T.loc4_9.1: type = param T // CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T 0, %T.loc4_9.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: = class_decl @.1 [template = constants.%struct.2] { +// CHECK:STDOUT: %.decl: > = class_decl @.1 [template = constants.%.2] { // CHECK:STDOUT: %U.loc11_9.1: type = param U // CHECK:STDOUT: %U.loc11_9.2: type = bind_symbolic_name U 0, %U.loc11_9.1 [symbolic = constants.%U] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic_method.carbon b/toolchain/check/testdata/class/generic_method.carbon index deafa8123a27..c5f457107432 100644 --- a/toolchain/check/testdata/class/generic_method.carbon +++ b/toolchain/check/testdata/class/generic_method.carbon @@ -19,13 +19,13 @@ fn Class(T:! type).F[self: Self](n: T) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %Class.1: type = generic_class_type @Class [template] +// CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Class = struct_value () [template] +// CHECK:STDOUT: %Class.1: = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class [template] // CHECK:STDOUT: %.2: type = unbound_element_type Class, T [symbolic] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.3: type = struct_type {.a: T} [symbolic] // CHECK:STDOUT: %.4: type = ptr_type {.a: T} [symbolic] // CHECK:STDOUT: } @@ -36,11 +36,11 @@ fn Class(T:! type).F[self: Self](n: T) {} // CHECK:STDOUT: .Class = %Class.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Class.decl: Class = class_decl @Class [template = constants.%struct.1] { +// CHECK:STDOUT: %Class.decl: = class_decl @Class [template = constants.%Class.1] { // CHECK:STDOUT: %T.loc11_13.1: type = param T // CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc16_10.1: type = param T // CHECK:STDOUT: %T.loc16_10.2: type = bind_symbolic_name T 0, %T.loc16_10.1 [symbolic = constants.%T] // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class.2 [template = constants.%Class.2] @@ -55,7 +55,7 @@ fn Class(T:! type).F[self: Self](n: T) {} // CHECK:STDOUT: class @Class { // CHECK:STDOUT: %T.ref.loc12: type = name_ref T, file.%T.loc11_13.2 [symbolic = constants.%T] // CHECK:STDOUT: %.loc12: = field_decl a, element0 [template] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class.2 [template = constants.%Class.2] // CHECK:STDOUT: %self.loc13_8.1: Class = param self // CHECK:STDOUT: %self.loc13_8.2: Class = bind_name self, %self.loc13_8.1 diff --git a/toolchain/check/testdata/class/import.carbon b/toolchain/check/testdata/class/import.carbon index a0b51ae6e6cf..38dc1f78904a 100644 --- a/toolchain/check/testdata/class/import.carbon +++ b/toolchain/check/testdata/class/import.carbon @@ -55,17 +55,17 @@ fn Run() { // CHECK:STDOUT: %Empty: type = class_type @Empty [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %Field: type = class_type @Field [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.3: type = unbound_element_type Field, i32 [template] // CHECK:STDOUT: %.4: type = struct_type {.x: i32} [template] // CHECK:STDOUT: %ForwardDeclared: type = class_type @ForwardDeclared [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.5: type = ptr_type ForwardDeclared [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -80,7 +80,7 @@ fn Run() { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Empty.decl: type = class_decl @Empty [template = constants.%Empty] {} // CHECK:STDOUT: %Field.decl: type = class_decl @Field [template = constants.%Field] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %ForwardDeclared.decl.loc11: type = class_decl @ForwardDeclared [template = constants.%ForwardDeclared] {} // CHECK:STDOUT: %ForwardDeclared.decl.loc13: type = class_decl @ForwardDeclared [template = constants.%ForwardDeclared] {} // CHECK:STDOUT: %Incomplete.decl: type = class_decl @Incomplete [template = constants.%Incomplete] {} @@ -92,7 +92,7 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Field { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc8_10.2: type = converted %int.make_type_32, %.loc8_10.1 [template = i32] // CHECK:STDOUT: %.loc8_8: = field_decl x, element0 [template] @@ -103,12 +103,12 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @ForwardDeclared { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc14: type = name_ref Self, constants.%ForwardDeclared [template = constants.%ForwardDeclared] // CHECK:STDOUT: %self.loc14_8.1: ForwardDeclared = param self // CHECK:STDOUT: %self.loc14_8.2: ForwardDeclared = bind_name self, %self.loc14_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref.loc15: type = name_ref Self, constants.%ForwardDeclared [template = constants.%ForwardDeclared] // CHECK:STDOUT: %.loc15_23: type = ptr_type ForwardDeclared [template = constants.%.5] // CHECK:STDOUT: %self.loc15_13.1: ForwardDeclared* = param self @@ -133,28 +133,28 @@ fn Run() { // CHECK:STDOUT: --- b.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Run: type = fn_type @Run [template] +// CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Run = struct_value () [template] +// CHECK:STDOUT: %Run: = struct_value () [template] // CHECK:STDOUT: %Empty: type = class_type @Empty [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] -// CHECK:STDOUT: %struct.2: Empty = struct_value () [template] +// CHECK:STDOUT: %struct.1: Empty = struct_value () [template] // CHECK:STDOUT: %Field: type = class_type @Field [template] // CHECK:STDOUT: %.4: type = struct_type {.x: i32} [template] // CHECK:STDOUT: %.5: type = ptr_type {.x: i32} [template] // CHECK:STDOUT: %.6: i32 = int_literal 1 [template] -// CHECK:STDOUT: %struct.3: Field = struct_value (%.6) [template] +// CHECK:STDOUT: %struct.2: Field = struct_value (%.6) [template] // CHECK:STDOUT: %.7: type = unbound_element_type Field, i32 [template] // CHECK:STDOUT: %.8: i32 = int_literal 2 [template] // CHECK:STDOUT: %ForwardDeclared.1: type = class_type @ForwardDeclared.1 [template] -// CHECK:STDOUT: %struct.4: ForwardDeclared = struct_value () [template] +// CHECK:STDOUT: %struct.3: ForwardDeclared = struct_value () [template] // CHECK:STDOUT: %ForwardDeclared.2: type = class_type @ForwardDeclared.2 [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.5: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.9: type = ptr_type ForwardDeclared [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.6: G = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] // CHECK:STDOUT: %.10: type = ptr_type Incomplete [template] // CHECK:STDOUT: } @@ -173,13 +173,13 @@ fn Run() { // CHECK:STDOUT: %import_ref.3: type = import_ref ir1, inst+21, loaded [template = constants.%ForwardDeclared.1] // CHECK:STDOUT: %import_ref.4: type = import_ref ir1, inst+39, loaded [template = constants.%Incomplete] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Run.decl: Run = fn_decl @Run [template = constants.%struct.1] {} +// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} // CHECK:STDOUT: %import_ref.5 = import_ref ir1, inst+3, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref ir1, inst+6, unloaded // CHECK:STDOUT: %import_ref.7: = import_ref ir1, inst+17, loaded [template = imports.%.1] // CHECK:STDOUT: %import_ref.8 = import_ref ir1, inst+22, unloaded -// CHECK:STDOUT: %import_ref.9: G = import_ref ir1, inst+36, loaded [template = constants.%struct.6] -// CHECK:STDOUT: %import_ref.10: F = import_ref ir1, inst+27, loaded [template = constants.%struct.5] +// CHECK:STDOUT: %import_ref.9: = import_ref ir1, inst+36, loaded [template = constants.%G] +// CHECK:STDOUT: %import_ref.10: = import_ref ir1, inst+27, loaded [template = constants.%F] // CHECK:STDOUT: %import_ref.11 = import_ref ir1, inst+22, unloaded // CHECK:STDOUT: %import_ref.12 = import_ref ir1, inst+36, unloaded // CHECK:STDOUT: %import_ref.13 = import_ref ir1, inst+27, unloaded @@ -218,8 +218,8 @@ fn Run() { // CHECK:STDOUT: %a.var: ref Empty = var a // CHECK:STDOUT: %a: ref Empty = bind_name a, %a.var // CHECK:STDOUT: %.loc7_19.1: {} = struct_literal () -// CHECK:STDOUT: %.loc7_19.2: init Empty = class_init (), %a.var [template = constants.%struct.2] -// CHECK:STDOUT: %.loc7_20: init Empty = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc7_19.2: init Empty = class_init (), %a.var [template = constants.%struct.1] +// CHECK:STDOUT: %.loc7_20: init Empty = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%struct.1] // CHECK:STDOUT: assign %a.var, %.loc7_20 // CHECK:STDOUT: %Field.ref: type = name_ref Field, file.%import_ref.2 [template = constants.%Field] // CHECK:STDOUT: %b.var: ref Field = var b @@ -228,8 +228,8 @@ fn Run() { // CHECK:STDOUT: %.loc9_25.1: {.x: i32} = struct_literal (%.loc9_24) // CHECK:STDOUT: %.loc9_25.2: ref i32 = class_element_access %b.var, element0 // CHECK:STDOUT: %.loc9_25.3: init i32 = initialize_from %.loc9_24 to %.loc9_25.2 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_25.4: init Field = class_init (%.loc9_25.3), %b.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc9_26: init Field = converted %.loc9_25.1, %.loc9_25.4 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc9_25.4: init Field = class_init (%.loc9_25.3), %b.var [template = constants.%struct.2] +// CHECK:STDOUT: %.loc9_26: init Field = converted %.loc9_25.1, %.loc9_25.4 [template = constants.%struct.2] // CHECK:STDOUT: assign %b.var, %.loc9_26 // CHECK:STDOUT: %b.ref: ref Field = name_ref b, %b // CHECK:STDOUT: %x.ref: = name_ref x, file.%import_ref.7 [template = imports.%.1] @@ -240,16 +240,16 @@ fn Run() { // CHECK:STDOUT: %c.var: ref ForwardDeclared = var c // CHECK:STDOUT: %c: ref ForwardDeclared = bind_name c, %c.var // CHECK:STDOUT: %.loc12_29.1: {} = struct_literal () -// CHECK:STDOUT: %.loc12_29.2: init ForwardDeclared = class_init (), %c.var [template = constants.%struct.4] -// CHECK:STDOUT: %.loc12_30: init ForwardDeclared = converted %.loc12_29.1, %.loc12_29.2 [template = constants.%struct.4] +// CHECK:STDOUT: %.loc12_29.2: init ForwardDeclared = class_init (), %c.var [template = constants.%struct.3] +// CHECK:STDOUT: %.loc12_30: init ForwardDeclared = converted %.loc12_29.1, %.loc12_29.2 [template = constants.%struct.3] // CHECK:STDOUT: assign %c.var, %.loc12_30 // CHECK:STDOUT: %c.ref.loc13: ref ForwardDeclared = name_ref c, %c -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%import_ref.10 [template = constants.%struct.5] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref.10 [template = constants.%F] // CHECK:STDOUT: %.loc13_4: = bound_method %c.ref.loc13, %F.ref // CHECK:STDOUT: %.loc13_3: ForwardDeclared = bind_value %c.ref.loc13 // CHECK:STDOUT: %F.call: init () = call %.loc13_4(%.loc13_3) // CHECK:STDOUT: %c.ref.loc14: ref ForwardDeclared = name_ref c, %c -// CHECK:STDOUT: %G.ref: G = name_ref G, file.%import_ref.9 [template = constants.%struct.6] +// CHECK:STDOUT: %G.ref: = name_ref G, file.%import_ref.9 [template = constants.%G] // CHECK:STDOUT: %.loc14_4: = bound_method %c.ref.loc14, %G.ref // CHECK:STDOUT: %.loc14_3: ForwardDeclared* = addr_of %c.ref.loc14 // CHECK:STDOUT: %G.call: init () = call %.loc14_4(%.loc14_3) diff --git a/toolchain/check/testdata/class/import_base.carbon b/toolchain/check/testdata/class/import_base.carbon index 29468638c7b2..bde0a821f411 100644 --- a/toolchain/check/testdata/class/import_base.carbon +++ b/toolchain/check/testdata/class/import_base.carbon @@ -40,13 +40,13 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %Unused: type = fn_type @Unused [template] -// CHECK:STDOUT: %struct.2: Unused = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.3: Int32 = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %Unused.type: type = fn_type @Unused [template] +// CHECK:STDOUT: %Unused: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type Base, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.x: i32, .unused: i32} [template] // CHECK:STDOUT: %Child: type = class_type @Child [template] @@ -63,27 +63,27 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %Child.decl: type = class_decl @Child [template = constants.%Child] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc5: type = name_ref Self, constants.%Base [template = constants.%Base] // CHECK:STDOUT: %self.loc5_8.1: Base = param self // CHECK:STDOUT: %self.loc5_8.2: Base = bind_name self, %self.loc5_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %Unused.decl: Unused = fn_decl @Unused [template = constants.%struct.2] { +// CHECK:STDOUT: %Unused.decl: = fn_decl @Unused [template = constants.%Unused] { // CHECK:STDOUT: %Self.ref.loc6: type = name_ref Self, constants.%Base [template = constants.%Base] // CHECK:STDOUT: %self.loc6_13.1: Base = param self // CHECK:STDOUT: %self.loc6_13.2: Base = bind_name self, %self.loc6_13.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%struct.3() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_10.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_10.2: type = converted %int.make_type_32.loc8, %.loc8_10.1 [template = i32] // CHECK:STDOUT: %.loc8_8: = field_decl x, element0 [template] -// CHECK:STDOUT: %int.make_type_32.loc9: init type = call constants.%struct.3() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_15.1: type = value_of_initializer %int.make_type_32.loc9 [template = i32] // CHECK:STDOUT: %.loc9_15.2: type = converted %int.make_type_32.loc9, %.loc9_15.1 [template = i32] // CHECK:STDOUT: %.loc9_13: = field_decl unused, element1 [template] @@ -115,9 +115,9 @@ fn Run() { // CHECK:STDOUT: --- b.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Run: type = fn_type @Run [template] +// CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Run = struct_value () [template] +// CHECK:STDOUT: %Run: = struct_value () [template] // CHECK:STDOUT: %Child: type = class_type @Child [template] // CHECK:STDOUT: %Base: type = class_type @Base [template] // CHECK:STDOUT: %.2: type = struct_type {.x: i32, .unused: i32} [template] @@ -129,12 +129,12 @@ fn Run() { // CHECK:STDOUT: %.8: i32 = int_literal 0 [template] // CHECK:STDOUT: %.9: i32 = int_literal 1 [template] // CHECK:STDOUT: %.10: type = struct_type {.base: {.x: i32, .unused: i32}} [template] -// CHECK:STDOUT: %struct.2: Base = struct_value (%.8, %.9) [template] -// CHECK:STDOUT: %struct.3: Child = struct_value (%struct.2) [template] +// CHECK:STDOUT: %struct.1: Base = struct_value (%.8, %.9) [template] +// CHECK:STDOUT: %struct.2: Child = struct_value (%struct.1) [template] // CHECK:STDOUT: %.11: type = unbound_element_type Base, i32 [template] // CHECK:STDOUT: %.12: i32 = int_literal 2 [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.4: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -147,8 +147,8 @@ fn Run() { // CHECK:STDOUT: %import_ref.1 = import_ref ir1, inst+2, unloaded // CHECK:STDOUT: %import_ref.2: type = import_ref ir1, inst+37, loaded [template = constants.%Child] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Run.decl: Run = fn_decl @Run [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref.3: F = import_ref ir1, inst+7, loaded [template = constants.%struct.4] +// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} +// CHECK:STDOUT: %import_ref.3: = import_ref ir1, inst+7, loaded [template = constants.%F] // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+3, unloaded // CHECK:STDOUT: %import_ref.5: = import_ref ir1, inst+26, loaded [template = imports.%.1] // CHECK:STDOUT: %import_ref.6 = import_ref ir1, inst+14, unloaded @@ -187,10 +187,10 @@ fn Run() { // CHECK:STDOUT: %.loc7_47.3: init i32 = initialize_from %.loc7_33 to %.loc7_47.2 [template = constants.%.8] // CHECK:STDOUT: %.loc7_47.4: ref i32 = class_element_access %.loc7_48.2, element1 // CHECK:STDOUT: %.loc7_47.5: init i32 = initialize_from %.loc7_46 to %.loc7_47.4 [template = constants.%.9] -// CHECK:STDOUT: %.loc7_47.6: init Base = class_init (%.loc7_47.3, %.loc7_47.5), %.loc7_48.2 [template = constants.%struct.2] -// CHECK:STDOUT: %.loc7_48.3: init Base = converted %.loc7_47.1, %.loc7_47.6 [template = constants.%struct.2] -// CHECK:STDOUT: %.loc7_48.4: init Child = class_init (%.loc7_48.3), %a.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc7_49: init Child = converted %.loc7_48.1, %.loc7_48.4 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc7_47.6: init Base = class_init (%.loc7_47.3, %.loc7_47.5), %.loc7_48.2 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc7_48.3: init Base = converted %.loc7_47.1, %.loc7_47.6 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc7_48.4: init Child = class_init (%.loc7_48.3), %a.var [template = constants.%struct.2] +// CHECK:STDOUT: %.loc7_49: init Child = converted %.loc7_48.1, %.loc7_48.4 [template = constants.%struct.2] // CHECK:STDOUT: assign %a.var, %.loc7_49 // CHECK:STDOUT: %a.ref.loc8: ref Child = name_ref a, %a // CHECK:STDOUT: %x.ref: = name_ref x, file.%import_ref.5 [template = imports.%.1] @@ -200,7 +200,7 @@ fn Run() { // CHECK:STDOUT: %.loc8_9: i32 = int_literal 2 [template = constants.%.12] // CHECK:STDOUT: assign %.loc8_4.3, %.loc8_9 // CHECK:STDOUT: %a.ref.loc9: ref Child = name_ref a, %a -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%import_ref.3 [template = constants.%struct.4] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref.3 [template = constants.%F] // CHECK:STDOUT: %.loc9_4: = bound_method %a.ref.loc9, %F.ref // CHECK:STDOUT: %.loc9_6.1: ref Base = class_element_access %a.ref.loc9, element0 // CHECK:STDOUT: %.loc9_6.2: ref Base = converted %a.ref.loc9, %.loc9_6.1 diff --git a/toolchain/check/testdata/class/import_member_cycle.carbon b/toolchain/check/testdata/class/import_member_cycle.carbon index 9d769ee5cc5d..679a1d69bb28 100644 --- a/toolchain/check/testdata/class/import_member_cycle.carbon +++ b/toolchain/check/testdata/class/import_member_cycle.carbon @@ -57,9 +57,9 @@ fn Run() { // CHECK:STDOUT: --- b.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Run: type = fn_type @Run [template] +// CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Run = struct_value () [template] +// CHECK:STDOUT: %Run: = struct_value () [template] // CHECK:STDOUT: %Cycle: type = class_type @Cycle [template] // CHECK:STDOUT: %.2: type = ptr_type Cycle [template] // CHECK:STDOUT: %.3: type = struct_type {.a: Cycle*} [template] @@ -73,7 +73,7 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref ir1, inst+2, loaded [template = constants.%Cycle] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Run.decl: Run = fn_decl @Run [template = constants.%struct] {} +// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+8, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+3, unloaded // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/import_struct_cyle.carbon b/toolchain/check/testdata/class/import_struct_cyle.carbon index b3292a27d9ad..dd3a48157630 100644 --- a/toolchain/check/testdata/class/import_struct_cyle.carbon +++ b/toolchain/check/testdata/class/import_struct_cyle.carbon @@ -71,9 +71,9 @@ fn Run() { // CHECK:STDOUT: --- b.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Run: type = fn_type @Run [template] +// CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Run = struct_value () [template] +// CHECK:STDOUT: %Run: = struct_value () [template] // CHECK:STDOUT: %Cycle: type = class_type @Cycle [template] // CHECK:STDOUT: %.2: type = ptr_type Cycle [template] // CHECK:STDOUT: %.3: type = struct_type {.b: Cycle*} [template] @@ -92,7 +92,7 @@ fn Run() { // CHECK:STDOUT: %import_ref.1 = import_ref ir1, inst+2, unloaded // CHECK:STDOUT: %import_ref.2: ref {.b: Cycle*} = import_ref ir1, inst+12, loaded // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Run.decl: Run = fn_decl @Run [template = constants.%struct] {} +// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+3, unloaded // CHECK:STDOUT: %import_ref.4: = import_ref ir1, inst+19, loaded [template = imports.%.1] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/init.carbon b/toolchain/check/testdata/class/init.carbon index dfbebbd9c8c8..bfb934c1aea0 100644 --- a/toolchain/check/testdata/class/init.carbon +++ b/toolchain/check/testdata/class/init.carbon @@ -25,18 +25,18 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type Class, i32 [template] // CHECK:STDOUT: %.3: type = ptr_type Class [template] // CHECK:STDOUT: %.4: type = unbound_element_type Class, Class* [template] // CHECK:STDOUT: %.5: type = struct_type {.n: i32, .next: Class*} [template] -// CHECK:STDOUT: %Make: type = fn_type @Make [template] -// CHECK:STDOUT: %struct.2: Make = struct_value () [template] +// CHECK:STDOUT: %Make.type: type = fn_type @Make [template] +// CHECK:STDOUT: %Make: = struct_value () [template] // CHECK:STDOUT: %.6: type = ptr_type {.n: i32, .next: Class*} [template] -// CHECK:STDOUT: %MakeReorder: type = fn_type @MakeReorder [template] -// CHECK:STDOUT: %struct.3: MakeReorder = struct_value () [template] +// CHECK:STDOUT: %MakeReorder.type: type = fn_type @MakeReorder [template] +// CHECK:STDOUT: %MakeReorder: = struct_value () [template] // CHECK:STDOUT: %.7: type = struct_type {.next: Class*, .n: i32} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -49,10 +49,10 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Make.decl: Make = fn_decl @Make [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Make.decl: = fn_decl @Make [template = constants.%Make] { +// CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_12.1: type = value_of_initializer %int.make_type_32.loc16 [template = i32] // CHECK:STDOUT: %.loc16_12.2: type = converted %int.make_type_32.loc16, %.loc16_12.1 [template = i32] // CHECK:STDOUT: %n.loc16_9.1: i32 = param n @@ -64,9 +64,9 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: %Class.ref.loc16_34: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: @Make.%return: ref Class = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %MakeReorder.decl: MakeReorder = fn_decl @MakeReorder [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %MakeReorder.decl: = fn_decl @MakeReorder [template = constants.%MakeReorder] { +// CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc20_19.1: type = value_of_initializer %int.make_type_32.loc20 [template = i32] // CHECK:STDOUT: %.loc20_19.2: type = converted %int.make_type_32.loc20, %.loc20_19.1 [template = i32] // CHECK:STDOUT: %n.loc20_16.1: i32 = param n @@ -81,7 +81,7 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %.loc12_8: = field_decl n, element0 [template] diff --git a/toolchain/check/testdata/class/init_adapt.carbon b/toolchain/check/testdata/class/init_adapt.carbon index 0048c42bc404..76d7e0ca1e60 100644 --- a/toolchain/check/testdata/class/init_adapt.carbon +++ b/toolchain/check/testdata/class/init_adapt.carbon @@ -83,20 +83,20 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type C, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %AdaptC: type = class_type @AdaptC [template] // CHECK:STDOUT: %.4: type = ptr_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] -// CHECK:STDOUT: %struct.2: C = struct_value (%.5, %.6) [template] -// CHECK:STDOUT: %MakeC: type = fn_type @MakeC [template] -// CHECK:STDOUT: %struct.3: MakeC = struct_value () [template] -// CHECK:STDOUT: %MakeAdaptC: type = fn_type @MakeAdaptC [template] -// CHECK:STDOUT: %struct.4: MakeAdaptC = struct_value () [template] +// CHECK:STDOUT: %struct: C = struct_value (%.5, %.6) [template] +// CHECK:STDOUT: %MakeC.type: type = fn_type @MakeC [template] +// CHECK:STDOUT: %MakeC: = struct_value () [template] +// CHECK:STDOUT: %MakeAdaptC.type: type = fn_type @MakeAdaptC [template] +// CHECK:STDOUT: %MakeAdaptC: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -111,8 +111,8 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %AdaptC.decl: type = class_decl @AdaptC [template = constants.%AdaptC] {} // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc13_18: i32 = int_literal 1 [template = constants.%.5] @@ -123,7 +123,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %.loc13_27.4: init i32 = initialize_from %.loc13_18 to %.loc13_27.3 [template = constants.%.5] // CHECK:STDOUT: %.loc13_27.5: ref i32 = class_element_access %.loc13_27.2, element1 // CHECK:STDOUT: %.loc13_27.6: init i32 = initialize_from %.loc13_26 to %.loc13_27.5 [template = constants.%.6] -// CHECK:STDOUT: %.loc13_27.7: init C = class_init (%.loc13_27.4, %.loc13_27.6), %.loc13_27.2 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc13_27.7: init C = class_init (%.loc13_27.4, %.loc13_27.6), %.loc13_27.2 [template = constants.%struct] // CHECK:STDOUT: %.loc13_27.8: ref C = temporary %.loc13_27.2, %.loc13_27.7 // CHECK:STDOUT: %.loc13_28.1: ref C = converted %.loc13_27.1, %.loc13_27.8 // CHECK:STDOUT: %.loc13_28.2: C = bind_value %.loc13_28.1 @@ -140,11 +140,11 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %.loc17_14.1: C = as_compatible %b.ref // CHECK:STDOUT: %.loc17_14.2: C = converted %b.ref, %.loc17_14.1 // CHECK:STDOUT: %c: C = bind_name c, %.loc17_14.2 -// CHECK:STDOUT: %MakeC.decl: MakeC = fn_decl @MakeC [template = constants.%struct.3] { +// CHECK:STDOUT: %MakeC.decl: = fn_decl @MakeC [template = constants.%MakeC] { // CHECK:STDOUT: %C.ref.loc19: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: @MakeC.%return: ref C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %MakeAdaptC.decl: MakeAdaptC = fn_decl @MakeAdaptC [template = constants.%struct.4] { +// CHECK:STDOUT: %MakeAdaptC.decl: = fn_decl @MakeAdaptC [template = constants.%MakeAdaptC] { // CHECK:STDOUT: %AdaptC.ref.loc21: type = name_ref AdaptC, %AdaptC.decl [template = constants.%AdaptC] // CHECK:STDOUT: @MakeAdaptC.%return: ref AdaptC = var // CHECK:STDOUT: } @@ -157,11 +157,11 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_32.loc5, %.loc5_10.1 [template = i32] // CHECK:STDOUT: %.loc5_8: = field_decl a, element0 [template] -// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_32.loc6, %.loc6_10.1 [template = i32] // CHECK:STDOUT: %.loc6_8: = field_decl b, element1 [template] @@ -188,14 +188,14 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %MakeC.ref: MakeC = name_ref MakeC, file.%MakeC.decl [template = constants.%struct.3] +// CHECK:STDOUT: %MakeC.ref: = name_ref MakeC, file.%MakeC.decl [template = constants.%MakeC] // CHECK:STDOUT: %.loc23_5: ref AdaptC = splice_block file.%d.var {} // CHECK:STDOUT: %MakeC.call: init C = call %MakeC.ref() to %.loc23_5 // CHECK:STDOUT: %AdaptC.ref: type = name_ref AdaptC, file.%AdaptC.decl [template = constants.%AdaptC] // CHECK:STDOUT: %.loc23_25.1: init AdaptC = as_compatible %MakeC.call // CHECK:STDOUT: %.loc23_25.2: init AdaptC = converted %MakeC.call, %.loc23_25.1 // CHECK:STDOUT: assign file.%d.var, %.loc23_25.2 -// CHECK:STDOUT: %MakeAdaptC.ref: MakeAdaptC = name_ref MakeAdaptC, file.%MakeAdaptC.decl [template = constants.%struct.4] +// CHECK:STDOUT: %MakeAdaptC.ref: = name_ref MakeAdaptC, file.%MakeAdaptC.decl [template = constants.%MakeAdaptC] // CHECK:STDOUT: %.loc25_5: ref C = splice_block file.%e.var {} // CHECK:STDOUT: %MakeAdaptC.call: init AdaptC = call %MakeAdaptC.ref() to %.loc25_5 // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] @@ -209,20 +209,20 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type C, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %AdaptC: type = class_type @AdaptC [template] // CHECK:STDOUT: %.4: type = ptr_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] -// CHECK:STDOUT: %struct.2: C = struct_value (%.5, %.6) [template] -// CHECK:STDOUT: %MakeC: type = fn_type @MakeC [template] -// CHECK:STDOUT: %struct.3: MakeC = struct_value () [template] -// CHECK:STDOUT: %MakeAdaptC: type = fn_type @MakeAdaptC [template] -// CHECK:STDOUT: %struct.4: MakeAdaptC = struct_value () [template] +// CHECK:STDOUT: %struct: C = struct_value (%.5, %.6) [template] +// CHECK:STDOUT: %MakeC.type: type = fn_type @MakeC [template] +// CHECK:STDOUT: %MakeC: = struct_value () [template] +// CHECK:STDOUT: %MakeAdaptC.type: type = fn_type @MakeAdaptC [template] +// CHECK:STDOUT: %MakeAdaptC: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -237,8 +237,8 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %AdaptC.decl: type = class_decl @AdaptC [template = constants.%AdaptC] {} // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc13_18: i32 = int_literal 1 [template = constants.%.5] @@ -249,7 +249,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %.loc13_27.4: init i32 = initialize_from %.loc13_18 to %.loc13_27.3 [template = constants.%.5] // CHECK:STDOUT: %.loc13_27.5: ref i32 = class_element_access %.loc13_27.2, element1 // CHECK:STDOUT: %.loc13_27.6: init i32 = initialize_from %.loc13_26 to %.loc13_27.5 [template = constants.%.6] -// CHECK:STDOUT: %.loc13_27.7: init C = class_init (%.loc13_27.4, %.loc13_27.6), %.loc13_27.2 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc13_27.7: init C = class_init (%.loc13_27.4, %.loc13_27.6), %.loc13_27.2 [template = constants.%struct] // CHECK:STDOUT: %.loc13_27.8: ref C = temporary %.loc13_27.2, %.loc13_27.7 // CHECK:STDOUT: %.loc13_28.1: ref C = converted %.loc13_27.1, %.loc13_27.8 // CHECK:STDOUT: %.loc13_28.2: C = bind_value %.loc13_28.1 @@ -260,11 +260,11 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %C.ref.loc27: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %b.ref: AdaptC = name_ref b, %b // CHECK:STDOUT: %c: C = bind_name c, -// CHECK:STDOUT: %MakeC.decl: MakeC = fn_decl @MakeC [template = constants.%struct.3] { +// CHECK:STDOUT: %MakeC.decl: = fn_decl @MakeC [template = constants.%MakeC] { // CHECK:STDOUT: %C.ref.loc29: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: @MakeC.%return: ref C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %MakeAdaptC.decl: MakeAdaptC = fn_decl @MakeAdaptC [template = constants.%struct.4] { +// CHECK:STDOUT: %MakeAdaptC.decl: = fn_decl @MakeAdaptC [template = constants.%MakeAdaptC] { // CHECK:STDOUT: %AdaptC.ref.loc31: type = name_ref AdaptC, %AdaptC.decl [template = constants.%AdaptC] // CHECK:STDOUT: @MakeAdaptC.%return: ref AdaptC = var // CHECK:STDOUT: } @@ -277,11 +277,11 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_32.loc5, %.loc5_10.1 [template = i32] // CHECK:STDOUT: %.loc5_8: = field_decl a, element0 [template] -// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_32.loc6, %.loc6_10.1 [template = i32] // CHECK:STDOUT: %.loc6_8: = field_decl b, element1 [template] @@ -308,11 +308,11 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %MakeC.ref: MakeC = name_ref MakeC, file.%MakeC.decl [template = constants.%struct.3] +// CHECK:STDOUT: %MakeC.ref: = name_ref MakeC, file.%MakeC.decl [template = constants.%MakeC] // CHECK:STDOUT: %.loc37: ref C = temporary_storage // CHECK:STDOUT: %MakeC.call: init C = call %MakeC.ref() to %.loc37 // CHECK:STDOUT: assign file.%d.var, -// CHECK:STDOUT: %MakeAdaptC.ref: MakeAdaptC = name_ref MakeAdaptC, file.%MakeAdaptC.decl [template = constants.%struct.4] +// CHECK:STDOUT: %MakeAdaptC.ref: = name_ref MakeAdaptC, file.%MakeAdaptC.decl [template = constants.%MakeAdaptC] // CHECK:STDOUT: %.loc42: ref AdaptC = temporary_storage // CHECK:STDOUT: %MakeAdaptC.call: init AdaptC = call %MakeAdaptC.ref() to %.loc42 // CHECK:STDOUT: assign file.%e.var, diff --git a/toolchain/check/testdata/class/init_as.carbon b/toolchain/check/testdata/class/init_as.carbon index c072889eb126..a0174615ef83 100644 --- a/toolchain/check/testdata/class/init_as.carbon +++ b/toolchain/check/testdata/class/init_as.carbon @@ -21,17 +21,17 @@ fn F() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type Class, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: i32 = int_literal 2 [template] // CHECK:STDOUT: %.6: type = ptr_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %struct.3: Class = struct_value (%.4, %.5) [template] +// CHECK:STDOUT: %struct: Class = struct_value (%.4, %.5) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -42,11 +42,11 @@ fn F() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc16_11.2: type = converted %int.make_type_32, %.loc16_11.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var @@ -54,11 +54,11 @@ fn F() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %.loc12_8: = field_decl a, element0 [template] -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] // CHECK:STDOUT: %.loc13_8: = field_decl b, element1 [template] @@ -82,7 +82,7 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc17_26.4: init i32 = initialize_from %.loc17_17 to %.loc17_26.3 [template = constants.%.4] // CHECK:STDOUT: %.loc17_26.5: ref i32 = class_element_access %.loc17_26.2, element1 // CHECK:STDOUT: %.loc17_26.6: init i32 = initialize_from %.loc17_25 to %.loc17_26.5 [template = constants.%.5] -// CHECK:STDOUT: %.loc17_26.7: init Class = class_init (%.loc17_26.4, %.loc17_26.6), %.loc17_26.2 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc17_26.7: init Class = class_init (%.loc17_26.4, %.loc17_26.6), %.loc17_26.2 [template = constants.%struct] // CHECK:STDOUT: %.loc17_26.8: ref Class = temporary %.loc17_26.2, %.loc17_26.7 // CHECK:STDOUT: %.loc17_28: ref Class = converted %.loc17_26.1, %.loc17_26.8 // CHECK:STDOUT: %a.ref: = name_ref a, @Class.%.loc12_8 [template = @Class.%.loc12_8] diff --git a/toolchain/check/testdata/class/init_nested.carbon b/toolchain/check/testdata/class/init_nested.carbon index 66069fbe9a8b..8be1a285757f 100644 --- a/toolchain/check/testdata/class/init_nested.carbon +++ b/toolchain/check/testdata/class/init_nested.carbon @@ -28,19 +28,19 @@ fn MakeOuter() -> Outer { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Inner: type = class_type @Inner [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type Inner, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %MakeInner: type = fn_type @MakeInner [template] -// CHECK:STDOUT: %struct.2: MakeInner = struct_value () [template] +// CHECK:STDOUT: %MakeInner.type: type = fn_type @MakeInner [template] +// CHECK:STDOUT: %MakeInner: = struct_value () [template] // CHECK:STDOUT: %Outer: type = class_type @Outer [template] // CHECK:STDOUT: %.4: type = ptr_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %.5: type = unbound_element_type Outer, Inner [template] // CHECK:STDOUT: %.6: type = struct_type {.c: Inner, .d: Inner} [template] -// CHECK:STDOUT: %MakeOuter: type = fn_type @MakeOuter [template] -// CHECK:STDOUT: %struct.3: MakeOuter = struct_value () [template] +// CHECK:STDOUT: %MakeOuter.type: type = fn_type @MakeOuter [template] +// CHECK:STDOUT: %MakeOuter: = struct_value () [template] // CHECK:STDOUT: %.7: type = struct_type {.c: {.a: i32, .b: i32}*, .d: {.a: i32, .b: i32}*} [template] // CHECK:STDOUT: %.8: type = ptr_type {.c: {.a: i32, .b: i32}*, .d: {.a: i32, .b: i32}*} [template] // CHECK:STDOUT: %.9: type = ptr_type {.c: Inner, .d: Inner} [template] @@ -56,25 +56,25 @@ fn MakeOuter() -> Outer { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Inner.decl: type = class_decl @Inner [template = constants.%Inner] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %MakeInner.decl: MakeInner = fn_decl @MakeInner [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %MakeInner.decl: = fn_decl @MakeInner [template = constants.%MakeInner] { // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, %Inner.decl [template = constants.%Inner] // CHECK:STDOUT: @MakeInner.%return: ref Inner = var // CHECK:STDOUT: } // CHECK:STDOUT: %Outer.decl: type = class_decl @Outer [template = constants.%Outer] {} -// CHECK:STDOUT: %MakeOuter.decl: MakeOuter = fn_decl @MakeOuter [template = constants.%struct.3] { +// CHECK:STDOUT: %MakeOuter.decl: = fn_decl @MakeOuter [template = constants.%MakeOuter] { // CHECK:STDOUT: %Outer.ref: type = name_ref Outer, %Outer.decl [template = constants.%Outer] // CHECK:STDOUT: @MakeOuter.%return: ref Outer = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Inner { -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %.loc12_8: = field_decl a, element0 [template] -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] // CHECK:STDOUT: %.loc13_8: = field_decl b, element1 [template] @@ -103,10 +103,10 @@ fn MakeOuter() -> Outer { // CHECK:STDOUT: // CHECK:STDOUT: fn @MakeOuter() -> %return: Outer { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %MakeInner.ref.loc24_16: MakeInner = name_ref MakeInner, file.%MakeInner.decl [template = constants.%struct.2] +// CHECK:STDOUT: %MakeInner.ref.loc24_16: = name_ref MakeInner, file.%MakeInner.decl [template = constants.%MakeInner] // CHECK:STDOUT: %.loc24_45.1: ref Inner = class_element_access %return, element0 // CHECK:STDOUT: %MakeInner.call.loc24_25: init Inner = call %MakeInner.ref.loc24_16() to %.loc24_45.1 -// CHECK:STDOUT: %MakeInner.ref.loc24_34: MakeInner = name_ref MakeInner, file.%MakeInner.decl [template = constants.%struct.2] +// CHECK:STDOUT: %MakeInner.ref.loc24_34: = name_ref MakeInner, file.%MakeInner.decl [template = constants.%MakeInner] // CHECK:STDOUT: %.loc24_45.2: ref Inner = class_element_access %return, element1 // CHECK:STDOUT: %MakeInner.call.loc24_43: init Inner = call %MakeInner.ref.loc24_34() to %.loc24_45.2 // CHECK:STDOUT: %.loc24_45.3: {.c: Inner, .d: Inner} = struct_literal (%MakeInner.call.loc24_25, %MakeInner.call.loc24_43) diff --git a/toolchain/check/testdata/class/method.carbon b/toolchain/check/testdata/class/method.carbon index afe03cfc8298..9baa856735a7 100644 --- a/toolchain/check/testdata/class/method.carbon +++ b/toolchain/check/testdata/class/method.carbon @@ -62,37 +62,37 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: type = ptr_type Class [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.3: type = unbound_element_type Class, i32 [template] // CHECK:STDOUT: %.4: type = struct_type {.k: i32} [template] // CHECK:STDOUT: %.5: type = ptr_type {.k: i32} [template] -// CHECK:STDOUT: %Call: type = fn_type @Call [template] -// CHECK:STDOUT: %struct.4: Call = struct_value () [template] -// CHECK:STDOUT: %CallAlias: type = fn_type @CallAlias [template] -// CHECK:STDOUT: %struct.5: CallAlias = struct_value () [template] -// CHECK:STDOUT: %CallOnConstBoundMethod: type = fn_type @CallOnConstBoundMethod [template] -// CHECK:STDOUT: %struct.6: CallOnConstBoundMethod = struct_value () [template] +// CHECK:STDOUT: %Call.type: type = fn_type @Call [template] +// CHECK:STDOUT: %Call: = struct_value () [template] +// CHECK:STDOUT: %CallAlias.type: type = fn_type @CallAlias [template] +// CHECK:STDOUT: %CallAlias: = struct_value () [template] +// CHECK:STDOUT: %CallOnConstBoundMethod.type: type = fn_type @CallOnConstBoundMethod [template] +// CHECK:STDOUT: %CallOnConstBoundMethod: = struct_value () [template] // CHECK:STDOUT: %.6: i32 = int_literal 1 [template] -// CHECK:STDOUT: %struct.7: Class = struct_value (%.6) [template] -// CHECK:STDOUT: %CallWithAddr: type = fn_type @CallWithAddr [template] -// CHECK:STDOUT: %struct.8: CallWithAddr = struct_value () [template] -// CHECK:STDOUT: %CallFThroughPointer: type = fn_type @CallFThroughPointer [template] -// CHECK:STDOUT: %struct.9: CallFThroughPointer = struct_value () [template] -// CHECK:STDOUT: %CallGThroughPointer: type = fn_type @CallGThroughPointer [template] -// CHECK:STDOUT: %struct.10: CallGThroughPointer = struct_value () [template] -// CHECK:STDOUT: %Make: type = fn_type @Make [template] -// CHECK:STDOUT: %struct.11: Make = struct_value () [template] -// CHECK:STDOUT: %CallFOnInitializingExpr: type = fn_type @CallFOnInitializingExpr [template] -// CHECK:STDOUT: %struct.12: CallFOnInitializingExpr = struct_value () [template] -// CHECK:STDOUT: %CallGOnInitializingExpr: type = fn_type @CallGOnInitializingExpr [template] -// CHECK:STDOUT: %struct.13: CallGOnInitializingExpr = struct_value () [template] +// CHECK:STDOUT: %struct: Class = struct_value (%.6) [template] +// CHECK:STDOUT: %CallWithAddr.type: type = fn_type @CallWithAddr [template] +// CHECK:STDOUT: %CallWithAddr: = struct_value () [template] +// CHECK:STDOUT: %CallFThroughPointer.type: type = fn_type @CallFThroughPointer [template] +// CHECK:STDOUT: %CallFThroughPointer: = struct_value () [template] +// CHECK:STDOUT: %CallGThroughPointer.type: type = fn_type @CallGThroughPointer [template] +// CHECK:STDOUT: %CallGThroughPointer: = struct_value () [template] +// CHECK:STDOUT: %Make.type: type = fn_type @Make [template] +// CHECK:STDOUT: %Make: = struct_value () [template] +// CHECK:STDOUT: %CallFOnInitializingExpr.type: type = fn_type @CallFOnInitializingExpr [template] +// CHECK:STDOUT: %CallFOnInitializingExpr: = struct_value () [template] +// CHECK:STDOUT: %CallGOnInitializingExpr.type: type = fn_type @CallGOnInitializingExpr [template] +// CHECK:STDOUT: %CallGOnInitializingExpr: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -111,89 +111,89 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.loc20_12.1: Class = param self // CHECK:STDOUT: @F.%self: Class = bind_name self, %self.loc20_12.1 -// CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc20_29.1: type = value_of_initializer %int.make_type_32.loc20 [template = i32] // CHECK:STDOUT: %.loc20_29.2: type = converted %int.make_type_32.loc20, %.loc20_29.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Call.decl: Call = fn_decl @Call [template = constants.%struct.4] { +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Call.decl: = fn_decl @Call [template = constants.%Call] { // CHECK:STDOUT: %Class.ref.loc24: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %c.loc24_9.1: Class = param c // CHECK:STDOUT: @Call.%c: Class = bind_name c, %c.loc24_9.1 -// CHECK:STDOUT: %int.make_type_32.loc24: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc24_22.1: type = value_of_initializer %int.make_type_32.loc24 [template = i32] // CHECK:STDOUT: %.loc24_22.2: type = converted %int.make_type_32.loc24, %.loc24_22.1 [template = i32] // CHECK:STDOUT: @Call.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %CallAlias.decl: CallAlias = fn_decl @CallAlias [template = constants.%struct.5] { +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %CallAlias.decl: = fn_decl @CallAlias [template = constants.%CallAlias] { // CHECK:STDOUT: %Class.ref.loc30: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %c.loc30_14.1: Class = param c // CHECK:STDOUT: @CallAlias.%c: Class = bind_name c, %c.loc30_14.1 -// CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc30_27.1: type = value_of_initializer %int.make_type_32.loc30 [template = i32] // CHECK:STDOUT: %.loc30_27.2: type = converted %int.make_type_32.loc30, %.loc30_27.1 [template = i32] // CHECK:STDOUT: @CallAlias.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %CallOnConstBoundMethod.decl: CallOnConstBoundMethod = fn_decl @CallOnConstBoundMethod [template = constants.%struct.6] { -// CHECK:STDOUT: %int.make_type_32.loc34: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %CallOnConstBoundMethod.decl: = fn_decl @CallOnConstBoundMethod [template = constants.%CallOnConstBoundMethod] { +// CHECK:STDOUT: %int.make_type_32.loc34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc34_32.1: type = value_of_initializer %int.make_type_32.loc34 [template = i32] // CHECK:STDOUT: %.loc34_32.2: type = converted %int.make_type_32.loc34, %.loc34_32.1 [template = i32] // CHECK:STDOUT: @CallOnConstBoundMethod.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %CallWithAddr.decl: CallWithAddr = fn_decl @CallWithAddr [template = constants.%struct.8] { -// CHECK:STDOUT: %int.make_type_32.loc38: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %CallWithAddr.decl: = fn_decl @CallWithAddr [template = constants.%CallWithAddr] { +// CHECK:STDOUT: %int.make_type_32.loc38: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc38_22.1: type = value_of_initializer %int.make_type_32.loc38 [template = i32] // CHECK:STDOUT: %.loc38_22.2: type = converted %int.make_type_32.loc38, %.loc38_22.1 [template = i32] // CHECK:STDOUT: @CallWithAddr.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %CallFThroughPointer.decl: CallFThroughPointer = fn_decl @CallFThroughPointer [template = constants.%struct.9] { +// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %CallFThroughPointer.decl: = fn_decl @CallFThroughPointer [template = constants.%CallFThroughPointer] { // CHECK:STDOUT: %Class.ref.loc43: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc43_32: type = ptr_type Class [template = constants.%.2] // CHECK:STDOUT: %p.loc43_24.1: Class* = param p // CHECK:STDOUT: @CallFThroughPointer.%p: Class* = bind_name p, %p.loc43_24.1 -// CHECK:STDOUT: %int.make_type_32.loc43: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc43: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc43_38.1: type = value_of_initializer %int.make_type_32.loc43 [template = i32] // CHECK:STDOUT: %.loc43_38.2: type = converted %int.make_type_32.loc43, %.loc43_38.1 [template = i32] // CHECK:STDOUT: @CallFThroughPointer.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.10: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %CallGThroughPointer.decl: CallGThroughPointer = fn_decl @CallGThroughPointer [template = constants.%struct.10] { +// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %CallGThroughPointer.decl: = fn_decl @CallGThroughPointer [template = constants.%CallGThroughPointer] { // CHECK:STDOUT: %Class.ref.loc47: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc47_32: type = ptr_type Class [template = constants.%.2] // CHECK:STDOUT: %p.loc47_24.1: Class* = param p // CHECK:STDOUT: @CallGThroughPointer.%p: Class* = bind_name p, %p.loc47_24.1 -// CHECK:STDOUT: %int.make_type_32.loc47: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc47: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc47_38.1: type = value_of_initializer %int.make_type_32.loc47 [template = i32] // CHECK:STDOUT: %.loc47_38.2: type = converted %int.make_type_32.loc47, %.loc47_38.1 [template = i32] // CHECK:STDOUT: @CallGThroughPointer.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Make.decl: Make = fn_decl @Make [template = constants.%struct.11] { +// CHECK:STDOUT: %Make.decl: = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %Class.ref.loc51: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: @Make.%return: ref Class = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.11: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %CallFOnInitializingExpr.decl: CallFOnInitializingExpr = fn_decl @CallFOnInitializingExpr [template = constants.%struct.12] { -// CHECK:STDOUT: %int.make_type_32.loc53: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %CallFOnInitializingExpr.decl: = fn_decl @CallFOnInitializingExpr [template = constants.%CallFOnInitializingExpr] { +// CHECK:STDOUT: %int.make_type_32.loc53: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc53_33.1: type = value_of_initializer %int.make_type_32.loc53 [template = i32] // CHECK:STDOUT: %.loc53_33.2: type = converted %int.make_type_32.loc53, %.loc53_33.1 [template = i32] // CHECK:STDOUT: @CallFOnInitializingExpr.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.12: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %CallGOnInitializingExpr.decl: CallGOnInitializingExpr = fn_decl @CallGOnInitializingExpr [template = constants.%struct.13] { -// CHECK:STDOUT: %int.make_type_32.loc57: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %CallGOnInitializingExpr.decl: = fn_decl @CallGOnInitializingExpr [template = constants.%CallGOnInitializingExpr] { +// CHECK:STDOUT: %int.make_type_32.loc57: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc57_33.1: type = value_of_initializer %int.make_type_32.loc57 [template = i32] // CHECK:STDOUT: %.loc57_33.2: type = converted %int.make_type_32.loc57, %.loc57_33.1 [template = i32] // CHECK:STDOUT: @CallGOnInitializingExpr.%return: ref i32 = var @@ -201,29 +201,29 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.loc12_8.1: Class = param self // CHECK:STDOUT: %self.loc12_8.2: Class = bind_name self, %self.loc12_8.1 -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_25.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_25.2: type = converted %int.make_type_32.loc12, %.loc12_25.1 [template = i32] // CHECK:STDOUT: %return.var.loc12: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %.loc13_23: type = ptr_type Class [template = constants.%.2] // CHECK:STDOUT: %self.loc13_13.1: Class* = param self // CHECK:STDOUT: %self.loc13_13.3: Class* = bind_name self, %self.loc13_13.1 // CHECK:STDOUT: %.loc13_8: Class* = addr_pattern %self.loc13_13.3 -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_32.loc13, %.loc13_31.1 [template = i32] // CHECK:STDOUT: %return.var.loc13: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %F.ref: F = name_ref F, %F.decl [template = constants.%struct.2] -// CHECK:STDOUT: %A: F = bind_alias A, %F.decl [template = constants.%struct.2] -// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %F.ref: = name_ref F, %F.decl [template = constants.%F] +// CHECK:STDOUT: %A: = bind_alias A, %F.decl [template = constants.%F] +// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_10.1: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_10.2: type = converted %int.make_type_32.loc17, %.loc17_10.1 [template = i32] // CHECK:STDOUT: %.loc17_8: = field_decl k, element0 [template] @@ -252,7 +252,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: fn @Call(%c: Class) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: Class = name_ref c, %c -// CHECK:STDOUT: %F.ref: F = name_ref F, @Class.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, @Class.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc27_11: = bound_method %c.ref, %F.ref // CHECK:STDOUT: %F.call: init i32 = call %.loc27_11(%c.ref) // CHECK:STDOUT: %.loc27_15.1: i32 = value_of_initializer %F.call @@ -263,7 +263,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: fn @CallAlias(%c: Class) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: Class = name_ref c, %c -// CHECK:STDOUT: %A.ref: F = name_ref A, @Class.%A [template = constants.%struct.2] +// CHECK:STDOUT: %A.ref: = name_ref A, @Class.%A [template = constants.%F] // CHECK:STDOUT: %.loc31_11: = bound_method %c.ref, %A.ref // CHECK:STDOUT: %F.call: init i32 = call %.loc31_11(%c.ref) // CHECK:STDOUT: %.loc31_15.1: i32 = value_of_initializer %F.call @@ -279,10 +279,10 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %.loc35_18.2: ref Class = temporary_storage // CHECK:STDOUT: %.loc35_18.3: ref i32 = class_element_access %.loc35_18.2, element0 // CHECK:STDOUT: %.loc35_18.4: init i32 = initialize_from %.loc35_17 to %.loc35_18.3 [template = constants.%.6] -// CHECK:STDOUT: %.loc35_18.5: init Class = class_init (%.loc35_18.4), %.loc35_18.2 [template = constants.%struct.7] +// CHECK:STDOUT: %.loc35_18.5: init Class = class_init (%.loc35_18.4), %.loc35_18.2 [template = constants.%struct] // CHECK:STDOUT: %.loc35_18.6: ref Class = temporary %.loc35_18.2, %.loc35_18.5 // CHECK:STDOUT: %.loc35_20.1: ref Class = converted %.loc35_18.1, %.loc35_18.6 -// CHECK:STDOUT: %F.ref: F = name_ref F, @Class.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, @Class.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc35_29: = bound_method %.loc35_20.1, %F.ref // CHECK:STDOUT: %.loc35_20.2: Class = bind_value %.loc35_20.1 // CHECK:STDOUT: %F.call: init i32 = call %.loc35_29(%.loc35_20.2) @@ -297,7 +297,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %c.var: ref Class = var c // CHECK:STDOUT: %c: ref Class = bind_name c, %c.var // CHECK:STDOUT: %c.ref: ref Class = name_ref c, %c -// CHECK:STDOUT: %G.ref: G = name_ref G, @Class.%G.decl [template = constants.%struct.3] +// CHECK:STDOUT: %G.ref: = name_ref G, @Class.%G.decl [template = constants.%G] // CHECK:STDOUT: %.loc40_11: = bound_method %c.ref, %G.ref // CHECK:STDOUT: %.loc40_10: Class* = addr_of %c.ref // CHECK:STDOUT: %G.call: init i32 = call %.loc40_11(%.loc40_10) @@ -310,7 +310,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: Class* = name_ref p, %p // CHECK:STDOUT: %.loc44_11.1: ref Class = deref %p.ref -// CHECK:STDOUT: %F.ref: F = name_ref F, @Class.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, @Class.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc44_14: = bound_method %.loc44_11.1, %F.ref // CHECK:STDOUT: %.loc44_11.2: Class = bind_value %.loc44_11.1 // CHECK:STDOUT: %F.call: init i32 = call %.loc44_14(%.loc44_11.2) @@ -323,7 +323,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: Class* = name_ref p, %p // CHECK:STDOUT: %.loc48_11.1: ref Class = deref %p.ref -// CHECK:STDOUT: %G.ref: G = name_ref G, @Class.%G.decl [template = constants.%struct.3] +// CHECK:STDOUT: %G.ref: = name_ref G, @Class.%G.decl [template = constants.%G] // CHECK:STDOUT: %.loc48_14: = bound_method %.loc48_11.1, %G.ref // CHECK:STDOUT: %.loc48_11.2: Class* = addr_of %.loc48_11.1 // CHECK:STDOUT: %G.call: init i32 = call %.loc48_14(%.loc48_11.2) @@ -336,11 +336,11 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @CallFOnInitializingExpr() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Make.ref: Make = name_ref Make, file.%Make.decl [template = constants.%struct.11] +// CHECK:STDOUT: %Make.ref: = name_ref Make, file.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc54_14.1: ref Class = temporary_storage // CHECK:STDOUT: %Make.call: init Class = call %Make.ref() to %.loc54_14.1 // CHECK:STDOUT: %.loc54_14.2: ref Class = temporary %.loc54_14.1, %Make.call -// CHECK:STDOUT: %F.ref: F = name_ref F, @Class.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, @Class.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc54_16: = bound_method %.loc54_14.2, %F.ref // CHECK:STDOUT: %.loc54_14.3: Class = bind_value %.loc54_14.2 // CHECK:STDOUT: %F.call: init i32 = call %.loc54_16(%.loc54_14.3) @@ -351,11 +351,11 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Make.ref: Make = name_ref Make, file.%Make.decl [template = constants.%struct.11] +// CHECK:STDOUT: %Make.ref: = name_ref Make, file.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc58_14.1: ref Class = temporary_storage // CHECK:STDOUT: %Make.call: init Class = call %Make.ref() to %.loc58_14.1 // CHECK:STDOUT: %.loc58_14.2: ref Class = temporary %.loc58_14.1, %Make.call -// CHECK:STDOUT: %G.ref: G = name_ref G, @Class.%G.decl [template = constants.%struct.3] +// CHECK:STDOUT: %G.ref: = name_ref G, @Class.%G.decl [template = constants.%G] // CHECK:STDOUT: %.loc58_16: = bound_method %.loc58_14.2, %G.ref // CHECK:STDOUT: %.loc58_14.3: Class* = addr_of %.loc58_14.2 // CHECK:STDOUT: %G.call: init i32 = call %.loc58_16(%.loc58_14.3) diff --git a/toolchain/check/testdata/class/nested.carbon b/toolchain/check/testdata/class/nested.carbon index ca5cfe0df2b1..5a4a92f50737 100644 --- a/toolchain/check/testdata/class/nested.carbon +++ b/toolchain/check/testdata/class/nested.carbon @@ -53,26 +53,26 @@ fn F(a: Outer*) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Outer: type = class_type @Outer [template] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] // CHECK:STDOUT: %Inner: type = class_type @Inner [template] // CHECK:STDOUT: %.2: type = ptr_type Inner [template] // CHECK:STDOUT: %.3: type = unbound_element_type Inner, Inner* [template] // CHECK:STDOUT: %.4: type = ptr_type Outer [template] // CHECK:STDOUT: %.5: type = unbound_element_type Inner, Outer* [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.2: G = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.6: type = struct_type {.pi: Inner*, .po: Outer*, .qi: Inner*} [template] -// CHECK:STDOUT: %H: type = fn_type @H [template] -// CHECK:STDOUT: %struct.3: H = struct_value () [template] +// CHECK:STDOUT: %H.type: type = fn_type @H [template] +// CHECK:STDOUT: %H: = struct_value () [template] // CHECK:STDOUT: %.7: type = unbound_element_type Outer, Outer* [template] // CHECK:STDOUT: %.8: type = unbound_element_type Outer, Inner* [template] // CHECK:STDOUT: %.9: type = struct_type {.po: Outer*, .qo: Outer*, .pi: Inner*} [template] // CHECK:STDOUT: %.10: type = ptr_type {.po: Outer*, .qo: Outer*, .pi: Inner*} [template] // CHECK:STDOUT: %.11: type = ptr_type {.pi: Inner*, .po: Outer*, .qi: Inner*} [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.4: F = struct_value () [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -83,7 +83,7 @@ fn F(a: Outer*) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Outer.decl: type = class_decl @Outer [template = constants.%Outer] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.4] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %Outer.ref: type = name_ref Outer, %Outer.decl [template = constants.%Outer] // CHECK:STDOUT: %.loc41: type = ptr_type Outer [template = constants.%.4] // CHECK:STDOUT: %a.loc41_6.1: Outer* = param a @@ -92,9 +92,9 @@ fn F(a: Outer*) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Outer { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} // CHECK:STDOUT: %Inner.decl: type = class_decl @Inner [template = constants.%Inner] {} -// CHECK:STDOUT: %H.decl: H = fn_decl @H [template = constants.%struct.3] {} +// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] {} // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Outer [template = constants.%Outer] // CHECK:STDOUT: %.loc36_15: type = ptr_type Outer [template = constants.%.4] // CHECK:STDOUT: %.loc36_9: = field_decl po, element0 [template] @@ -125,7 +125,7 @@ fn F(a: Outer*) { // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [template = constants.%Inner] // CHECK:STDOUT: %.loc21_18: type = ptr_type Inner [template = constants.%.2] // CHECK:STDOUT: %.loc21_11: = field_decl qi, element2 [template] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.2] {} +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Inner diff --git a/toolchain/check/testdata/class/nested_name.carbon b/toolchain/check/testdata/class/nested_name.carbon index 06d85e66da16..9a8ba972b76a 100644 --- a/toolchain/check/testdata/class/nested_name.carbon +++ b/toolchain/check/testdata/class/nested_name.carbon @@ -27,17 +27,17 @@ fn G(o: Outer) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Outer: type = class_type @Outer [template] // CHECK:STDOUT: %Inner: type = class_type @Inner [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type Inner, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.n: i32} [template] // CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.5: type = ptr_type {.n: i32} [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.6: type = ptr_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -50,19 +50,19 @@ fn G(o: Outer) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Outer.decl: type = class_decl @Outer [template = constants.%Outer] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Outer.ref.loc17: type = name_ref Outer, %Outer.decl [template = constants.%Outer] // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [template = constants.%Inner] // CHECK:STDOUT: %oi.loc17_6.1: Inner = param oi // CHECK:STDOUT: @F.%oi: Inner = bind_name oi, %oi.loc17_6.1 -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_26.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc17_26.2: type = converted %int.make_type_32, %.loc17_26.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Outer.ref.loc21: type = name_ref Outer, %Outer.decl [template = constants.%Outer] // CHECK:STDOUT: %o.loc21_6.1: Outer = param o // CHECK:STDOUT: @G.%o: Outer = bind_name o, %o.loc21_6.1 @@ -78,7 +78,7 @@ fn G(o: Outer) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Inner { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_12.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc13_12.2: type = converted %int.make_type_32, %.loc13_12.1 [template = i32] // CHECK:STDOUT: %.loc13_10: = field_decl n, element0 [template] diff --git a/toolchain/check/testdata/class/no_prelude/import_access.carbon b/toolchain/check/testdata/class/no_prelude/import_access.carbon index 12a85e13c424..07c736ef0c86 100644 --- a/toolchain/check/testdata/class/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/class/no_prelude/import_access.carbon @@ -342,9 +342,9 @@ private class Redecl {} // CHECK:STDOUT: --- fail_todo_forward.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %Forward: type = class_type @Forward [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: } @@ -354,7 +354,7 @@ private class Redecl {} // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .Forward = %Forward.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] // CHECK:STDOUT: %.loc8: type = ptr_type [template = ] // CHECK:STDOUT: %c.loc8_6.1: = param c @@ -376,16 +376,16 @@ private class Redecl {} // CHECK:STDOUT: --- fail_local_forward.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] // CHECK:STDOUT: %.loc10: type = ptr_type [template = ] // CHECK:STDOUT: %c.loc10_6.1: = param c @@ -401,9 +401,9 @@ private class Redecl {} // CHECK:STDOUT: --- fail_other_forward.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -412,7 +412,7 @@ private class Redecl {} // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Test: = namespace [template] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Test.ref: = name_ref Test, %Test [template = %Test] // CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] // CHECK:STDOUT: %.loc9: type = ptr_type [template = ] diff --git a/toolchain/check/testdata/class/no_prelude/indirect_import_member.carbon b/toolchain/check/testdata/class/no_prelude/indirect_import_member.carbon index f89025f71d23..6388796506e4 100644 --- a/toolchain/check/testdata/class/no_prelude/indirect_import_member.carbon +++ b/toolchain/check/testdata/class/no_prelude/indirect_import_member.carbon @@ -104,9 +104,9 @@ var x: () = D.C.F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -118,7 +118,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -220,8 +220,8 @@ var x: () = D.C.F(); // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -234,7 +234,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %x.var: ref () = var x // CHECK:STDOUT: %x: ref () = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.2: F = import_ref ir2, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref.2: = import_ref ir2, inst+3, loaded [template = constants.%F] // CHECK:STDOUT: %import_ref.3 = import_ref ir2, inst+2, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -249,7 +249,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%import_ref.2 [template = constants.%struct] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref.2 [template = constants.%F] // CHECK:STDOUT: %F.call: init () = call %F.ref() // CHECK:STDOUT: assign file.%x.var, %F.call // CHECK:STDOUT: return @@ -261,8 +261,8 @@ var x: () = D.C.F(); // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -276,7 +276,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: %x.var: ref () = var x // CHECK:STDOUT: %x: ref () = bind_name x, %x.var // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+6, unloaded -// CHECK:STDOUT: %import_ref.3: F = import_ref ir1, inst+5, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref.3: = import_ref ir1, inst+5, loaded [template = constants.%F] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -290,7 +290,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%import_ref.3 [template = constants.%struct] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref.3 [template = constants.%F] // CHECK:STDOUT: %F.call: init () = call %F.ref() // CHECK:STDOUT: assign file.%x.var, %F.call // CHECK:STDOUT: return @@ -302,8 +302,8 @@ var x: () = D.C.F(); // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -317,7 +317,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: %x.var: ref () = var x // CHECK:STDOUT: %x: ref () = bind_name x, %x.var // CHECK:STDOUT: %import_ref.2 = import_ref ir2, inst+6, unloaded -// CHECK:STDOUT: %import_ref.3: F = import_ref ir2, inst+5, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref.3: = import_ref ir2, inst+5, loaded [template = constants.%F] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -331,7 +331,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%import_ref.3 [template = constants.%struct] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref.3 [template = constants.%F] // CHECK:STDOUT: %F.call: init () = call %F.ref() // CHECK:STDOUT: assign file.%x.var, %F.call // CHECK:STDOUT: return @@ -344,8 +344,8 @@ var x: () = D.C.F(); // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -361,7 +361,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+3, unloaded // CHECK:STDOUT: %import_ref.3: type = import_ref ir1, inst+10, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+7, unloaded -// CHECK:STDOUT: %import_ref.5: F = import_ref ir1, inst+8, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref.5: = import_ref ir1, inst+8, loaded [template = constants.%F] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { @@ -382,7 +382,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %D.ref: type = name_ref D, file.%import_ref.1 [template = constants.%D] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%import_ref.3 [template = constants.%C] -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%import_ref.5 [template = constants.%struct] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref.5 [template = constants.%F] // CHECK:STDOUT: %F.call: init () = call %F.ref() // CHECK:STDOUT: assign file.%x.var, %F.call // CHECK:STDOUT: return @@ -395,8 +395,8 @@ var x: () = D.C.F(); // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -412,7 +412,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: %import_ref.2 = import_ref ir2, inst+3, unloaded // CHECK:STDOUT: %import_ref.3: type = import_ref ir2, inst+10, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.4 = import_ref ir2, inst+7, unloaded -// CHECK:STDOUT: %import_ref.5: F = import_ref ir2, inst+8, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref.5: = import_ref ir2, inst+8, loaded [template = constants.%F] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { @@ -433,7 +433,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %D.ref: type = name_ref D, file.%import_ref.1 [template = constants.%D] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%import_ref.3 [template = constants.%C] -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%import_ref.5 [template = constants.%struct] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref.5 [template = constants.%F] // CHECK:STDOUT: %F.call: init () = call %F.ref() // CHECK:STDOUT: assign file.%x.var, %F.call // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/class/raw_self.carbon b/toolchain/check/testdata/class/raw_self.carbon index f510eecf5754..ffd110ed84bc 100644 --- a/toolchain/check/testdata/class/raw_self.carbon +++ b/toolchain/check/testdata/class/raw_self.carbon @@ -27,15 +27,15 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] // CHECK:STDOUT: %.1: type = ptr_type Class [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.3: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.4: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.5: type = unbound_element_type Class, i32 [template] // CHECK:STDOUT: %.6: type = struct_type {.n: i32} [template] // CHECK:STDOUT: %.7: type = ptr_type {.n: i32} [template] @@ -49,38 +49,38 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc17: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %.loc17_27: type = ptr_type Class [template = constants.%.1] // CHECK:STDOUT: %self.loc17_17.1: Class* = param self // CHECK:STDOUT: @F.%self.loc17_17: Class* = bind_name self, %self.loc17_17.1 // CHECK:STDOUT: @F.%.loc17: Class* = addr_pattern @F.%self.loc17_17 -// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_38.1: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_38.2: type = converted %int.make_type_32.loc17, %.loc17_38.1 [template = i32] // CHECK:STDOUT: %self.loc17_30.1: i32 = param r#self // CHECK:STDOUT: @F.%self.loc17_30: i32 = bind_name r#self, %self.loc17_30.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.9: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref.loc21: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.loc21_12.1: Class = param self // CHECK:STDOUT: @G.%self.loc21_12: Class = bind_name self, %self.loc21_12.1 -// CHECK:STDOUT: %int.make_type_32.loc21_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc21_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_32.1: type = value_of_initializer %int.make_type_32.loc21_32 [template = i32] // CHECK:STDOUT: %.loc21_32.2: type = converted %int.make_type_32.loc21_32, %.loc21_32.1 [template = i32] // CHECK:STDOUT: %self.loc21_24.1: i32 = param r#self // CHECK:STDOUT: @G.%self.loc21_24: i32 = bind_name r#self, %self.loc21_24.1 -// CHECK:STDOUT: %int.make_type_32.loc21_41: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc21_46: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc21_41: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc21_46: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_49.1: (type, type) = tuple_literal (%int.make_type_32.loc21_41, %int.make_type_32.loc21_46) // CHECK:STDOUT: %.loc21_49.2: type = value_of_initializer %int.make_type_32.loc21_41 [template = i32] // CHECK:STDOUT: %.loc21_49.3: type = converted %int.make_type_32.loc21_41, %.loc21_49.2 [template = i32] @@ -92,29 +92,29 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %.loc12_23: type = ptr_type Class [template = constants.%.1] // CHECK:STDOUT: %self.loc12_13.1: Class* = param self // CHECK:STDOUT: %self.loc12_13.3: Class* = bind_name self, %self.loc12_13.1 // CHECK:STDOUT: %.loc12_8: Class* = addr_pattern %self.loc12_13.3 -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_34.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_34.2: type = converted %int.make_type_32.loc12, %.loc12_34.1 [template = i32] // CHECK:STDOUT: %self.loc12_26.1: i32 = param r#self // CHECK:STDOUT: %self.loc12_26.2: i32 = bind_name r#self, %self.loc12_26.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.loc13_8.1: Class = param self // CHECK:STDOUT: %self.loc13_8.2: Class = bind_name self, %self.loc13_8.1 -// CHECK:STDOUT: %int.make_type_32.loc13_28: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13_28: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_28.1: type = value_of_initializer %int.make_type_32.loc13_28 [template = i32] // CHECK:STDOUT: %.loc13_28.2: type = converted %int.make_type_32.loc13_28, %.loc13_28.1 [template = i32] // CHECK:STDOUT: %self.loc13_20.1: i32 = param r#self // CHECK:STDOUT: %self.loc13_20.2: i32 = bind_name r#self, %self.loc13_20.1 -// CHECK:STDOUT: %int.make_type_32.loc13_37: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc13_42: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13_37: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13_42: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_45.1: (type, type) = tuple_literal (%int.make_type_32.loc13_37, %int.make_type_32.loc13_42) // CHECK:STDOUT: %.loc13_45.2: type = value_of_initializer %int.make_type_32.loc13_37 [template = i32] // CHECK:STDOUT: %.loc13_45.3: type = converted %int.make_type_32.loc13_37, %.loc13_45.2 [template = i32] @@ -123,7 +123,7 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %.loc13_45.6: type = converted %.loc13_45.1, constants.%.4 [template = constants.%.4] // CHECK:STDOUT: %return.var: ref (i32, i32) = var // CHECK:STDOUT: } -// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] // CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_32.loc14, %.loc14_10.1 [template = i32] // CHECK:STDOUT: %.loc14_8: = field_decl n, element0 [template] diff --git a/toolchain/check/testdata/class/raw_self_type.carbon b/toolchain/check/testdata/class/raw_self_type.carbon index 358b75cfc5dd..841d7583991f 100644 --- a/toolchain/check/testdata/class/raw_self_type.carbon +++ b/toolchain/check/testdata/class/raw_self_type.carbon @@ -27,16 +27,16 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %.3: type = ptr_type Class [template] // CHECK:STDOUT: %.4: type = ptr_type {} [template] // CHECK:STDOUT: %MemberNamedSelf: type = class_type @MemberNamedSelf [template] // CHECK:STDOUT: %Self: type = class_type @Self [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -48,7 +48,7 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} // CHECK:STDOUT: %MemberNamedSelf.decl: type = class_decl @MemberNamedSelf [template = constants.%MemberNamedSelf] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %Self.ref.loc24_25: type = name_ref Self, constants.%MemberNamedSelf [template = constants.%MemberNamedSelf] // CHECK:STDOUT: %x.loc24_22.1: MemberNamedSelf = param x // CHECK:STDOUT: @F.2.%x: MemberNamedSelf = bind_name x, %x.loc24_22.1 @@ -59,7 +59,7 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -68,7 +68,7 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: // CHECK:STDOUT: class @MemberNamedSelf { // CHECK:STDOUT: %Self.decl: type = class_decl @Self [template = constants.%Self] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %Self.ref.loc21_11: type = name_ref Self, constants.%MemberNamedSelf [template = constants.%MemberNamedSelf] // CHECK:STDOUT: %x.loc21_8.1: MemberNamedSelf = param x // CHECK:STDOUT: %x.loc21_8.2: MemberNamedSelf = bind_name x, %x.loc21_8.1 diff --git a/toolchain/check/testdata/class/redeclaration.carbon b/toolchain/check/testdata/class/redeclaration.carbon index 57904a626d04..66401ea0ee77 100644 --- a/toolchain/check/testdata/class/redeclaration.carbon +++ b/toolchain/check/testdata/class/redeclaration.carbon @@ -20,11 +20,11 @@ fn Class.F[self: Self](b: bool) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Bool = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] // CHECK:STDOUT: } @@ -37,13 +37,13 @@ fn Class.F[self: Self](b: bool) {} // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl.loc11: type = class_decl @Class [template = constants.%Class] {} // CHECK:STDOUT: %Class.decl.loc13: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.2: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.loc17_12.1: Class = param self // CHECK:STDOUT: @F.%self: Class = bind_name self, %self.loc17_12.1 -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc17_27.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc17_27.2: type = converted %bool.make_type, %.loc17_27.1 [template = bool] // CHECK:STDOUT: %b.loc17_24.1: bool = param b @@ -52,11 +52,11 @@ fn Class.F[self: Self](b: bool) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.loc14_8.1: Class = param self // CHECK:STDOUT: %self.loc14_8.2: Class = bind_name self, %self.loc14_8.1 -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc14_23.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc14_23.2: type = converted %bool.make_type, %.loc14_23.1 [template = bool] // CHECK:STDOUT: %b.loc14_20.1: bool = param b diff --git a/toolchain/check/testdata/class/reenter_scope.carbon b/toolchain/check/testdata/class/reenter_scope.carbon index ebf8f9a995c0..097ae30927d5 100644 --- a/toolchain/check/testdata/class/reenter_scope.carbon +++ b/toolchain/check/testdata/class/reenter_scope.carbon @@ -22,13 +22,13 @@ fn Class.F() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -39,11 +39,11 @@ fn Class.F() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_17.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc16_17.2: type = converted %int.make_type_32, %.loc16_17.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var @@ -51,14 +51,14 @@ fn Class.F() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_32.loc12, %.loc12_13.1 [template = i32] // CHECK:STDOUT: %return.var.loc12: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_13.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_13.2: type = converted %int.make_type_32.loc13, %.loc13_13.1 [template = i32] // CHECK:STDOUT: %return.var.loc13: ref i32 = var @@ -75,9 +75,9 @@ fn Class.F() -> i32 { // CHECK:STDOUT: fn @F() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %G.ref.loc17: G = name_ref G, @Class.%G.decl [template = constants.%struct.3] +// CHECK:STDOUT: %G.ref.loc17: = name_ref G, @Class.%G.decl [template = constants.%G] // CHECK:STDOUT: %G.call.loc17: init i32 = call %G.ref.loc17() -// CHECK:STDOUT: %G.ref.loc18: G = name_ref G, @Class.%G.decl [template = constants.%struct.3] +// CHECK:STDOUT: %G.ref.loc18: = name_ref G, @Class.%G.decl [template = constants.%G] // CHECK:STDOUT: %G.call.loc18: init i32 = call %G.ref.loc18() // CHECK:STDOUT: %.loc18_13.1: i32 = value_of_initializer %G.call.loc18 // CHECK:STDOUT: %.loc18_13.2: i32 = converted %G.call.loc18, %.loc18_13.1 diff --git a/toolchain/check/testdata/class/reorder.carbon b/toolchain/check/testdata/class/reorder.carbon index 9d117f533289..60ce50355e2c 100644 --- a/toolchain/check/testdata/class/reorder.carbon +++ b/toolchain/check/testdata/class/reorder.carbon @@ -22,13 +22,13 @@ class Class { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.2: G = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.3: F = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] // CHECK:STDOUT: } @@ -40,19 +40,19 @@ class Class { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_32.loc12, %.loc12_13.1 [template = i32] // CHECK:STDOUT: %return.var.loc12: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_13.1: type = value_of_initializer %int.make_type_32.loc16 [template = i32] // CHECK:STDOUT: %.loc16_13.2: type = converted %int.make_type_32.loc16, %.loc16_13.1 [template = i32] // CHECK:STDOUT: %return.var.loc16: ref i32 = var @@ -69,7 +69,7 @@ class Class { // CHECK:STDOUT: fn @G() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %F.ref: F = name_ref F, @Class.%F.decl [template = constants.%struct.3] +// CHECK:STDOUT: %F.ref: = name_ref F, @Class.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init i32 = call %F.ref() // CHECK:STDOUT: %.loc13_21.1: i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc13_21.2: i32 = converted %F.call, %.loc13_21.1 diff --git a/toolchain/check/testdata/class/reorder_qualified.carbon b/toolchain/check/testdata/class/reorder_qualified.carbon index 42f4c458353c..8259171cbf6d 100644 --- a/toolchain/check/testdata/class/reorder_qualified.carbon +++ b/toolchain/check/testdata/class/reorder_qualified.carbon @@ -52,40 +52,40 @@ class A { // CHECK:STDOUT: %A: type = class_type @A [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %BF: type = fn_type @BF [template] +// CHECK:STDOUT: %BF.type: type = fn_type @BF [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: BF = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] +// CHECK:STDOUT: %BF: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type B, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.b: i32} [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.3: F = struct_value () [template] -// CHECK:STDOUT: %DF: type = fn_type @DF [template] -// CHECK:STDOUT: %struct.4: DF = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %DF.type: type = fn_type @DF [template] +// CHECK:STDOUT: %DF: = struct_value () [template] // CHECK:STDOUT: %.4: type = unbound_element_type D, i32 [template] // CHECK:STDOUT: %.5: type = struct_type {.d: i32} [template] -// CHECK:STDOUT: %CF: type = fn_type @CF [template] -// CHECK:STDOUT: %struct.5: CF = struct_value () [template] +// CHECK:STDOUT: %CF.type: type = fn_type @CF [template] +// CHECK:STDOUT: %CF: = struct_value () [template] // CHECK:STDOUT: %.6: type = unbound_element_type C, i32 [template] // CHECK:STDOUT: %.7: type = struct_type {.c: i32} [template] -// CHECK:STDOUT: %AF: type = fn_type @AF [template] -// CHECK:STDOUT: %struct.6: AF = struct_value () [template] +// CHECK:STDOUT: %AF.type: type = fn_type @AF [template] +// CHECK:STDOUT: %AF: = struct_value () [template] // CHECK:STDOUT: %.8: type = unbound_element_type A, i32 [template] // CHECK:STDOUT: %.9: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %.10: type = ptr_type {.a: i32} [template] // CHECK:STDOUT: %.11: i32 = int_literal 1 [template] -// CHECK:STDOUT: %struct.7: A = struct_value (%.11) [template] +// CHECK:STDOUT: %struct.1: A = struct_value (%.11) [template] // CHECK:STDOUT: %.12: type = ptr_type {.b: i32} [template] // CHECK:STDOUT: %.13: i32 = int_literal 2 [template] -// CHECK:STDOUT: %struct.8: B = struct_value (%.13) [template] +// CHECK:STDOUT: %struct.2: B = struct_value (%.13) [template] // CHECK:STDOUT: %.14: type = ptr_type {.c: i32} [template] // CHECK:STDOUT: %.15: i32 = int_literal 3 [template] -// CHECK:STDOUT: %struct.9: C = struct_value (%.15) [template] +// CHECK:STDOUT: %struct.3: C = struct_value (%.15) [template] // CHECK:STDOUT: %.16: type = ptr_type {.d: i32} [template] // CHECK:STDOUT: %.17: i32 = int_literal 4 [template] -// CHECK:STDOUT: %struct.10: D = struct_value (%.17) [template] +// CHECK:STDOUT: %struct.4: D = struct_value (%.17) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -95,17 +95,17 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %AF.decl: AF = fn_decl @AF [template = constants.%struct.6] {} -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %AF.decl: = fn_decl @AF [template = constants.%AF] {} +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc46_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc46_10.2: type = converted %int.make_type_32, %.loc46_10.1 [template = i32] // CHECK:STDOUT: %.loc46_8: = field_decl a, element0 [template] @@ -119,8 +119,8 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %BF.decl: BF = fn_decl @BF [template = constants.%struct.1] {} -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %BF.decl: = fn_decl @BF [template = constants.%BF] {} +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_12.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc16_12.2: type = converted %int.make_type_32, %.loc16_12.1 [template = i32] // CHECK:STDOUT: %.loc16_10: = field_decl b, element0 [template] @@ -134,9 +134,9 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} -// CHECK:STDOUT: %DF.decl: DF = fn_decl @DF [template = constants.%struct.4] {} -// CHECK:STDOUT: %CF.decl: CF = fn_decl @CF [template = constants.%struct.5] {} -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %DF.decl: = fn_decl @DF [template = constants.%DF] {} +// CHECK:STDOUT: %CF.decl: = fn_decl @CF [template = constants.%CF] {} +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc42_12.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc42_12.2: type = converted %int.make_type_32, %.loc42_12.1 [template = i32] // CHECK:STDOUT: %.loc42_10: = field_decl c, element0 [template] @@ -149,9 +149,9 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.3] {} -// CHECK:STDOUT: %DF.decl: DF = fn_decl @DF [template = constants.%struct.4] {} -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %DF.decl: = fn_decl @DF [template = constants.%DF] {} +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc24_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc24_14.2: type = converted %int.make_type_32, %.loc24_14.1 [template = i32] // CHECK:STDOUT: %.loc24_12: = field_decl d, element0 [template] @@ -178,8 +178,8 @@ class A { // CHECK:STDOUT: %.loc29_25.1: {.a: i32} = struct_literal (%.loc29_24) // CHECK:STDOUT: %.loc29_25.2: ref i32 = class_element_access %a.var, element0 // CHECK:STDOUT: %.loc29_25.3: init i32 = initialize_from %.loc29_24 to %.loc29_25.2 [template = constants.%.11] -// CHECK:STDOUT: %.loc29_25.4: init A = class_init (%.loc29_25.3), %a.var [template = constants.%struct.7] -// CHECK:STDOUT: %.loc29_26: init A = converted %.loc29_25.1, %.loc29_25.4 [template = constants.%struct.7] +// CHECK:STDOUT: %.loc29_25.4: init A = class_init (%.loc29_25.3), %a.var [template = constants.%struct.1] +// CHECK:STDOUT: %.loc29_26: init A = converted %.loc29_25.1, %.loc29_25.4 [template = constants.%struct.1] // CHECK:STDOUT: assign %a.var, %.loc29_26 // CHECK:STDOUT: %B.ref: type = name_ref B, @A.%B.decl [template = constants.%B] // CHECK:STDOUT: %b.var: ref B = var b @@ -188,8 +188,8 @@ class A { // CHECK:STDOUT: %.loc30_25.1: {.b: i32} = struct_literal (%.loc30_24) // CHECK:STDOUT: %.loc30_25.2: ref i32 = class_element_access %b.var, element0 // CHECK:STDOUT: %.loc30_25.3: init i32 = initialize_from %.loc30_24 to %.loc30_25.2 [template = constants.%.13] -// CHECK:STDOUT: %.loc30_25.4: init B = class_init (%.loc30_25.3), %b.var [template = constants.%struct.8] -// CHECK:STDOUT: %.loc30_26: init B = converted %.loc30_25.1, %.loc30_25.4 [template = constants.%struct.8] +// CHECK:STDOUT: %.loc30_25.4: init B = class_init (%.loc30_25.3), %b.var [template = constants.%struct.2] +// CHECK:STDOUT: %.loc30_26: init B = converted %.loc30_25.1, %.loc30_25.4 [template = constants.%struct.2] // CHECK:STDOUT: assign %b.var, %.loc30_26 // CHECK:STDOUT: %C.ref: type = name_ref C, @B.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.var: ref C = var c @@ -198,8 +198,8 @@ class A { // CHECK:STDOUT: %.loc31_25.1: {.c: i32} = struct_literal (%.loc31_24) // CHECK:STDOUT: %.loc31_25.2: ref i32 = class_element_access %c.var, element0 // CHECK:STDOUT: %.loc31_25.3: init i32 = initialize_from %.loc31_24 to %.loc31_25.2 [template = constants.%.15] -// CHECK:STDOUT: %.loc31_25.4: init C = class_init (%.loc31_25.3), %c.var [template = constants.%struct.9] -// CHECK:STDOUT: %.loc31_26: init C = converted %.loc31_25.1, %.loc31_25.4 [template = constants.%struct.9] +// CHECK:STDOUT: %.loc31_25.4: init C = class_init (%.loc31_25.3), %c.var [template = constants.%struct.3] +// CHECK:STDOUT: %.loc31_26: init C = converted %.loc31_25.1, %.loc31_25.4 [template = constants.%struct.3] // CHECK:STDOUT: assign %c.var, %.loc31_26 // CHECK:STDOUT: %D.ref: type = name_ref D, @C.%D.decl [template = constants.%D] // CHECK:STDOUT: %d.var: ref D = var d @@ -208,16 +208,16 @@ class A { // CHECK:STDOUT: %.loc32_25.1: {.d: i32} = struct_literal (%.loc32_24) // CHECK:STDOUT: %.loc32_25.2: ref i32 = class_element_access %d.var, element0 // CHECK:STDOUT: %.loc32_25.3: init i32 = initialize_from %.loc32_24 to %.loc32_25.2 [template = constants.%.17] -// CHECK:STDOUT: %.loc32_25.4: init D = class_init (%.loc32_25.3), %d.var [template = constants.%struct.10] -// CHECK:STDOUT: %.loc32_26: init D = converted %.loc32_25.1, %.loc32_25.4 [template = constants.%struct.10] +// CHECK:STDOUT: %.loc32_25.4: init D = class_init (%.loc32_25.3), %d.var [template = constants.%struct.4] +// CHECK:STDOUT: %.loc32_26: init D = converted %.loc32_25.1, %.loc32_25.4 [template = constants.%struct.4] // CHECK:STDOUT: assign %d.var, %.loc32_26 -// CHECK:STDOUT: %AF.ref: AF = name_ref AF, @A.%AF.decl [template = constants.%struct.6] +// CHECK:STDOUT: %AF.ref: = name_ref AF, @A.%AF.decl [template = constants.%AF] // CHECK:STDOUT: %AF.call: init () = call %AF.ref() -// CHECK:STDOUT: %BF.ref: BF = name_ref BF, @B.%BF.decl [template = constants.%struct.1] +// CHECK:STDOUT: %BF.ref: = name_ref BF, @B.%BF.decl [template = constants.%BF] // CHECK:STDOUT: %BF.call: init () = call %BF.ref() -// CHECK:STDOUT: %CF.ref: CF = name_ref CF, @C.%CF.decl [template = constants.%struct.5] +// CHECK:STDOUT: %CF.ref: = name_ref CF, @C.%CF.decl [template = constants.%CF] // CHECK:STDOUT: %CF.call: init () = call %CF.ref() -// CHECK:STDOUT: %DF.ref: DF = name_ref DF, @D.%DF.decl [template = constants.%struct.4] +// CHECK:STDOUT: %DF.ref: = name_ref DF, @D.%DF.decl [template = constants.%DF] // CHECK:STDOUT: %DF.call: init () = call %DF.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/scope.carbon b/toolchain/check/testdata/class/scope.carbon index f039a405a2fd..17a3503ffd18 100644 --- a/toolchain/check/testdata/class/scope.carbon +++ b/toolchain/check/testdata/class/scope.carbon @@ -31,20 +31,20 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.4: F = struct_value () [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] // CHECK:STDOUT: %.4: i32 = int_literal 2 [template] -// CHECK:STDOUT: %Run: type = fn_type @Run [template] -// CHECK:STDOUT: %struct.5: Run = struct_value () [template] +// CHECK:STDOUT: %Run.type: type = fn_type @Run [template] +// CHECK:STDOUT: %Run: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -56,29 +56,29 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc21_11.2: type = converted %int.make_type_32, %.loc21_11.1 [template = i32] // CHECK:STDOUT: @F.2.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Run.decl: Run = fn_decl @Run [template = constants.%struct.5] {} -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] { +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_32.loc12, %.loc12_13.1 [template = i32] // CHECK:STDOUT: %return.var.loc12: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_13.1: type = value_of_initializer %int.make_type_32.loc16 [template = i32] // CHECK:STDOUT: %.loc16_13.2: type = converted %int.make_type_32.loc16, %.loc16_13.1 [template = i32] // CHECK:STDOUT: %return.var.loc16: ref i32 = var @@ -100,7 +100,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: F = name_ref F, @Class.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, @Class.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %F.call: init i32 = call %F.ref() // CHECK:STDOUT: %.loc17_15.1: i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc17_15.2: i32 = converted %F.call, %.loc17_15.1 @@ -115,21 +115,21 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32.loc26: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc26_10.1: type = value_of_initializer %int.make_type_32.loc26 [template = i32] // CHECK:STDOUT: %.loc26_10.2: type = converted %int.make_type_32.loc26, %.loc26_10.1 [template = i32] // CHECK:STDOUT: %a.var: ref i32 = var a // CHECK:STDOUT: %a: ref i32 = bind_name a, %a.var -// CHECK:STDOUT: %F.ref.loc26: F = name_ref F, file.%F.decl [template = constants.%struct.4] +// CHECK:STDOUT: %F.ref.loc26: = name_ref F, file.%F.decl [template = constants.%F.2] // CHECK:STDOUT: %F.call.loc26: init i32 = call %F.ref.loc26() // CHECK:STDOUT: assign %a.var, %F.call.loc26 -// CHECK:STDOUT: %int.make_type_32.loc27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc27_10.1: type = value_of_initializer %int.make_type_32.loc27 [template = i32] // CHECK:STDOUT: %.loc27_10.2: type = converted %int.make_type_32.loc27, %.loc27_10.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %F.ref.loc27: F = name_ref F, @Class.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref.loc27: = name_ref F, @Class.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %F.call.loc27: init i32 = call %F.ref.loc27() // CHECK:STDOUT: assign %b.var, %F.call.loc27 // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/class/self.carbon b/toolchain/check/testdata/class/self.carbon index ec1113eeb974..e049344fc7a7 100644 --- a/toolchain/check/testdata/class/self.carbon +++ b/toolchain/check/testdata/class/self.carbon @@ -27,14 +27,14 @@ fn Class.G[addr self: Self*]() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: type = ptr_type Class [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.3: type = unbound_element_type Class, i32 [template] // CHECK:STDOUT: %.4: type = struct_type {.n: i32} [template] // CHECK:STDOUT: %.5: type = ptr_type {.n: i32} [template] @@ -47,27 +47,27 @@ fn Class.G[addr self: Self*]() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc18: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.loc18_12.1: Class = param self // CHECK:STDOUT: @F.%self: Class = bind_name self, %self.loc18_12.1 -// CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_29.1: type = value_of_initializer %int.make_type_32.loc18 [template = i32] // CHECK:STDOUT: %.loc18_29.2: type = converted %int.make_type_32.loc18, %.loc18_29.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref.loc22: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %.loc22_27: type = ptr_type Class [template = constants.%.2] // CHECK:STDOUT: %self.loc22_17.1: Class* = param self // CHECK:STDOUT: @G.%self: Class* = bind_name self, %self.loc22_17.1 // CHECK:STDOUT: @G.%.loc22: Class* = addr_pattern @G.%self -// CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_35.1: type = value_of_initializer %int.make_type_32.loc22 [template = i32] // CHECK:STDOUT: %.loc22_35.2: type = converted %int.make_type_32.loc22, %.loc22_35.1 [template = i32] // CHECK:STDOUT: @G.%return: ref i32 = var @@ -75,27 +75,27 @@ fn Class.G[addr self: Self*]() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.loc12_8.1: Class = param self // CHECK:STDOUT: %self.loc12_8.2: Class = bind_name self, %self.loc12_8.1 -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_25.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_25.2: type = converted %int.make_type_32.loc12, %.loc12_25.1 [template = i32] // CHECK:STDOUT: %return.var.loc12: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %.loc13_23: type = ptr_type Class [template = constants.%.2] // CHECK:STDOUT: %self.loc13_13.1: Class* = param self // CHECK:STDOUT: %self.loc13_13.3: Class* = bind_name self, %self.loc13_13.1 // CHECK:STDOUT: %.loc13_8: Class* = addr_pattern %self.loc13_13.3 -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_32.loc13, %.loc13_31.1 [template = i32] // CHECK:STDOUT: %return.var.loc13: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_10.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_10.2: type = converted %int.make_type_32.loc15, %.loc15_10.1 [template = i32] // CHECK:STDOUT: %.loc15_8: = field_decl n, element0 [template] diff --git a/toolchain/check/testdata/class/self_conversion.carbon b/toolchain/check/testdata/class/self_conversion.carbon index 52f096a697e0..a31149bb5ebc 100644 --- a/toolchain/check/testdata/class/self_conversion.carbon +++ b/toolchain/check/testdata/class/self_conversion.carbon @@ -36,24 +36,24 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type Base, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] // CHECK:STDOUT: %.4: type = ptr_type {.a: i32} [template] // CHECK:STDOUT: %.5: type = unbound_element_type Derived, Base [template] -// CHECK:STDOUT: %SelfBase: type = fn_type @SelfBase [template] -// CHECK:STDOUT: %struct.2: SelfBase = struct_value () [template] +// CHECK:STDOUT: %SelfBase.type: type = fn_type @SelfBase [template] +// CHECK:STDOUT: %SelfBase: = struct_value () [template] // CHECK:STDOUT: %.6: type = ptr_type Base [template] -// CHECK:STDOUT: %AddrSelfBase: type = fn_type @AddrSelfBase [template] -// CHECK:STDOUT: %struct.3: AddrSelfBase = struct_value () [template] +// CHECK:STDOUT: %AddrSelfBase.type: type = fn_type @AddrSelfBase [template] +// CHECK:STDOUT: %AddrSelfBase: = struct_value () [template] // CHECK:STDOUT: %.7: type = struct_type {.base: Base} [template] // CHECK:STDOUT: %.8: i32 = int_literal 1 [template] // CHECK:STDOUT: %.9: type = ptr_type Derived [template] -// CHECK:STDOUT: %Call: type = fn_type @Call [template] -// CHECK:STDOUT: %struct.4: Call = struct_value () [template] +// CHECK:STDOUT: %Call.type: type = fn_type @Call [template] +// CHECK:STDOUT: %Call: = struct_value () [template] // CHECK:STDOUT: %.10: type = struct_type {.base: {.a: i32}*} [template] // CHECK:STDOUT: %.11: type = ptr_type {.base: Base} [template] // CHECK:STDOUT: } @@ -67,33 +67,33 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Base.decl: type = class_decl @Base [template = constants.%Base] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [template = constants.%Derived] {} -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %SelfBase.decl: SelfBase = fn_decl @SelfBase [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %SelfBase.decl: = fn_decl @SelfBase [template = constants.%SelfBase] { // CHECK:STDOUT: %Base.ref.loc22: type = name_ref Base, %Base.decl [template = constants.%Base] // CHECK:STDOUT: %self.loc22_21.1: Base = param self // CHECK:STDOUT: @SelfBase.%self: Base = bind_name self, %self.loc22_21.1 -// CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_38.1: type = value_of_initializer %int.make_type_32.loc22 [template = i32] // CHECK:STDOUT: %.loc22_38.2: type = converted %int.make_type_32.loc22, %.loc22_38.1 [template = i32] // CHECK:STDOUT: @SelfBase.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %AddrSelfBase.decl: AddrSelfBase = fn_decl @AddrSelfBase [template = constants.%struct.3] { +// CHECK:STDOUT: %AddrSelfBase.decl: = fn_decl @AddrSelfBase [template = constants.%AddrSelfBase] { // CHECK:STDOUT: %Base.ref.loc26: type = name_ref Base, %Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc26_40: type = ptr_type Base [template = constants.%.6] // CHECK:STDOUT: %self.loc26_30.1: Base* = param self // CHECK:STDOUT: @AddrSelfBase.%self: Base* = bind_name self, %self.loc26_30.1 // CHECK:STDOUT: @AddrSelfBase.%.loc26: Base* = addr_pattern @AddrSelfBase.%self // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Call.decl: Call = fn_decl @Call [template = constants.%struct.4] { +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Call.decl: = fn_decl @Call [template = constants.%Call] { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, %Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %.loc30_19: type = ptr_type Derived [template = constants.%.9] // CHECK:STDOUT: %p.loc30_9.1: Derived* = param p // CHECK:STDOUT: @Call.%p: Derived* = bind_name p, %p.loc30_9.1 -// CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc30_25.1: type = value_of_initializer %int.make_type_32.loc30 [template = i32] // CHECK:STDOUT: %.loc30_25.2: type = converted %int.make_type_32.loc30, %.loc30_25.1 [template = i32] // CHECK:STDOUT: @Call.%return: ref i32 = var @@ -101,7 +101,7 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %.loc12_8: = field_decl a, element0 [template] @@ -114,16 +114,16 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref.loc16: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc16: = base_decl Base, element0 [template] -// CHECK:STDOUT: %SelfBase.decl: SelfBase = fn_decl @SelfBase [template = constants.%struct.2] { +// CHECK:STDOUT: %SelfBase.decl: = fn_decl @SelfBase [template = constants.%SelfBase] { // CHECK:STDOUT: %Base.ref.loc18: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %self.loc18_15.1: Base = param self // CHECK:STDOUT: %self.loc18_15.2: Base = bind_name self, %self.loc18_15.1 -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_32.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc18_32.2: type = converted %int.make_type_32, %.loc18_32.1 [template = i32] // CHECK:STDOUT: %return.var: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %AddrSelfBase.decl: AddrSelfBase = fn_decl @AddrSelfBase [template = constants.%struct.3] { +// CHECK:STDOUT: %AddrSelfBase.decl: = fn_decl @AddrSelfBase [template = constants.%AddrSelfBase] { // CHECK:STDOUT: %Base.ref.loc19: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc19_34: type = ptr_type Base [template = constants.%.6] // CHECK:STDOUT: %self.loc19_24.1: Base* = param self @@ -165,7 +165,7 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref.loc31: Derived* = name_ref p, %p // CHECK:STDOUT: %.loc31_4.1: ref Derived = deref %p.ref.loc31 -// CHECK:STDOUT: %AddrSelfBase.ref: AddrSelfBase = name_ref AddrSelfBase, @Derived.%AddrSelfBase.decl [template = constants.%struct.3] +// CHECK:STDOUT: %AddrSelfBase.ref: = name_ref AddrSelfBase, @Derived.%AddrSelfBase.decl [template = constants.%AddrSelfBase] // CHECK:STDOUT: %.loc31_7: = bound_method %.loc31_4.1, %AddrSelfBase.ref // CHECK:STDOUT: %.loc31_4.2: Derived* = addr_of %.loc31_4.1 // CHECK:STDOUT: %.loc31_20.1: ref Derived = deref %.loc31_4.2 @@ -175,7 +175,7 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %AddrSelfBase.call: init () = call %.loc31_7(%.loc31_20.4) // CHECK:STDOUT: %p.ref.loc32: Derived* = name_ref p, %p // CHECK:STDOUT: %.loc32_11: ref Derived = deref %p.ref.loc32 -// CHECK:STDOUT: %SelfBase.ref: SelfBase = name_ref SelfBase, @Derived.%SelfBase.decl [template = constants.%struct.2] +// CHECK:STDOUT: %SelfBase.ref: = name_ref SelfBase, @Derived.%SelfBase.decl [template = constants.%SelfBase] // CHECK:STDOUT: %.loc32_14: = bound_method %.loc32_11, %SelfBase.ref // CHECK:STDOUT: %.loc32_23.1: ref Base = class_element_access %.loc32_11, element0 // CHECK:STDOUT: %.loc32_23.2: ref Base = converted %.loc32_11, %.loc32_23.1 diff --git a/toolchain/check/testdata/class/self_type.carbon b/toolchain/check/testdata/class/self_type.carbon index d1ca5371fbe1..d7a4b3eeb6d2 100644 --- a/toolchain/check/testdata/class/self_type.carbon +++ b/toolchain/check/testdata/class/self_type.carbon @@ -26,13 +26,13 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %Make: type = fn_type @Make [template] -// CHECK:STDOUT: %struct.3: Make = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %Make.type: type = fn_type @Make [template] +// CHECK:STDOUT: %Make: = struct_value () [template] // CHECK:STDOUT: %.2: type = ptr_type Class [template] // CHECK:STDOUT: %.3: type = unbound_element_type Class, Class* [template] // CHECK:STDOUT: %.4: type = struct_type {.p: Class*} [template] @@ -46,13 +46,13 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.loc21_12.1: Class = param self // CHECK:STDOUT: @F.%self: Class = bind_name self, %self.loc21_12.1 -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_29.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc21_29.2: type = converted %int.make_type_32, %.loc21_29.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var @@ -60,16 +60,16 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.loc12_8.1: Class = param self // CHECK:STDOUT: %self.loc12_8.2: Class = bind_name self, %self.loc12_8.1 -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_25.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_25.2: type = converted %int.make_type_32, %.loc12_25.1 [template = i32] // CHECK:STDOUT: %return.var.loc12: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Make.decl: Make = fn_decl @Make [template = constants.%struct.3] { +// CHECK:STDOUT: %Make.decl: = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %return.var.loc13: ref Class = var // CHECK:STDOUT: } @@ -93,7 +93,7 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: %.loc22_16.1: ref Class* = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc22_16.2: Class* = bind_value %.loc22_16.1 // CHECK:STDOUT: %.loc22_11.1: ref Class = deref %.loc22_16.2 -// CHECK:STDOUT: %F.ref: F = name_ref F, @Class.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, @Class.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc22_19: = bound_method %.loc22_11.1, %F.ref // CHECK:STDOUT: %.loc22_11.2: Class = bind_value %.loc22_11.1 // CHECK:STDOUT: %F.call: init i32 = call %.loc22_19(%.loc22_11.2) diff --git a/toolchain/check/testdata/class/static_method.carbon b/toolchain/check/testdata/class/static_method.carbon index 132d9012267a..260b54054bb6 100644 --- a/toolchain/check/testdata/class/static_method.carbon +++ b/toolchain/check/testdata/class/static_method.carbon @@ -21,14 +21,14 @@ fn Run() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %Run: type = fn_type @Run [template] -// CHECK:STDOUT: %struct.3: Run = struct_value () [template] +// CHECK:STDOUT: %Run.type: type = fn_type @Run [template] +// CHECK:STDOUT: %Run: = struct_value () [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -40,10 +40,10 @@ fn Run() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Run.decl: Run = fn_decl @Run [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc15_13.2: type = converted %int.make_type_32, %.loc15_13.1 [template = i32] // CHECK:STDOUT: @Run.%return: ref i32 = var @@ -51,8 +51,8 @@ fn Run() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_32, %.loc12_13.1 [template = i32] // CHECK:STDOUT: %return.var: ref i32 = var @@ -73,7 +73,7 @@ fn Run() -> i32 { // CHECK:STDOUT: %c.var: ref Class = var c // CHECK:STDOUT: %c: ref Class = bind_name c, %c.var // CHECK:STDOUT: %c.ref: ref Class = name_ref c, %c -// CHECK:STDOUT: %F.ref: F = name_ref F, @Class.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, @Class.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init i32 = call %F.ref() // CHECK:STDOUT: %.loc17_15.1: i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc17_15.2: i32 = converted %F.call, %.loc17_15.1 diff --git a/toolchain/check/testdata/const/basic.carbon b/toolchain/check/testdata/const/basic.carbon index 5fd570d7736c..79eeafd2699c 100644 --- a/toolchain/check/testdata/const/basic.carbon +++ b/toolchain/check/testdata/const/basic.carbon @@ -19,18 +19,18 @@ fn B(p: const (i32*)) -> const (i32*) { // CHECK:STDOUT: --- basic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = const_type i32 [template] // CHECK:STDOUT: %.3: type = ptr_type const i32 [template] // CHECK:STDOUT: %.4: type = ptr_type const i32* [template] -// CHECK:STDOUT: %A: type = fn_type @A [template] -// CHECK:STDOUT: %struct.2: A = struct_value () [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: %.5: type = ptr_type i32 [template] // CHECK:STDOUT: %.6: type = const_type i32* [template] -// CHECK:STDOUT: %B: type = fn_type @B [template] -// CHECK:STDOUT: %struct.3: B = struct_value () [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] +// CHECK:STDOUT: %B: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -40,10 +40,10 @@ fn B(p: const (i32*)) -> const (i32*) { // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11_15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] { +// CHECK:STDOUT: %int.make_type_32.loc11_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32.loc11_15 [template = i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32.loc11_15, %.loc11_9.1 [template = i32] // CHECK:STDOUT: %.loc11_9.3: type = const_type i32 [template = constants.%.2] @@ -51,7 +51,7 @@ fn B(p: const (i32*)) -> const (i32*) { // CHECK:STDOUT: %.loc11_19: type = ptr_type const i32* [template = constants.%.4] // CHECK:STDOUT: %p.loc11_6.1: const i32** = param p // CHECK:STDOUT: @A.%p: const i32** = bind_name p, %p.loc11_6.1 -// CHECK:STDOUT: %int.make_type_32.loc11_31: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_31: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_25.1: type = value_of_initializer %int.make_type_32.loc11_31 [template = i32] // CHECK:STDOUT: %.loc11_25.2: type = converted %int.make_type_32.loc11_31, %.loc11_25.1 [template = i32] // CHECK:STDOUT: %.loc11_25.3: type = const_type i32 [template = constants.%.2] @@ -59,17 +59,17 @@ fn B(p: const (i32*)) -> const (i32*) { // CHECK:STDOUT: %.loc11_35: type = ptr_type const i32* [template = constants.%.4] // CHECK:STDOUT: @A.%return: ref const i32** = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %B.decl: B = fn_decl @B [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc15_16: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %int.make_type_32.loc15_16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_19.1: type = value_of_initializer %int.make_type_32.loc15_16 [template = i32] // CHECK:STDOUT: %.loc15_19.2: type = converted %int.make_type_32.loc15_16, %.loc15_19.1 [template = i32] // CHECK:STDOUT: %.loc15_19.3: type = ptr_type i32 [template = constants.%.5] // CHECK:STDOUT: %.loc15_9: type = const_type i32* [template = constants.%.6] // CHECK:STDOUT: %p.loc15_6.1: const (i32*) = param p // CHECK:STDOUT: @B.%p: const (i32*) = bind_name p, %p.loc15_6.1 -// CHECK:STDOUT: %int.make_type_32.loc15_33: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc15_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_36.1: type = value_of_initializer %int.make_type_32.loc15_33 [template = i32] // CHECK:STDOUT: %.loc15_36.2: type = converted %int.make_type_32.loc15_33, %.loc15_36.1 [template = i32] // CHECK:STDOUT: %.loc15_36.3: type = ptr_type i32 [template = constants.%.5] diff --git a/toolchain/check/testdata/const/collapse.carbon b/toolchain/check/testdata/const/collapse.carbon index 8c4268ce520f..f147f3513f4b 100644 --- a/toolchain/check/testdata/const/collapse.carbon +++ b/toolchain/check/testdata/const/collapse.carbon @@ -19,14 +19,14 @@ fn F(p: const i32**) -> const (const i32)** { // CHECK:STDOUT: --- collapse.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = const_type i32 [template] // CHECK:STDOUT: %.3: type = ptr_type const i32 [template] // CHECK:STDOUT: %.4: type = ptr_type const i32* [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -35,10 +35,10 @@ fn F(p: const i32**) -> const (const i32)** { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc15_15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc15_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_9.1: type = value_of_initializer %int.make_type_32.loc15_15 [template = i32] // CHECK:STDOUT: %.loc15_9.2: type = converted %int.make_type_32.loc15_15, %.loc15_9.1 [template = i32] // CHECK:STDOUT: %.loc15_9.3: type = const_type i32 [template = constants.%.2] @@ -46,7 +46,7 @@ fn F(p: const i32**) -> const (const i32)** { // CHECK:STDOUT: %.loc15_19: type = ptr_type const i32* [template = constants.%.4] // CHECK:STDOUT: %p.loc15_6.1: const i32** = param p // CHECK:STDOUT: @F.%p: const i32** = bind_name p, %p.loc15_6.1 -// CHECK:STDOUT: %int.make_type_32.loc15_38: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc15_38: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_32.1: type = value_of_initializer %int.make_type_32.loc15_38 [template = i32] // CHECK:STDOUT: %.loc15_32.2: type = converted %int.make_type_32.loc15_38, %.loc15_32.1 [template = i32] // CHECK:STDOUT: %.loc15_32.3: type = const_type i32 [template = constants.%.2] diff --git a/toolchain/check/testdata/const/fail_collapse.carbon b/toolchain/check/testdata/const/fail_collapse.carbon index eda928aacef6..f9a982fb5c50 100644 --- a/toolchain/check/testdata/const/fail_collapse.carbon +++ b/toolchain/check/testdata/const/fail_collapse.carbon @@ -22,16 +22,16 @@ fn G(p: const (const i32)**) -> i32** { // CHECK:STDOUT: --- fail_collapse.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = const_type i32 [template] // CHECK:STDOUT: %.3: type = ptr_type const i32 [template] // CHECK:STDOUT: %.4: type = ptr_type const i32* [template] // CHECK:STDOUT: %.5: type = ptr_type i32 [template] // CHECK:STDOUT: %.6: type = ptr_type i32* [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.2: G = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -40,10 +40,10 @@ fn G(p: const (const i32)**) -> i32** { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc15_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %int.make_type_32.loc15_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_16.1: type = value_of_initializer %int.make_type_32.loc15_22 [template = i32] // CHECK:STDOUT: %.loc15_16.2: type = converted %int.make_type_32.loc15_22, %.loc15_16.1 [template = i32] // CHECK:STDOUT: %.loc15_16.3: type = const_type i32 [template = constants.%.2] @@ -52,7 +52,7 @@ fn G(p: const (const i32)**) -> i32** { // CHECK:STDOUT: %.loc15_27: type = ptr_type const i32* [template = constants.%.4] // CHECK:STDOUT: %p.loc15_6.1: const i32** = param p // CHECK:STDOUT: @G.%p: const i32** = bind_name p, %p.loc15_6.1 -// CHECK:STDOUT: %int.make_type_32.loc15_33: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc15_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_36.1: type = value_of_initializer %int.make_type_32.loc15_33 [template = i32] // CHECK:STDOUT: %.loc15_36.2: type = converted %int.make_type_32.loc15_33, %.loc15_36.1 [template = i32] // CHECK:STDOUT: %.loc15_36.3: type = ptr_type i32 [template = constants.%.5] diff --git a/toolchain/check/testdata/const/import.carbon b/toolchain/check/testdata/const/import.carbon index 4bc981f21a21..6ae2f9e87132 100644 --- a/toolchain/check/testdata/const/import.carbon +++ b/toolchain/check/testdata/const/import.carbon @@ -29,12 +29,12 @@ var a_ptr: const i32* = a_ptr_ref; // CHECK:STDOUT: --- implicit.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = const_type i32 [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.3: type = ptr_type const i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -46,23 +46,23 @@ var a_ptr: const i32* = a_ptr_ref; // CHECK:STDOUT: .a_ptr_ref = %a_ptr_ref // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4, %.loc4_11.1 [template = i32] // CHECK:STDOUT: %.loc4_11.3: type = const_type i32 [template = constants.%.2] // CHECK:STDOUT: @F.%return: ref const i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_12.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_12.2: type = converted %int.make_type_32.loc6, %.loc6_12.1 [template = i32] // CHECK:STDOUT: %.loc6_12.3: type = const_type i32 [template = constants.%.2] // CHECK:STDOUT: %a_ref.var: ref const i32 = var a_ref // CHECK:STDOUT: %a_ref: ref const i32 = bind_name a_ref, %a_ref.var -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_16.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_16.2: type = converted %int.make_type_32.loc7, %.loc7_16.1 [template = i32] // CHECK:STDOUT: %.loc7_16.3: type = const_type i32 [template = constants.%.2] @@ -77,7 +77,7 @@ var a_ptr: const i32* = a_ptr_ref; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init const i32 = call %F.ref() // CHECK:STDOUT: assign file.%a_ref.var, %F.call // CHECK:STDOUT: %a_ref.ref: ref const i32 = name_ref a_ref, file.%a_ref @@ -89,9 +89,9 @@ var a_ptr: const i32* = a_ptr_ref; // CHECK:STDOUT: --- implicit.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = const_type i32 [template] // CHECK:STDOUT: %.3: type = ptr_type const i32 [template] // CHECK:STDOUT: } @@ -109,16 +109,16 @@ var a_ptr: const i32* = a_ptr_ref; // CHECK:STDOUT: %import_ref.2: ref const i32 = import_ref ir0, inst+23, loaded // CHECK:STDOUT: %import_ref.3: ref const i32* = import_ref ir0, inst+35, loaded // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_32.loc6, %.loc6_8.1 [template = i32] // CHECK:STDOUT: %.loc6_8.3: type = const_type i32 [template = constants.%.2] // CHECK:STDOUT: %.loc6_17: type = ptr_type const i32 [template = constants.%.3] // CHECK:STDOUT: %a.var: ref const i32* = var a // CHECK:STDOUT: %a: ref const i32* = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_12.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_12.2: type = converted %int.make_type_32.loc7, %.loc7_12.1 [template = i32] // CHECK:STDOUT: %.loc7_12.3: type = const_type i32 [template = constants.%.2] diff --git a/toolchain/check/testdata/eval/aggregate.carbon b/toolchain/check/testdata/eval/aggregate.carbon index a0589434f279..250085a8db77 100644 --- a/toolchain/check/testdata/eval/aggregate.carbon +++ b/toolchain/check/testdata/eval/aggregate.carbon @@ -19,9 +19,9 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: --- aggregate.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %.4: type = ptr_type (i32, i32) [template] @@ -34,8 +34,8 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %.10: type = struct_type {.c: i32, .b: i32, .a: i32} [template] // CHECK:STDOUT: %.11: type = struct_type {.b: i32, .a: i32, .c: i32} [template] // CHECK:STDOUT: %.12: type = ptr_type {.b: i32, .a: i32, .c: i32} [template] -// CHECK:STDOUT: %struct.2: {.b: i32, .a: i32, .c: i32} = struct_value (%.6, %.5, %.9) [template] -// CHECK:STDOUT: %struct.3: {.a: i32, .b: i32, .c: i32} = struct_value (%.5, %.6, %.9) [template] +// CHECK:STDOUT: %struct.1: {.b: i32, .a: i32, .c: i32} = struct_value (%.6, %.5, %.9) [template] +// CHECK:STDOUT: %struct.2: {.a: i32, .b: i32, .c: i32} = struct_value (%.5, %.6, %.9) [template] // CHECK:STDOUT: %.13: type = array_type %.5, i32 [template] // CHECK:STDOUT: %.14: type = ptr_type [i32; 1] [template] // CHECK:STDOUT: %.15: i32 = int_literal 0 [template] @@ -49,7 +49,7 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %array: [i32; 1] = tuple_value (%.15) [template] // CHECK:STDOUT: %.22: type = struct_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %.23: type = ptr_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %struct.4: {.a: i32, .b: i32} = struct_value (%.9, %.5) [template] +// CHECK:STDOUT: %struct.3: {.a: i32, .b: i32} = struct_value (%.9, %.5) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -61,10 +61,10 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: .struct_access = %struct_access // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc11_18: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc11_23: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_18: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_26.1: (type, type) = tuple_literal (%int.make_type_32.loc11_18, %int.make_type_32.loc11_23) // CHECK:STDOUT: %.loc11_26.2: type = value_of_initializer %int.make_type_32.loc11_18 [template = i32] // CHECK:STDOUT: %.loc11_26.3: type = converted %int.make_type_32.loc11_18, %.loc11_26.2 [template = i32] @@ -73,44 +73,44 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %.loc11_26.6: type = converted %.loc11_26.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %tuple_copy.var: ref (i32, i32) = var tuple_copy // CHECK:STDOUT: %tuple_copy: ref (i32, i32) = bind_name tuple_copy, %tuple_copy.var -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc13_23: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc13_23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %int.make_type_32.loc13_23 [template = i32] // CHECK:STDOUT: %.loc13_23.2: type = converted %int.make_type_32.loc13_23, %.loc13_23.1 [template = i32] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc13_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc13_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_32.1: type = value_of_initializer %int.make_type_32.loc13_32 [template = i32] // CHECK:STDOUT: %.loc13_32.2: type = converted %int.make_type_32.loc13_32, %.loc13_32.1 [template = i32] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc13_41: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc13_41: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_41.1: type = value_of_initializer %int.make_type_32.loc13_41 [template = i32] // CHECK:STDOUT: %.loc13_41.2: type = converted %int.make_type_32.loc13_41, %.loc13_41.1 [template = i32] // CHECK:STDOUT: %.loc13_44: type = struct_type {.a: i32, .b: i32, .c: i32} [template = constants.%.7] // CHECK:STDOUT: %struct_copy.var: ref {.a: i32, .b: i32, .c: i32} = var struct_copy // CHECK:STDOUT: %struct_copy: ref {.a: i32, .b: i32, .c: i32} = bind_name struct_copy, %struct_copy.var -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.9: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.10: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.11: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_24: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc15_19.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_19.2: type = converted %int.make_type_32.loc15, %.loc15_19.1 [template = i32] // CHECK:STDOUT: %.loc15_25: type = array_type %.loc15_24, i32 [template = constants.%.13] // CHECK:STDOUT: %tuple_index.var: ref [i32; 1] = var tuple_index // CHECK:STDOUT: %tuple_index: ref [i32; 1] = bind_name tuple_index, %tuple_index.var -// CHECK:STDOUT: %import_ref.12: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.13: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_26: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc17_21.1: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_21.2: type = converted %int.make_type_32.loc17, %.loc17_21.1 [template = i32] // CHECK:STDOUT: %.loc17_27: type = array_type %.loc17_26, i32 [template = constants.%.13] // CHECK:STDOUT: %struct_access.var: ref [i32; 1] = var struct_access // CHECK:STDOUT: %struct_access: ref [i32; 1] = bind_name struct_access, %struct_access.var -// CHECK:STDOUT: %import_ref.14: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.14: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -120,8 +120,8 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %.loc11_31: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc11_34: i32 = int_literal 2 [template = constants.%.6] // CHECK:STDOUT: %.loc11_35.1: (i32, i32) = tuple_literal (%.loc11_31, %.loc11_34) -// CHECK:STDOUT: %int.make_type_32.loc11_41: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc11_46: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_41: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_46: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_49.1: (type, type) = tuple_literal (%int.make_type_32.loc11_41, %int.make_type_32.loc11_46) // CHECK:STDOUT: %.loc11_49.2: type = value_of_initializer %int.make_type_32.loc11_41 [template = i32] // CHECK:STDOUT: %.loc11_49.3: type = converted %int.make_type_32.loc11_41, %.loc11_49.2 [template = i32] @@ -139,18 +139,18 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %.loc13_62: i32 = int_literal 2 [template = constants.%.6] // CHECK:STDOUT: %.loc13_70: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc13_71: {.c: i32, .b: i32, .a: i32} = struct_literal (%.loc13_54, %.loc13_62, %.loc13_70) -// CHECK:STDOUT: %int.make_type_32.loc13_81: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13_81: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_81.1: type = value_of_initializer %int.make_type_32.loc13_81 [template = i32] // CHECK:STDOUT: %.loc13_81.2: type = converted %int.make_type_32.loc13_81, %.loc13_81.1 [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc13_90: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13_90: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_90.1: type = value_of_initializer %int.make_type_32.loc13_90 [template = i32] // CHECK:STDOUT: %.loc13_90.2: type = converted %int.make_type_32.loc13_90, %.loc13_90.1 [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc13_99: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13_99: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_99.1: type = value_of_initializer %int.make_type_32.loc13_99 [template = i32] // CHECK:STDOUT: %.loc13_99.2: type = converted %int.make_type_32.loc13_99, %.loc13_99.1 [template = i32] // CHECK:STDOUT: %.loc13_102: type = struct_type {.b: i32, .a: i32, .c: i32} [template = constants.%.11] -// CHECK:STDOUT: %struct.loc13: {.b: i32, .a: i32, .c: i32} = struct_value (%.loc13_62, %.loc13_70, %.loc13_54) [template = constants.%struct.2] -// CHECK:STDOUT: %.loc13_73.1: {.b: i32, .a: i32, .c: i32} = converted %.loc13_71, %struct.loc13 [template = constants.%struct.2] +// CHECK:STDOUT: %struct.loc13: {.b: i32, .a: i32, .c: i32} = struct_value (%.loc13_62, %.loc13_70, %.loc13_54) [template = constants.%struct.1] +// CHECK:STDOUT: %.loc13_73.1: {.b: i32, .a: i32, .c: i32} = converted %.loc13_71, %struct.loc13 [template = constants.%struct.1] // CHECK:STDOUT: %.loc13_73.2: i32 = struct_access %.loc13_73.1, element1 [template = constants.%.5] // CHECK:STDOUT: %.loc13_73.3: ref i32 = struct_access file.%struct_copy.var, element1 // CHECK:STDOUT: %.loc13_73.4: init i32 = initialize_from %.loc13_73.2 to %.loc13_73.3 [template = constants.%.5] @@ -160,12 +160,12 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %.loc13_73.8: i32 = struct_access %.loc13_73.1, element2 [template = constants.%.9] // CHECK:STDOUT: %.loc13_73.9: ref i32 = struct_access file.%struct_copy.var, element2 // CHECK:STDOUT: %.loc13_73.10: init i32 = initialize_from %.loc13_73.8 to %.loc13_73.9 [template = constants.%.9] -// CHECK:STDOUT: %.loc13_73.11: init {.a: i32, .b: i32, .c: i32} = struct_init (%.loc13_73.4, %.loc13_73.7, %.loc13_73.10) to file.%struct_copy.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc13_103: init {.a: i32, .b: i32, .c: i32} = converted %.loc13_73.1, %.loc13_73.11 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc13_73.11: init {.a: i32, .b: i32, .c: i32} = struct_init (%.loc13_73.4, %.loc13_73.7, %.loc13_73.10) to file.%struct_copy.var [template = constants.%struct.2] +// CHECK:STDOUT: %.loc13_103: init {.a: i32, .b: i32, .c: i32} = converted %.loc13_73.1, %.loc13_73.11 [template = constants.%struct.2] // CHECK:STDOUT: assign file.%struct_copy.var, %.loc13_103 // CHECK:STDOUT: %.loc15_30: i32 = int_literal 0 [template = constants.%.15] // CHECK:STDOUT: %.loc15_32.1: (i32,) = tuple_literal (%.loc15_30) -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_44: i32 = int_literal 5 [template = constants.%.17] // CHECK:STDOUT: %.loc15_47: i32 = int_literal 7 [template = constants.%.18] // CHECK:STDOUT: %.loc15_50: i32 = int_literal 1 [template = constants.%.5] @@ -187,12 +187,12 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: assign file.%tuple_index.var, %.loc15_34 // CHECK:STDOUT: %.loc17_32: i32 = int_literal 0 [template = constants.%.15] // CHECK:STDOUT: %.loc17_34.1: (i32,) = tuple_literal (%.loc17_32) -// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_51: i32 = int_literal 3 [template = constants.%.9] // CHECK:STDOUT: %.loc17_59: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc17_60.1: {.a: i32, .b: i32} = struct_literal (%.loc17_51, %.loc17_59) -// CHECK:STDOUT: %struct.loc17: {.a: i32, .b: i32} = struct_value (%.loc17_51, %.loc17_59) [template = constants.%struct.4] -// CHECK:STDOUT: %.loc17_60.2: {.a: i32, .b: i32} = converted %.loc17_60.1, %struct.loc17 [template = constants.%struct.4] +// CHECK:STDOUT: %struct.loc17: {.a: i32, .b: i32} = struct_value (%.loc17_51, %.loc17_59) [template = constants.%struct.3] +// CHECK:STDOUT: %.loc17_60.2: {.a: i32, .b: i32} = converted %.loc17_60.1, %struct.loc17 [template = constants.%struct.3] // CHECK:STDOUT: %.loc17_61: i32 = struct_access %.loc17_60.2, element1 [template = constants.%.5] // CHECK:STDOUT: %.loc17_40.1: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_40.2: type = converted %int.make_type_32.loc17, %.loc17_40.1 [template = i32] diff --git a/toolchain/check/testdata/eval/fail_aggregate.carbon b/toolchain/check/testdata/eval/fail_aggregate.carbon index 2a9ca2774d29..0e0f44d46921 100644 --- a/toolchain/check/testdata/eval/fail_aggregate.carbon +++ b/toolchain/check/testdata/eval/fail_aggregate.carbon @@ -18,9 +18,9 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: --- fail_aggregate.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] // CHECK:STDOUT: %.4: type = ptr_type [i32; 1] [template] @@ -44,16 +44,16 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: .array_index = %array_index // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_24: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_32, %.loc16_19.1 [template = i32] // CHECK:STDOUT: %.loc16_25: type = array_type %.loc16_24, i32 [template = constants.%.3] // CHECK:STDOUT: %array_index.var: ref [i32; 1] = var array_index // CHECK:STDOUT: %array_index: ref [i32; 1] = bind_name array_index, %array_index.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -62,13 +62,13 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc16_30: i32 = int_literal 0 [template = constants.%.5] // CHECK:STDOUT: %.loc16_32: (i32,) = tuple_literal (%.loc16_30) -// CHECK:STDOUT: %int.make_type_32.loc16_38: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc16_38: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_45: i32 = int_literal 5 [template = constants.%.7] // CHECK:STDOUT: %.loc16_48: i32 = int_literal 7 [template = constants.%.8] // CHECK:STDOUT: %.loc16_51: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc16_54: i32 = int_literal 9 [template = constants.%.9] // CHECK:STDOUT: %.loc16_55.1: (i32, i32, i32, i32) = tuple_literal (%.loc16_45, %.loc16_48, %.loc16_51, %.loc16_54) -// CHECK:STDOUT: %int.make_type_32.loc16_61: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc16_61: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_66: i32 = int_literal 4 [template = constants.%.11] // CHECK:STDOUT: %.loc16_61.1: type = value_of_initializer %int.make_type_32.loc16_61 [template = i32] // CHECK:STDOUT: %.loc16_61.2: type = converted %int.make_type_32.loc16_61, %.loc16_61.1 [template = i32] diff --git a/toolchain/check/testdata/eval/fail_symbolic.carbon b/toolchain/check/testdata/eval/fail_symbolic.carbon index 79b54b0879ec..93d6fd3eca14 100644 --- a/toolchain/check/testdata/eval/fail_symbolic.carbon +++ b/toolchain/check/testdata/eval/fail_symbolic.carbon @@ -19,12 +19,12 @@ fn G(N:! i32) { // CHECK:STDOUT: --- fail_symbolic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %N: i32 = bind_symbolic_name N 0 [symbolic] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.2: G = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -33,22 +33,22 @@ fn G(N:! i32) { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %N.loc12_6.1: i32 = param N // CHECK:STDOUT: @G.%N: i32 = bind_symbolic_name N 0, %N.loc12_6.1 [symbolic = constants.%N] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: // CHECK:STDOUT: fn @G(%N: i32) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %N.ref: i32 = name_ref N, %N [symbolic = constants.%N] // CHECK:STDOUT: %.loc16_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc16_11.2: type = converted %int.make_type_32, %.loc16_11.1 [template = i32] diff --git a/toolchain/check/testdata/eval/symbolic.carbon b/toolchain/check/testdata/eval/symbolic.carbon index de23cf8e7739..300162c6ef63 100644 --- a/toolchain/check/testdata/eval/symbolic.carbon +++ b/toolchain/check/testdata/eval/symbolic.carbon @@ -19,9 +19,9 @@ fn F(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: type = ptr_type T [symbolic] // CHECK:STDOUT: %.3: type = const_type T [symbolic] // CHECK:STDOUT: %.4: type = tuple_type (type, type) [template] @@ -40,7 +40,7 @@ fn F(T:! type) { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc12_6.1: type = param T // CHECK:STDOUT: @F.%T: type = bind_symbolic_name T 0, %T.loc12_6.1 [symbolic = constants.%T] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/expr_category/in_place_tuple_init.carbon b/toolchain/check/testdata/expr_category/in_place_tuple_init.carbon index f693311023f2..e2a531a43a3b 100644 --- a/toolchain/check/testdata/expr_category/in_place_tuple_init.carbon +++ b/toolchain/check/testdata/expr_category/in_place_tuple_init.carbon @@ -23,18 +23,18 @@ fn H() -> i32 { // CHECK:STDOUT: --- in_place_tuple_init.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.4: type = ptr_type (i32, i32) [template] -// CHECK:STDOUT: %H: type = fn_type @H [template] -// CHECK:STDOUT: %struct.4: H = struct_value () [template] +// CHECK:STDOUT: %H.type: type = fn_type @H [template] +// CHECK:STDOUT: %H: = struct_value () [template] // CHECK:STDOUT: %.5: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -46,11 +46,11 @@ fn H() -> i32 { // CHECK:STDOUT: .H = %H.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11_12: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc11_17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc11_12: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_20.1: (type, type) = tuple_literal (%int.make_type_32.loc11_12, %int.make_type_32.loc11_17) // CHECK:STDOUT: %.loc11_20.2: type = value_of_initializer %int.make_type_32.loc11_12 [template = i32] // CHECK:STDOUT: %.loc11_20.3: type = converted %int.make_type_32.loc11_12, %.loc11_20.2 [template = i32] @@ -59,11 +59,11 @@ fn H() -> i32 { // CHECK:STDOUT: %.loc11_20.6: type = converted %.loc11_20.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: @F.%return: ref (i32, i32) = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc13_12: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc13_17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %int.make_type_32.loc13_12: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_20.1: (type, type) = tuple_literal (%int.make_type_32.loc13_12, %int.make_type_32.loc13_17) // CHECK:STDOUT: %.loc13_20.2: type = value_of_initializer %int.make_type_32.loc13_12 [template = i32] // CHECK:STDOUT: %.loc13_20.3: type = converted %int.make_type_32.loc13_12, %.loc13_20.2 [template = i32] @@ -72,11 +72,11 @@ fn H() -> i32 { // CHECK:STDOUT: %.loc13_20.6: type = converted %.loc13_20.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: @G.%return: ref (i32, i32) = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %H.decl: H = fn_decl @H [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] { +// CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_11.1: type = value_of_initializer %int.make_type_32.loc19 [template = i32] // CHECK:STDOUT: %.loc19_11.2: type = converted %int.make_type_32.loc19, %.loc19_11.1 [template = i32] // CHECK:STDOUT: @H.%return: ref i32 = var @@ -89,8 +89,8 @@ fn H() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %return: (i32, i32) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32.loc14_11: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc14_16: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_11: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_19.1: (type, type) = tuple_literal (%int.make_type_32.loc14_11, %int.make_type_32.loc14_16) // CHECK:STDOUT: %.loc14_19.2: type = value_of_initializer %int.make_type_32.loc14_11 [template = i32] // CHECK:STDOUT: %.loc14_19.3: type = converted %int.make_type_32.loc14_11, %.loc14_19.2 [template = i32] @@ -99,16 +99,16 @@ fn H() -> i32 { // CHECK:STDOUT: %.loc14_19.6: type = converted %.loc14_19.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %v.var: ref (i32, i32) = var v // CHECK:STDOUT: %v: ref (i32, i32) = bind_name v, %v.var -// CHECK:STDOUT: %F.ref.loc14: F = name_ref F, file.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref.loc14: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc14_7: ref (i32, i32) = splice_block %v.var {} // CHECK:STDOUT: %F.call.loc14: init (i32, i32) = call %F.ref.loc14() to %.loc14_7 // CHECK:STDOUT: assign %v.var, %F.call.loc14 // CHECK:STDOUT: %v.ref: ref (i32, i32) = name_ref v, %v -// CHECK:STDOUT: %F.ref.loc15: F = name_ref F, file.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref.loc15: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc15: ref (i32, i32) = splice_block %v.ref {} // CHECK:STDOUT: %F.call.loc15: init (i32, i32) = call %F.ref.loc15() to %.loc15 // CHECK:STDOUT: assign %v.ref, %F.call.loc15 -// CHECK:STDOUT: %F.ref.loc16: F = name_ref F, file.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref.loc16: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc13: ref (i32, i32) = splice_block %return {} // CHECK:STDOUT: %F.call.loc16: init (i32, i32) = call %F.ref.loc16() to %.loc13 // CHECK:STDOUT: return %F.call.loc16 to %return @@ -116,7 +116,7 @@ fn H() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @H() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %G.ref: G = name_ref G, file.%G.decl [template = constants.%struct.3] +// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %.loc20_11.1: ref (i32, i32) = temporary_storage // CHECK:STDOUT: %G.call: init (i32, i32) = call %G.ref() to %.loc20_11.1 // CHECK:STDOUT: %.loc20_14: i32 = int_literal 0 [template = constants.%.5] diff --git a/toolchain/check/testdata/function/builtin/call.carbon b/toolchain/check/testdata/function/builtin/call.carbon index 8a93e55b3929..08db8a734571 100644 --- a/toolchain/check/testdata/function/builtin/call.carbon +++ b/toolchain/check/testdata/function/builtin/call.carbon @@ -15,11 +15,11 @@ var arr: [i32; Add(1, 2)]; // CHECK:STDOUT: --- call.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Add: type = fn_type @Add [template] -// CHECK:STDOUT: %struct.2: Add = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Add.type: type = fn_type @Add [template] +// CHECK:STDOUT: %Add: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 3 [template] @@ -34,28 +34,28 @@ var arr: [i32; Add(1, 2)]; // CHECK:STDOUT: .arr = %arr // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Add.decl: Add = fn_decl @Add [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Add.decl: = fn_decl @Add [template = constants.%Add] { +// CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32] // CHECK:STDOUT: %a.loc11_8.1: i32 = param a // CHECK:STDOUT: @Add.%a: i32 = bind_name a, %a.loc11_8.1 -// CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_32.loc11_19 [template = i32] // CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_32.loc11_19, %.loc11_19.1 [template = i32] // CHECK:STDOUT: %b.loc11_16.1: i32 = param b // CHECK:STDOUT: @Add.%b: i32 = bind_name b, %b.loc11_16.1 -// CHECK:STDOUT: %int.make_type_32.loc11_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_27.1: type = value_of_initializer %int.make_type_32.loc11_27 [template = i32] // CHECK:STDOUT: %.loc11_27.2: type = converted %int.make_type_32.loc11_27, %.loc11_27.1 [template = i32] // CHECK:STDOUT: @Add.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %Add.ref: Add = name_ref Add, %Add.decl [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %Add.ref: = name_ref Add, %Add.decl [template = constants.%Add] // CHECK:STDOUT: %.loc13_20: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc13_23: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.sadd: init i32 = call %Add.ref(%.loc13_20, %.loc13_23) [template = constants.%.4] diff --git a/toolchain/check/testdata/function/builtin/definition.carbon b/toolchain/check/testdata/function/builtin/definition.carbon index dc0b72b9af6a..51e933cf4b09 100644 --- a/toolchain/check/testdata/function/builtin/definition.carbon +++ b/toolchain/check/testdata/function/builtin/definition.carbon @@ -13,11 +13,11 @@ fn Add(a: i32, b: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: --- definition.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Add: type = fn_type @Add [template] -// CHECK:STDOUT: %struct.2: Add = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Add.type: type = fn_type @Add [template] +// CHECK:STDOUT: %Add: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -26,21 +26,21 @@ fn Add(a: i32, b: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: .Add = %Add.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Add.decl: Add = fn_decl @Add [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Add.decl: = fn_decl @Add [template = constants.%Add] { +// CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32] // CHECK:STDOUT: %a.loc11_8.1: i32 = param a // CHECK:STDOUT: @Add.%a: i32 = bind_name a, %a.loc11_8.1 -// CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_32.loc11_19 [template = i32] // CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_32.loc11_19, %.loc11_19.1 [template = i32] // CHECK:STDOUT: %b.loc11_16.1: i32 = param b // CHECK:STDOUT: @Add.%b: i32 = bind_name b, %b.loc11_16.1 -// CHECK:STDOUT: %int.make_type_32.loc11_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_27.1: type = value_of_initializer %int.make_type_32.loc11_27 [template = i32] // CHECK:STDOUT: %.loc11_27.2: type = converted %int.make_type_32.loc11_27, %.loc11_27.1 [template = i32] // CHECK:STDOUT: @Add.%return: ref i32 = var diff --git a/toolchain/check/testdata/function/builtin/fail_redefined.carbon b/toolchain/check/testdata/function/builtin/fail_redefined.carbon index 2859339ac2d6..2f58be33f59c 100644 --- a/toolchain/check/testdata/function/builtin/fail_redefined.carbon +++ b/toolchain/check/testdata/function/builtin/fail_redefined.carbon @@ -40,15 +40,15 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: --- fail_redefined.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %A: type = fn_type @A [template] -// CHECK:STDOUT: %struct.2: A = struct_value () [template] -// CHECK:STDOUT: %B: type = fn_type @B [template] -// CHECK:STDOUT: %struct.3: B = struct_value () [template] -// CHECK:STDOUT: %C: type = fn_type @C [template] -// CHECK:STDOUT: %struct.4: C = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] +// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] +// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %C.type: type = fn_type @C [template] +// CHECK:STDOUT: %C: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -59,116 +59,116 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: .C = %C.decl.loc31 // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %A.decl.loc11: A = fn_decl @A [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %A.decl.loc11: = fn_decl @A [template = constants.%A] { +// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32.loc11_9, %.loc11_9.1 [template = i32] // CHECK:STDOUT: %n.loc11_6.1: i32 = param n // CHECK:STDOUT: %n.loc11_6.2: i32 = bind_name n, %n.loc11_6.1 -// CHECK:STDOUT: %int.make_type_32.loc11_17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_17.1: type = value_of_initializer %int.make_type_32.loc11_17 [template = i32] // CHECK:STDOUT: %.loc11_17.2: type = converted %int.make_type_32.loc11_17, %.loc11_17.1 [template = i32] // CHECK:STDOUT: %m.loc11_14.1: i32 = param m // CHECK:STDOUT: %m.loc11_14.2: i32 = bind_name m, %m.loc11_14.1 -// CHECK:STDOUT: %int.make_type_32.loc11_25: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_25.1: type = value_of_initializer %int.make_type_32.loc11_25 [template = i32] // CHECK:STDOUT: %.loc11_25.2: type = converted %int.make_type_32.loc11_25, %.loc11_25.1 [template = i32] // CHECK:STDOUT: %return.var.loc11: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %A.decl.loc19: A = fn_decl @A [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc19_9: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %A.decl.loc19: = fn_decl @A [template = constants.%A] { +// CHECK:STDOUT: %int.make_type_32.loc19_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_9.1: type = value_of_initializer %int.make_type_32.loc19_9 [template = i32] // CHECK:STDOUT: %.loc19_9.2: type = converted %int.make_type_32.loc19_9, %.loc19_9.1 [template = i32] // CHECK:STDOUT: %n.loc19_6.1: i32 = param n // CHECK:STDOUT: @A.%n: i32 = bind_name n, %n.loc19_6.1 -// CHECK:STDOUT: %int.make_type_32.loc19_17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc19_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %int.make_type_32.loc19_17 [template = i32] // CHECK:STDOUT: %.loc19_17.2: type = converted %int.make_type_32.loc19_17, %.loc19_17.1 [template = i32] // CHECK:STDOUT: %m.loc19_14.1: i32 = param m // CHECK:STDOUT: @A.%m: i32 = bind_name m, %m.loc19_14.1 -// CHECK:STDOUT: %int.make_type_32.loc19_25: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc19_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_25.1: type = value_of_initializer %int.make_type_32.loc19_25 [template = i32] // CHECK:STDOUT: %.loc19_25.2: type = converted %int.make_type_32.loc19_25, %.loc19_25.1 [template = i32] // CHECK:STDOUT: @A.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.9: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %B.decl.loc21: B = fn_decl @B [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc21_9: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl.loc21: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %int.make_type_32.loc21_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_9.1: type = value_of_initializer %int.make_type_32.loc21_9 [template = i32] // CHECK:STDOUT: %.loc21_9.2: type = converted %int.make_type_32.loc21_9, %.loc21_9.1 [template = i32] // CHECK:STDOUT: %n.loc21_6.1: i32 = param n // CHECK:STDOUT: %n.loc21_6.2: i32 = bind_name n, %n.loc21_6.1 -// CHECK:STDOUT: %int.make_type_32.loc21_17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc21_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_17.1: type = value_of_initializer %int.make_type_32.loc21_17 [template = i32] // CHECK:STDOUT: %.loc21_17.2: type = converted %int.make_type_32.loc21_17, %.loc21_17.1 [template = i32] // CHECK:STDOUT: %m.loc21_14.1: i32 = param m // CHECK:STDOUT: %m.loc21_14.2: i32 = bind_name m, %m.loc21_14.1 -// CHECK:STDOUT: %int.make_type_32.loc21_25: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc21_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_25.1: type = value_of_initializer %int.make_type_32.loc21_25 [template = i32] // CHECK:STDOUT: %.loc21_25.2: type = converted %int.make_type_32.loc21_25, %.loc21_25.1 [template = i32] // CHECK:STDOUT: %return.var.loc21: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.10: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.11: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.12: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %B.decl.loc29: B = fn_decl @B [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc29_9: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl.loc29: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %int.make_type_32.loc29_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc29_9.1: type = value_of_initializer %int.make_type_32.loc29_9 [template = i32] // CHECK:STDOUT: %.loc29_9.2: type = converted %int.make_type_32.loc29_9, %.loc29_9.1 [template = i32] // CHECK:STDOUT: %n.loc29_6.1: i32 = param n // CHECK:STDOUT: @B.%n: i32 = bind_name n, %n.loc29_6.1 -// CHECK:STDOUT: %int.make_type_32.loc29_17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc29_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc29_17.1: type = value_of_initializer %int.make_type_32.loc29_17 [template = i32] // CHECK:STDOUT: %.loc29_17.2: type = converted %int.make_type_32.loc29_17, %.loc29_17.1 [template = i32] // CHECK:STDOUT: %m.loc29_14.1: i32 = param m // CHECK:STDOUT: @B.%m: i32 = bind_name m, %m.loc29_14.1 -// CHECK:STDOUT: %int.make_type_32.loc29_25: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc29_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc29_25.1: type = value_of_initializer %int.make_type_32.loc29_25 [template = i32] // CHECK:STDOUT: %.loc29_25.2: type = converted %int.make_type_32.loc29_25, %.loc29_25.1 [template = i32] // CHECK:STDOUT: @B.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.13: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.14: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.15: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %C.decl.loc31: C = fn_decl @C [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32.loc31_9: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.14: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.15: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %C.decl.loc31: = fn_decl @C [template = constants.%C] { +// CHECK:STDOUT: %int.make_type_32.loc31_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc31_9.1: type = value_of_initializer %int.make_type_32.loc31_9 [template = i32] // CHECK:STDOUT: %.loc31_9.2: type = converted %int.make_type_32.loc31_9, %.loc31_9.1 [template = i32] // CHECK:STDOUT: %n.loc31_6.1: i32 = param n // CHECK:STDOUT: %n.loc31_6.2: i32 = bind_name n, %n.loc31_6.1 -// CHECK:STDOUT: %int.make_type_32.loc31_17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc31_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc31_17.1: type = value_of_initializer %int.make_type_32.loc31_17 [template = i32] // CHECK:STDOUT: %.loc31_17.2: type = converted %int.make_type_32.loc31_17, %.loc31_17.1 [template = i32] // CHECK:STDOUT: %m.loc31_14.1: i32 = param m // CHECK:STDOUT: %m.loc31_14.2: i32 = bind_name m, %m.loc31_14.1 -// CHECK:STDOUT: %int.make_type_32.loc31_25: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc31_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc31_25.1: type = value_of_initializer %int.make_type_32.loc31_25 [template = i32] // CHECK:STDOUT: %.loc31_25.2: type = converted %int.make_type_32.loc31_25, %.loc31_25.1 [template = i32] // CHECK:STDOUT: %return.var.loc31: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.16: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.17: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.18: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %C.decl.loc38: C = fn_decl @C [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32.loc38_9: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.16: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.17: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.18: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %C.decl.loc38: = fn_decl @C [template = constants.%C] { +// CHECK:STDOUT: %int.make_type_32.loc38_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc38_9.1: type = value_of_initializer %int.make_type_32.loc38_9 [template = i32] // CHECK:STDOUT: %.loc38_9.2: type = converted %int.make_type_32.loc38_9, %.loc38_9.1 [template = i32] // CHECK:STDOUT: %n.loc38_6.1: i32 = param n // CHECK:STDOUT: @C.%n: i32 = bind_name n, %n.loc38_6.1 -// CHECK:STDOUT: %int.make_type_32.loc38_17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc38_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc38_17.1: type = value_of_initializer %int.make_type_32.loc38_17 [template = i32] // CHECK:STDOUT: %.loc38_17.2: type = converted %int.make_type_32.loc38_17, %.loc38_17.1 [template = i32] // CHECK:STDOUT: %m.loc38_14.1: i32 = param m // CHECK:STDOUT: @C.%m: i32 = bind_name m, %m.loc38_14.1 -// CHECK:STDOUT: %int.make_type_32.loc38_25: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc38_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc38_25.1: type = value_of_initializer %int.make_type_32.loc38_25 [template = i32] // CHECK:STDOUT: %.loc38_25.2: type = converted %int.make_type_32.loc38_25, %.loc38_25.1 [template = i32] // CHECK:STDOUT: @C.%return: ref i32 = var diff --git a/toolchain/check/testdata/function/builtin/fail_unknown.carbon b/toolchain/check/testdata/function/builtin/fail_unknown.carbon index 0b5e230caec7..52723285cfcc 100644 --- a/toolchain/check/testdata/function/builtin/fail_unknown.carbon +++ b/toolchain/check/testdata/function/builtin/fail_unknown.carbon @@ -16,9 +16,9 @@ fn UnknownBuiltin() = "unknown.builtin.name"; // CHECK:STDOUT: --- fail_unknown.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %UnknownBuiltin: type = fn_type @UnknownBuiltin [template] +// CHECK:STDOUT: %UnknownBuiltin.type: type = fn_type @UnknownBuiltin [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: UnknownBuiltin = struct_value () [template] +// CHECK:STDOUT: %UnknownBuiltin: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -27,7 +27,7 @@ fn UnknownBuiltin() = "unknown.builtin.name"; // CHECK:STDOUT: .UnknownBuiltin = %UnknownBuiltin.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %UnknownBuiltin.decl: UnknownBuiltin = fn_decl @UnknownBuiltin [template = constants.%struct] {} +// CHECK:STDOUT: %UnknownBuiltin.decl: = fn_decl @UnknownBuiltin [template = constants.%UnknownBuiltin] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @UnknownBuiltin(); diff --git a/toolchain/check/testdata/function/builtin/method.carbon b/toolchain/check/testdata/function/builtin/method.carbon index 6be07260426c..eed2d452141f 100644 --- a/toolchain/check/testdata/function/builtin/method.carbon +++ b/toolchain/check/testdata/function/builtin/method.carbon @@ -23,18 +23,18 @@ var arr: [i32; 1.(I.F)(2)]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @I, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @I.%F.decl [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.3: F = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%struct.3) [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @I, [template] +// CHECK:STDOUT: %.4: in I> = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] // CHECK:STDOUT: %.6: i32 = int_literal 1 [template] -// CHECK:STDOUT: %.7: = bound_method %.6, %struct.3 [template] +// CHECK:STDOUT: %.7: = bound_method %.6, %F.2 [template] // CHECK:STDOUT: %.8: i32 = int_literal 2 [template] // CHECK:STDOUT: %.9: i32 = int_literal 3 [template] // CHECK:STDOUT: %.10: type = array_type %.9, i32 [template] @@ -49,22 +49,22 @@ var arr: [i32; 1.(I.F)(2)]; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: impl_decl @impl { -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_6.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_6.2: type = converted %int.make_type_32.loc15, %.loc15_6.1 [template = i32] // CHECK:STDOUT: %I.ref.loc15: type = name_ref I, %I.decl [template = constants.%.1] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_16: i32 = int_literal 1 [template = constants.%.6] // CHECK:STDOUT: %I.ref.loc19: type = name_ref I, %I.decl [template = constants.%.1] -// CHECK:STDOUT: %F.ref: = name_ref F, @I.%.loc12_40 [template = constants.%.4] -// CHECK:STDOUT: %.1: F = interface_witness_access @impl.%.1, element0 [template = constants.%struct.3] +// CHECK:STDOUT: %F.ref: in I> = name_ref F, @I.%.loc12_40 [template = constants.%.4] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] // CHECK:STDOUT: %.loc19_17: = bound_method %.loc19_16, %.1 [template = constants.%.7] // CHECK:STDOUT: %.loc19_24: i32 = int_literal 2 [template = constants.%.8] // CHECK:STDOUT: %int.sadd: init i32 = call %.loc19_17(%.loc19_16, %.loc19_24) [template = constants.%.9] @@ -77,7 +77,7 @@ var arr: [i32; 1.(I.F)(2)]; // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %Self.ref.loc12_14: I = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc12_14.1: type = facet_type_access %Self.ref.loc12_14 [symbolic = constants.%Self] // CHECK:STDOUT: %.loc12_14.2: type = converted %Self.ref.loc12_14, %.loc12_14.1 [symbolic = constants.%Self] @@ -93,7 +93,7 @@ var arr: [i32; 1.(I.F)(2)]; // CHECK:STDOUT: %.loc12_36.2: type = converted %Self.ref.loc12_36, %.loc12_36.1 [symbolic = constants.%Self] // CHECK:STDOUT: %return.var: ref Self = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12_40: = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12_40: in I> = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -102,18 +102,18 @@ var arr: [i32; 1.(I.F)(2)]; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: i32 as I { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc16_14: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { +// CHECK:STDOUT: %int.make_type_32.loc16_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_14.1: type = value_of_initializer %int.make_type_32.loc16_14 [template = i32] // CHECK:STDOUT: %.loc16_14.2: type = converted %int.make_type_32.loc16_14, %.loc16_14.1 [template = i32] // CHECK:STDOUT: %self.loc16_8.1: i32 = param self // CHECK:STDOUT: %self.loc16_8.2: i32 = bind_name self, %self.loc16_8.1 -// CHECK:STDOUT: %int.make_type_32.loc16_26: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc16_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_26.1: type = value_of_initializer %int.make_type_32.loc16_26 [template = i32] // CHECK:STDOUT: %.loc16_26.2: type = converted %int.make_type_32.loc16_26, %.loc16_26.1 [template = i32] // CHECK:STDOUT: %other.loc16_19.1: i32 = param other // CHECK:STDOUT: %other.loc16_19.2: i32 = bind_name other, %other.loc16_19.1 -// CHECK:STDOUT: %int.make_type_32.loc16_34: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc16_34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_34.1: type = value_of_initializer %int.make_type_32.loc16_34 [template = i32] // CHECK:STDOUT: %.loc16_34.2: type = converted %int.make_type_32.loc16_34, %.loc16_34.1 [template = i32] // CHECK:STDOUT: %return.var: ref i32 = var diff --git a/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon b/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon index 8fc5b756956b..d7a5dcb7dc34 100644 --- a/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon +++ b/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon @@ -33,15 +33,15 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: --- core.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = interface_type @Add [template] // CHECK:STDOUT: %Self: Add = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Op: type = fn_type @Op [template] -// CHECK:STDOUT: %struct.2: Op = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Add, Op [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @Add.%Op.decl [template] +// CHECK:STDOUT: %Op.type: type = fn_type @Op [template] +// CHECK:STDOUT: %Op: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Add, [template] +// CHECK:STDOUT: %.4: in Add> = assoc_entity element0, @Add.%Op.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -49,7 +49,7 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: .Int32 = %Int32.decl // CHECK:STDOUT: .Add = %Add.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Int32.decl: Int32 = fn_decl @Int32 [template = constants.%struct.1] { +// CHECK:STDOUT: %Int32.decl: = fn_decl @Int32 [template = constants.%Int32] { // CHECK:STDOUT: @Int32.%return: ref type = var // CHECK:STDOUT: } // CHECK:STDOUT: %Add.decl: type = interface_decl @Add [template = constants.%.2] {} @@ -57,7 +57,7 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: // CHECK:STDOUT: interface @Add { // CHECK:STDOUT: %Self: Add = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op [template = constants.%struct.2] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op [template = constants.%Op] { // CHECK:STDOUT: %Self.ref.loc7_15: Add = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc7_15.1: type = facet_type_access %Self.ref.loc7_15 [symbolic = constants.%Self] // CHECK:STDOUT: %.loc7_15.2: type = converted %Self.ref.loc7_15, %.loc7_15.1 [symbolic = constants.%Self] @@ -73,7 +73,7 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: %.loc7_37.2: type = converted %Self.ref.loc7_37, %.loc7_37.1 [symbolic = constants.%Self] // CHECK:STDOUT: %return.var: ref Self = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc7_41: = assoc_entity element0, %Op.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc7_41: in Add> = assoc_entity element0, %Op.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -88,26 +88,26 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: --- user.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = interface_type @Add [template] // CHECK:STDOUT: %Self: Add = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Op.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %struct.2: Op = struct_value () [template] -// CHECK:STDOUT: %Op.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %struct.3: Op = struct_value () [template] -// CHECK:STDOUT: %.3: = interface_witness (%struct.2) [template] +// CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] +// CHECK:STDOUT: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] +// CHECK:STDOUT: %Op.2: = struct_value () [template] +// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: i32 = int_literal 2 [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type @Add, Op [template] -// CHECK:STDOUT: %.7: = assoc_entity element0, file.%import_ref.8 [template] -// CHECK:STDOUT: %.8: = bound_method %.4, %struct.2 [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type @Add, [template] +// CHECK:STDOUT: %.7: in Add> = assoc_entity element0, file.%import_ref.8 [template] +// CHECK:STDOUT: %.8: = bound_method %.4, %Op.1 [template] // CHECK:STDOUT: %.9: i32 = int_literal 3 [template] // CHECK:STDOUT: %.10: type = array_type %.9, i32 [template] // CHECK:STDOUT: %.11: type = ptr_type [i32; 3] [template] // CHECK:STDOUT: %.12: i32 = int_literal 4 [template] -// CHECK:STDOUT: %.13: = bound_method %.9, %struct.2 [template] +// CHECK:STDOUT: %.13: = bound_method %.9, %Op.1 [template] // CHECK:STDOUT: %.14: i32 = int_literal 7 [template] // CHECK:STDOUT: %.15: type = tuple_type (i32, i32, i32) [template] // CHECK:STDOUT: %.16: i32 = int_literal 0 [template] @@ -120,25 +120,25 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: .arr = %arr // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir1, inst+2, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+2, loaded [template = constants.%Int32] // CHECK:STDOUT: %import_ref.2: type = import_ref ir1, inst+6, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+8, unloaded -// CHECK:STDOUT: %import_ref.4: = import_ref ir1, inst+28, loaded [template = constants.%.7] -// CHECK:STDOUT: %import_ref.5: Op = import_ref ir1, inst+24, loaded [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.4: in Add> = import_ref ir1, inst+28, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.5: = import_ref ir1, inst+24, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl { -// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_6.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_6.2: type = converted %int.make_type_32.loc6, %.loc6_6.1 [template = i32] // CHECK:STDOUT: %Core.ref: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %Add.ref: type = name_ref Add, %import_ref.2 [template = constants.%.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir1, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc10: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir1, inst+2, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc10_16: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc10_20: i32 = int_literal 2 [template = constants.%.5] // CHECK:STDOUT: %import_ref.7: type = import_ref ir1, inst+6, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.8 = import_ref ir1, inst+24, unloaded -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.%.1, element0 [template = constants.%struct.2] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc10_18: = bound_method %.loc10_16, %.1 [template = constants.%.8] // CHECK:STDOUT: %int.sadd: init i32 = call %.loc10_18(%.loc10_16, %.loc10_20) [template = constants.%.9] // CHECK:STDOUT: %.loc10_11.1: type = value_of_initializer %int.make_type_32.loc10 [template = i32] @@ -157,7 +157,7 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: i32 as Add { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.1 [template = constants.%struct.2] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %Self.ref.loc7_15: type = name_ref Self, i32 [template = i32] // CHECK:STDOUT: %self.loc7_9.1: i32 = param self // CHECK:STDOUT: %self.loc7_9.2: i32 = bind_name self, %self.loc7_9.1 @@ -186,7 +186,7 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: %.loc10_29: i32 = int_literal 4 [template = constants.%.12] // CHECK:STDOUT: %.loc10_32: i32 = int_literal 3 [template = constants.%.9] // CHECK:STDOUT: %.loc10_36: i32 = int_literal 4 [template = constants.%.12] -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.%.1, element0 [template = constants.%struct.2] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc10_34: = bound_method %.loc10_32, %.1 [template = constants.%.13] // CHECK:STDOUT: %int.sadd: init i32 = call %.loc10_34(%.loc10_32, %.loc10_36) [template = constants.%.14] // CHECK:STDOUT: %.loc10_37.1: (i32, i32, i32) = tuple_literal (%.loc10_26, %.loc10_29, %int.sadd) diff --git a/toolchain/check/testdata/function/builtin/no_prelude/import.carbon b/toolchain/check/testdata/function/builtin/no_prelude/import.carbon index 7e9904752801..e1a1697b4b10 100644 --- a/toolchain/check/testdata/function/builtin/no_prelude/import.carbon +++ b/toolchain/check/testdata/function/builtin/no_prelude/import.carbon @@ -24,11 +24,11 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3); // CHECK:STDOUT: --- core.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %TestAdd: type = fn_type @TestAdd [template] -// CHECK:STDOUT: %struct.2: TestAdd = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %TestAdd.type: type = fn_type @TestAdd [template] +// CHECK:STDOUT: %TestAdd: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -36,21 +36,21 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3); // CHECK:STDOUT: .Int32 = %Int32.decl // CHECK:STDOUT: .TestAdd = %TestAdd.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Int32.decl: Int32 = fn_decl @Int32 [template = constants.%struct.1] { +// CHECK:STDOUT: %Int32.decl: = fn_decl @Int32 [template = constants.%Int32] { // CHECK:STDOUT: @Int32.%return: ref type = var // CHECK:STDOUT: } -// CHECK:STDOUT: %TestAdd.decl: TestAdd = fn_decl @TestAdd [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc5_15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %TestAdd.decl: = fn_decl @TestAdd [template = constants.%TestAdd] { +// CHECK:STDOUT: %int.make_type_32.loc5_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_15.1: type = value_of_initializer %int.make_type_32.loc5_15 [template = i32] // CHECK:STDOUT: %.loc5_15.2: type = converted %int.make_type_32.loc5_15, %.loc5_15.1 [template = i32] // CHECK:STDOUT: %a.loc5_12.1: i32 = param a // CHECK:STDOUT: @TestAdd.%a: i32 = bind_name a, %a.loc5_12.1 -// CHECK:STDOUT: %int.make_type_32.loc5_23: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc5_23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_23.1: type = value_of_initializer %int.make_type_32.loc5_23 [template = i32] // CHECK:STDOUT: %.loc5_23.2: type = converted %int.make_type_32.loc5_23, %.loc5_23.1 [template = i32] // CHECK:STDOUT: %b.loc5_20.1: i32 = param b // CHECK:STDOUT: @TestAdd.%b: i32 = bind_name b, %b.loc5_20.1 -// CHECK:STDOUT: %int.make_type_32.loc5_31: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc5_31: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_31.1: type = value_of_initializer %int.make_type_32.loc5_31 [template = i32] // CHECK:STDOUT: %.loc5_31.2: type = converted %int.make_type_32.loc5_31, %.loc5_31.1 [template = i32] // CHECK:STDOUT: @TestAdd.%return: ref i32 = var @@ -64,11 +64,11 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3); // CHECK:STDOUT: --- use.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %TestAdd: type = fn_type @TestAdd [template] -// CHECK:STDOUT: %struct.2: TestAdd = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %TestAdd.type: type = fn_type @TestAdd [template] +// CHECK:STDOUT: %TestAdd: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 3 [template] @@ -85,11 +85,11 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3); // CHECK:STDOUT: .arr = %arr // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir1, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+2, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %Core.ref: = name_ref Core, %Core [template = %Core] -// CHECK:STDOUT: %import_ref.2: TestAdd = import_ref ir1, inst+20, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %TestAdd.ref: TestAdd = name_ref TestAdd, %import_ref.2 [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.2: = import_ref ir1, inst+20, loaded [template = constants.%TestAdd] +// CHECK:STDOUT: %TestAdd.ref: = name_ref TestAdd, %import_ref.2 [template = constants.%TestAdd] // CHECK:STDOUT: %.loc4_29: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc4_32: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %int.sadd: init i32 = call %TestAdd.ref(%.loc4_29, %.loc4_32) [template = constants.%.4] diff --git a/toolchain/check/testdata/function/call/fail_not_callable.carbon b/toolchain/check/testdata/function/call/fail_not_callable.carbon index 8d401ba4cd65..e00d1a0cbb8e 100644 --- a/toolchain/check/testdata/function/call/fail_not_callable.carbon +++ b/toolchain/check/testdata/function/call/fail_not_callable.carbon @@ -18,11 +18,11 @@ fn Run() { // CHECK:STDOUT: --- fail_not_callable.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Run: type = fn_type @Run [template] +// CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Run = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] +// CHECK:STDOUT: %Run: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = ptr_type String [template] // CHECK:STDOUT: %.3: String = string_literal "hello" [template] // CHECK:STDOUT: } @@ -33,13 +33,13 @@ fn Run() { // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Run.decl: Run = fn_decl @Run [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc15_10.2: type = converted %int.make_type_32, %.loc15_10.1 [template = i32] // CHECK:STDOUT: %x.var: ref i32 = var x diff --git a/toolchain/check/testdata/function/call/fail_param_count.carbon b/toolchain/check/testdata/function/call/fail_param_count.carbon index bb3ec2e0cee0..80438599b181 100644 --- a/toolchain/check/testdata/function/call/fail_param_count.carbon +++ b/toolchain/check/testdata/function/call/fail_param_count.carbon @@ -67,17 +67,17 @@ fn Main() { // CHECK:STDOUT: --- fail_param_count.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Run0: type = fn_type @Run0 [template] +// CHECK:STDOUT: %Run0.type: type = fn_type @Run0 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Run0 = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %Run1: type = fn_type @Run1 [template] -// CHECK:STDOUT: %struct.3: Run1 = struct_value () [template] -// CHECK:STDOUT: %Run2: type = fn_type @Run2 [template] -// CHECK:STDOUT: %struct.4: Run2 = struct_value () [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.5: Main = struct_value () [template] +// CHECK:STDOUT: %Run0: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Run1.type: type = fn_type @Run1 [template] +// CHECK:STDOUT: %Run1: = struct_value () [template] +// CHECK:STDOUT: %Run2.type: type = fn_type @Run2 [template] +// CHECK:STDOUT: %Run2: = struct_value () [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: } @@ -91,30 +91,30 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Run0.decl: Run0 = fn_decl @Run0 [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %Run1.decl: Run1 = fn_decl @Run1 [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %Run0.decl: = fn_decl @Run0 [template = constants.%Run0] {} +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Run1.decl: = fn_decl @Run1 [template = constants.%Run1] { +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_12.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_12.2: type = converted %int.make_type_32.loc12, %.loc12_12.1 [template = i32] // CHECK:STDOUT: %a.loc12_9.1: i32 = param a // CHECK:STDOUT: @Run1.%a: i32 = bind_name a, %a.loc12_9.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %Run2.decl: Run2 = fn_decl @Run2 [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32.loc13_12: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Run2.decl: = fn_decl @Run2 [template = constants.%Run2] { +// CHECK:STDOUT: %int.make_type_32.loc13_12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_12.1: type = value_of_initializer %int.make_type_32.loc13_12 [template = i32] // CHECK:STDOUT: %.loc13_12.2: type = converted %int.make_type_32.loc13_12, %.loc13_12.1 [template = i32] // CHECK:STDOUT: %a.loc13_9.1: i32 = param a // CHECK:STDOUT: @Run2.%a: i32 = bind_name a, %a.loc13_9.1 -// CHECK:STDOUT: %int.make_type_32.loc13_20: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13_20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_20.1: type = value_of_initializer %int.make_type_32.loc13_20 [template = i32] // CHECK:STDOUT: %.loc13_20.2: type = converted %int.make_type_32.loc13_20, %.loc13_20.1 [template = i32] // CHECK:STDOUT: %b.loc13_17.1: i32 = param b // CHECK:STDOUT: @Run2.%b: i32 = bind_name b, %b.loc13_17.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.5] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run0() { @@ -136,22 +136,22 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Run0.ref.loc23: Run0 = name_ref Run0, file.%Run0.decl [template = constants.%struct.1] +// CHECK:STDOUT: %Run0.ref.loc23: = name_ref Run0, file.%Run0.decl [template = constants.%Run0] // CHECK:STDOUT: %.loc23: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %Run0.call.loc23: init () = call %Run0.ref.loc23() [template = ] -// CHECK:STDOUT: %Run0.ref.loc31: Run0 = name_ref Run0, file.%Run0.decl [template = constants.%struct.1] +// CHECK:STDOUT: %Run0.ref.loc31: = name_ref Run0, file.%Run0.decl [template = constants.%Run0] // CHECK:STDOUT: %.loc31_8: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %.loc31_11: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %Run0.call.loc31: init () = call %Run0.ref.loc31() [template = ] -// CHECK:STDOUT: %Run1.ref.loc40: Run1 = name_ref Run1, file.%Run1.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Run1.ref.loc40: = name_ref Run1, file.%Run1.decl [template = constants.%Run1] // CHECK:STDOUT: %Run1.call.loc40: init () = call %Run1.ref.loc40() [template = ] -// CHECK:STDOUT: %Run1.ref.loc48: Run1 = name_ref Run1, file.%Run1.decl [template = constants.%struct.3] +// CHECK:STDOUT: %Run1.ref.loc48: = name_ref Run1, file.%Run1.decl [template = constants.%Run1] // CHECK:STDOUT: %.loc48_8: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %.loc48_11: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %Run1.call.loc48: init () = call %Run1.ref.loc48() [template = ] -// CHECK:STDOUT: %Run2.ref.loc57: Run2 = name_ref Run2, file.%Run2.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Run2.ref.loc57: = name_ref Run2, file.%Run2.decl [template = constants.%Run2] // CHECK:STDOUT: %Run2.call.loc57: init () = call %Run2.ref.loc57() [template = ] -// CHECK:STDOUT: %Run2.ref.loc64: Run2 = name_ref Run2, file.%Run2.decl [template = constants.%struct.4] +// CHECK:STDOUT: %Run2.ref.loc64: = name_ref Run2, file.%Run2.decl [template = constants.%Run2] // CHECK:STDOUT: %.loc64: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %Run2.call.loc64: init () = call %Run2.ref.loc64() [template = ] // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/function/call/fail_param_type.carbon b/toolchain/check/testdata/function/call/fail_param_type.carbon index 653f94055bee..78202531003c 100644 --- a/toolchain/check/testdata/function/call/fail_param_type.carbon +++ b/toolchain/check/testdata/function/call/fail_param_type.carbon @@ -23,13 +23,13 @@ fn F() { // CHECK:STDOUT: --- fail_param_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.2: G = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.3: F = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: f64 = float_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -40,15 +40,15 @@ fn F() { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32, %.loc11_9.1 [template = i32] // CHECK:STDOUT: %a.loc11_6.1: i32 = param a // CHECK:STDOUT: @G.%a: i32 = bind_name a, %a.loc11_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.3] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -60,7 +60,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %G.ref: G = name_ref G, file.%G.decl [template = constants.%struct.2] +// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %.loc20: f64 = float_literal 1 [template = constants.%.2] // CHECK:STDOUT: %G.call: init () = call %G.ref() [template = ] // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon index 6c773a046cae..8a5053c8e147 100644 --- a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon +++ b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon @@ -21,16 +21,16 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Float = struct_value () [template] -// CHECK:STDOUT: %Foo: type = fn_type @Foo [template] -// CHECK:STDOUT: %struct.2: Foo = struct_value () [template] +// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] +// CHECK:STDOUT: %Foo: = struct_value () [template] // CHECK:STDOUT: %.3: f64 = float_literal 1 [template] -// CHECK:STDOUT: %Run: type = fn_type @Run [template] -// CHECK:STDOUT: %struct.3: Run = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.4: Int32 = struct_value () [template] +// CHECK:STDOUT: %Run.type: type = fn_type @Run [template] +// CHECK:STDOUT: %Run: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -40,16 +40,16 @@ fn Run() { // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Foo.decl: Foo = fn_decl @Foo [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %.loc11_13.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %float.make_type: init type = call constants.%struct.1(%.loc11_13.1) [template = f64] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc11_13.1) [template = f64] // CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc11_13.3: type = converted %float.make_type, %.loc11_13.2 [template = f64] // CHECK:STDOUT: @Foo.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Run.decl: Run = fn_decl @Run [template = constants.%struct.3] {} -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.4] +// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Float(%size: i32) -> type = "float.make_type"; @@ -62,12 +62,12 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.4() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc17_10.2: type = converted %int.make_type_32, %.loc17_10.1 [template = i32] // CHECK:STDOUT: %x.var: ref i32 = var x // CHECK:STDOUT: %x: ref i32 = bind_name x, %x.var -// CHECK:STDOUT: %Foo.ref: Foo = name_ref Foo, file.%Foo.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Foo.ref: = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %Foo.call: init f64 = call %Foo.ref() // CHECK:STDOUT: assign %x.var, // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/function/call/i32.carbon b/toolchain/check/testdata/function/call/i32.carbon index 7cc38b5f2c2d..876fd9a92bdd 100644 --- a/toolchain/check/testdata/function/call/i32.carbon +++ b/toolchain/check/testdata/function/call/i32.carbon @@ -19,13 +19,13 @@ fn Main() { // CHECK:STDOUT: --- i32.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Echo: type = fn_type @Echo [template] -// CHECK:STDOUT: %struct.2: Echo = struct_value () [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.3: Main = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Echo.type: type = fn_type @Echo [template] +// CHECK:STDOUT: %Echo: = struct_value () [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -36,21 +36,21 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Echo.decl: Echo = fn_decl @Echo [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11_12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Echo.decl: = fn_decl @Echo [template = constants.%Echo] { +// CHECK:STDOUT: %int.make_type_32.loc11_12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_12.1: type = value_of_initializer %int.make_type_32.loc11_12 [template = i32] // CHECK:STDOUT: %.loc11_12.2: type = converted %int.make_type_32.loc11_12, %.loc11_12.1 [template = i32] // CHECK:STDOUT: %a.loc11_9.1: i32 = param a // CHECK:STDOUT: @Echo.%a: i32 = bind_name a, %a.loc11_9.1 -// CHECK:STDOUT: %int.make_type_32.loc11_20: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_20.1: type = value_of_initializer %int.make_type_32.loc11_20 [template = i32] // CHECK:STDOUT: %.loc11_20.2: type = converted %int.make_type_32.loc11_20, %.loc11_20.1 [template = i32] // CHECK:STDOUT: @Echo.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.3] {} -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -63,12 +63,12 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc16_10.2: type = converted %int.make_type_32, %.loc16_10.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var -// CHECK:STDOUT: %Echo.ref: Echo = name_ref Echo, file.%Echo.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Echo.ref: = name_ref Echo, file.%Echo.decl [template = constants.%Echo] // CHECK:STDOUT: %.loc16_21: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %Echo.call: init i32 = call %Echo.ref(%.loc16_21) // CHECK:STDOUT: assign %b.var, %Echo.call diff --git a/toolchain/check/testdata/function/call/more_param_ir.carbon b/toolchain/check/testdata/function/call/more_param_ir.carbon index b18bcbeeaf90..a954a54d52be 100644 --- a/toolchain/check/testdata/function/call/more_param_ir.carbon +++ b/toolchain/check/testdata/function/call/more_param_ir.carbon @@ -19,13 +19,13 @@ fn Main() { // CHECK:STDOUT: --- more_param_ir.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Foo: type = fn_type @Foo [template] -// CHECK:STDOUT: %struct.2: Foo = struct_value () [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.3: Main = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] +// CHECK:STDOUT: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32) [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] @@ -41,22 +41,22 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Foo.decl: Foo = fn_decl @Foo [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32] // CHECK:STDOUT: %a.loc11_8.1: i32 = param a // CHECK:STDOUT: @Foo.%a: i32 = bind_name a, %a.loc11_8.1 -// CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_32.loc11_19 [template = i32] // CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_32.loc11_19, %.loc11_19.1 [template = i32] // CHECK:STDOUT: %b.loc11_16.1: i32 = param b // CHECK:STDOUT: @Foo.%b: i32 = bind_name b, %b.loc11_16.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.3] {} -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -68,7 +68,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_15.1: (type,) = tuple_literal (%int.make_type_32) // CHECK:STDOUT: %.loc14_15.2: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_15.3: type = converted %int.make_type_32, %.loc14_15.2 [template = i32] @@ -80,7 +80,7 @@ fn Main() { // CHECK:STDOUT: %.loc14_22.2: init (i32,) = tuple_init (%.loc14_20) to %x.var [template = constants.%tuple] // CHECK:STDOUT: %.loc14_23: init (i32,) = converted %.loc14_22.1, %.loc14_22.2 [template = constants.%tuple] // CHECK:STDOUT: assign %x.var, %.loc14_23 -// CHECK:STDOUT: %Foo.ref: Foo = name_ref Foo, file.%Foo.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Foo.ref: = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %x.ref: ref (i32,) = name_ref x, %x // CHECK:STDOUT: %.loc16_9: i32 = int_literal 0 [template = constants.%.5] // CHECK:STDOUT: %.loc16_10.1: ref i32 = tuple_index %x.ref, %.loc16_9 diff --git a/toolchain/check/testdata/function/call/no_prelude/alias.carbon b/toolchain/check/testdata/function/call/no_prelude/alias.carbon index 153f801a6d5b..8e5cd22b67c6 100644 --- a/toolchain/check/testdata/function/call/no_prelude/alias.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/alias.carbon @@ -20,11 +20,11 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: type = fn_type @A [template] -// CHECK:STDOUT: %struct.1: A = struct_value () [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.2: Main = struct_value () [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -33,14 +33,14 @@ fn Main() { // CHECK:STDOUT: .B = %B // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct.1] { +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] { // CHECK:STDOUT: %.loc11_12.1: () = tuple_literal () // CHECK:STDOUT: %.loc11_12.2: type = converted %.loc11_12.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: @A.%return: ref () = var // CHECK:STDOUT: } -// CHECK:STDOUT: %A.ref: A = name_ref A, %A.decl [template = constants.%struct.1] -// CHECK:STDOUT: %B: A = bind_alias B, %A.decl [template = constants.%struct.1] -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.2] {} +// CHECK:STDOUT: %A.ref: = name_ref A, %A.decl [template = constants.%A] +// CHECK:STDOUT: %B: = bind_alias B, %A.decl [template = constants.%A] +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() -> () { @@ -57,7 +57,7 @@ fn Main() { // CHECK:STDOUT: %.loc16_11.2: type = converted %.loc16_11.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %b.var: ref () = var b // CHECK:STDOUT: %b: ref () = bind_name b, %b.var -// CHECK:STDOUT: %B.ref: A = name_ref B, file.%B [template = constants.%struct.1] +// CHECK:STDOUT: %B.ref: = name_ref B, file.%B [template = constants.%A] // CHECK:STDOUT: %A.call: init () = call %B.ref() // CHECK:STDOUT: assign %b.var, %A.call // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/function/call/no_prelude/empty_struct.carbon b/toolchain/check/testdata/function/call/no_prelude/empty_struct.carbon index 93de2ec3cf10..13827e5fab59 100644 --- a/toolchain/check/testdata/function/call/no_prelude/empty_struct.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/empty_struct.carbon @@ -20,12 +20,12 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %Echo: type = fn_type @Echo [template] +// CHECK:STDOUT: %Echo.type: type = fn_type @Echo [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Echo = struct_value () [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.2: Main = struct_value () [template] -// CHECK:STDOUT: %struct.3: {} = struct_value () [template] +// CHECK:STDOUT: %Echo: = struct_value () [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %struct: {} = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -33,7 +33,7 @@ fn Main() { // CHECK:STDOUT: .Echo = %Echo.decl // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Echo.decl: Echo = fn_decl @Echo [template = constants.%struct.1] { +// CHECK:STDOUT: %Echo.decl: = fn_decl @Echo [template = constants.%Echo] { // CHECK:STDOUT: %.loc11_13.1: {} = struct_literal () // CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %a.loc11_9.1: {} = param a @@ -42,7 +42,7 @@ fn Main() { // CHECK:STDOUT: %.loc11_20.2: type = converted %.loc11_20.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: @Echo.%return: ref {} = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.2] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Echo(%a: {}) -> {} { @@ -53,10 +53,10 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Echo.ref: Echo = name_ref Echo, file.%Echo.decl [template = constants.%struct.1] +// CHECK:STDOUT: %Echo.ref: = name_ref Echo, file.%Echo.decl [template = constants.%Echo] // CHECK:STDOUT: %.loc16_9: {} = struct_literal () -// CHECK:STDOUT: %struct: {} = struct_value () [template = constants.%struct.3] -// CHECK:STDOUT: %.loc16_7: {} = converted %.loc16_9, %struct [template = constants.%struct.3] +// CHECK:STDOUT: %struct: {} = struct_value () [template = constants.%struct] +// CHECK:STDOUT: %.loc16_7: {} = converted %.loc16_9, %struct [template = constants.%struct] // CHECK:STDOUT: %Echo.call: init {} = call %Echo.ref(%.loc16_7) // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/call/no_prelude/empty_tuple.carbon b/toolchain/check/testdata/function/call/no_prelude/empty_tuple.carbon index 5922b3a1f51e..31391d20bb16 100644 --- a/toolchain/check/testdata/function/call/no_prelude/empty_tuple.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/empty_tuple.carbon @@ -20,10 +20,10 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Echo: type = fn_type @Echo [template] -// CHECK:STDOUT: %struct.1: Echo = struct_value () [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.2: Main = struct_value () [template] +// CHECK:STDOUT: %Echo.type: type = fn_type @Echo [template] +// CHECK:STDOUT: %Echo: = struct_value () [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %tuple: () = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -32,7 +32,7 @@ fn Main() { // CHECK:STDOUT: .Echo = %Echo.decl // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Echo.decl: Echo = fn_decl @Echo [template = constants.%struct.1] { +// CHECK:STDOUT: %Echo.decl: = fn_decl @Echo [template = constants.%Echo] { // CHECK:STDOUT: %.loc11_13.1: () = tuple_literal () // CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %a.loc11_9.1: () = param a @@ -41,7 +41,7 @@ fn Main() { // CHECK:STDOUT: %.loc11_20.2: type = converted %.loc11_20.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: @Echo.%return: ref () = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.2] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Echo(%a: ()) -> () { @@ -52,7 +52,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Echo.ref: Echo = name_ref Echo, file.%Echo.decl [template = constants.%struct.1] +// CHECK:STDOUT: %Echo.ref: = name_ref Echo, file.%Echo.decl [template = constants.%Echo] // CHECK:STDOUT: %.loc16_9: () = tuple_literal () // CHECK:STDOUT: %tuple: () = tuple_value () [template = constants.%tuple] // CHECK:STDOUT: %.loc16_7: () = converted %.loc16_9, %tuple [template = constants.%tuple] diff --git a/toolchain/check/testdata/function/call/no_prelude/params_zero.carbon b/toolchain/check/testdata/function/call/no_prelude/params_zero.carbon index b46d62b4497b..a82e557b09aa 100644 --- a/toolchain/check/testdata/function/call/no_prelude/params_zero.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/params_zero.carbon @@ -17,11 +17,11 @@ fn Main() { // CHECK:STDOUT: --- params_zero.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Foo: type = fn_type @Foo [template] +// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Foo = struct_value () [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.2: Main = struct_value () [template] +// CHECK:STDOUT: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -29,8 +29,8 @@ fn Main() { // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl: Foo = fn_decl @Foo [template = constants.%struct.1] {} -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.2] {} +// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo() { @@ -40,7 +40,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Foo.ref: Foo = name_ref Foo, file.%Foo.decl [template = constants.%struct.1] +// CHECK:STDOUT: %Foo.ref: = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %Foo.call: init () = call %Foo.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/call/no_prelude/return_implicit.carbon b/toolchain/check/testdata/function/call/no_prelude/return_implicit.carbon index 72b53dbd977e..b779381041a7 100644 --- a/toolchain/check/testdata/function/call/no_prelude/return_implicit.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/return_implicit.carbon @@ -18,11 +18,11 @@ fn Main() { // CHECK:STDOUT: --- return_implicit.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %MakeImplicitEmptyTuple: type = fn_type @MakeImplicitEmptyTuple [template] +// CHECK:STDOUT: %MakeImplicitEmptyTuple.type: type = fn_type @MakeImplicitEmptyTuple [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: MakeImplicitEmptyTuple = struct_value () [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.2: Main = struct_value () [template] +// CHECK:STDOUT: %MakeImplicitEmptyTuple: = struct_value () [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -30,8 +30,8 @@ fn Main() { // CHECK:STDOUT: .MakeImplicitEmptyTuple = %MakeImplicitEmptyTuple.decl // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %MakeImplicitEmptyTuple.decl: MakeImplicitEmptyTuple = fn_decl @MakeImplicitEmptyTuple [template = constants.%struct.1] {} -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.2] {} +// CHECK:STDOUT: %MakeImplicitEmptyTuple.decl: = fn_decl @MakeImplicitEmptyTuple [template = constants.%MakeImplicitEmptyTuple] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @MakeImplicitEmptyTuple() { @@ -45,7 +45,7 @@ fn Main() { // CHECK:STDOUT: %.loc15_11.2: type = converted %.loc15_11.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %b.var: ref () = var b // CHECK:STDOUT: %b: ref () = bind_name b, %b.var -// CHECK:STDOUT: %MakeImplicitEmptyTuple.ref: MakeImplicitEmptyTuple = name_ref MakeImplicitEmptyTuple, file.%MakeImplicitEmptyTuple.decl [template = constants.%struct.1] +// CHECK:STDOUT: %MakeImplicitEmptyTuple.ref: = name_ref MakeImplicitEmptyTuple, file.%MakeImplicitEmptyTuple.decl [template = constants.%MakeImplicitEmptyTuple] // CHECK:STDOUT: %MakeImplicitEmptyTuple.call: init () = call %MakeImplicitEmptyTuple.ref() // CHECK:STDOUT: assign %b.var, %MakeImplicitEmptyTuple.call // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/function/call/params_one.carbon b/toolchain/check/testdata/function/call/params_one.carbon index b91347535aa5..3d567514a7f1 100644 --- a/toolchain/check/testdata/function/call/params_one.carbon +++ b/toolchain/check/testdata/function/call/params_one.carbon @@ -17,13 +17,13 @@ fn Main() { // CHECK:STDOUT: --- params_one.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Foo: type = fn_type @Foo [template] -// CHECK:STDOUT: %struct.2: Foo = struct_value () [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.3: Main = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] +// CHECK:STDOUT: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -34,15 +34,15 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Foo.decl: Foo = fn_decl @Foo [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32] // CHECK:STDOUT: %a.loc11_8.1: i32 = param a // CHECK:STDOUT: @Foo.%a: i32 = bind_name a, %a.loc11_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.3] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -54,7 +54,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Foo.ref: Foo = name_ref Foo, file.%Foo.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Foo.ref: = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %.loc14: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %Foo.call: init () = call %Foo.ref(%.loc14) // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/function/call/params_one_comma.carbon b/toolchain/check/testdata/function/call/params_one_comma.carbon index 8f47e3431610..39cdf95a47ec 100644 --- a/toolchain/check/testdata/function/call/params_one_comma.carbon +++ b/toolchain/check/testdata/function/call/params_one_comma.carbon @@ -18,13 +18,13 @@ fn Main() { // CHECK:STDOUT: --- params_one_comma.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Foo: type = fn_type @Foo [template] -// CHECK:STDOUT: %struct.2: Foo = struct_value () [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.3: Main = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] +// CHECK:STDOUT: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -35,15 +35,15 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Foo.decl: Foo = fn_decl @Foo [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32] // CHECK:STDOUT: %a.loc11_8.1: i32 = param a // CHECK:STDOUT: @Foo.%a: i32 = bind_name a, %a.loc11_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.3] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -55,10 +55,10 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Foo.ref.loc14: Foo = name_ref Foo, file.%Foo.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Foo.ref.loc14: = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %.loc14: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %Foo.call.loc14: init () = call %Foo.ref.loc14(%.loc14) -// CHECK:STDOUT: %Foo.ref.loc15: Foo = name_ref Foo, file.%Foo.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Foo.ref.loc15: = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %.loc15: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %Foo.call.loc15: init () = call %Foo.ref.loc15(%.loc15) // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/function/call/params_two.carbon b/toolchain/check/testdata/function/call/params_two.carbon index 3cafa0719dea..8bbb396a5544 100644 --- a/toolchain/check/testdata/function/call/params_two.carbon +++ b/toolchain/check/testdata/function/call/params_two.carbon @@ -17,13 +17,13 @@ fn Main() { // CHECK:STDOUT: --- params_two.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Foo: type = fn_type @Foo [template] -// CHECK:STDOUT: %struct.2: Foo = struct_value () [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.3: Main = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] +// CHECK:STDOUT: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: } @@ -35,21 +35,21 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Foo.decl: Foo = fn_decl @Foo [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32] // CHECK:STDOUT: %a.loc11_8.1: i32 = param a // CHECK:STDOUT: @Foo.%a: i32 = bind_name a, %a.loc11_8.1 -// CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_32.loc11_19 [template = i32] // CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_32.loc11_19, %.loc11_19.1 [template = i32] // CHECK:STDOUT: %b.loc11_16.1: i32 = param b // CHECK:STDOUT: @Foo.%b: i32 = bind_name b, %b.loc11_16.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.3] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -61,7 +61,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Foo.ref: Foo = name_ref Foo, file.%Foo.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Foo.ref: = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %.loc14_7: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc14_10: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %Foo.call: init () = call %Foo.ref(%.loc14_7, %.loc14_10) diff --git a/toolchain/check/testdata/function/call/params_two_comma.carbon b/toolchain/check/testdata/function/call/params_two_comma.carbon index 0dcd50e37e85..827b57141218 100644 --- a/toolchain/check/testdata/function/call/params_two_comma.carbon +++ b/toolchain/check/testdata/function/call/params_two_comma.carbon @@ -18,13 +18,13 @@ fn Main() { // CHECK:STDOUT: --- params_two_comma.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Foo: type = fn_type @Foo [template] -// CHECK:STDOUT: %struct.2: Foo = struct_value () [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.3: Main = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] +// CHECK:STDOUT: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: } @@ -36,21 +36,21 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Foo.decl: Foo = fn_decl @Foo [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32] // CHECK:STDOUT: %a.loc11_8.1: i32 = param a // CHECK:STDOUT: @Foo.%a: i32 = bind_name a, %a.loc11_8.1 -// CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_32.loc11_19 [template = i32] // CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_32.loc11_19, %.loc11_19.1 [template = i32] // CHECK:STDOUT: %b.loc11_16.1: i32 = param b // CHECK:STDOUT: @Foo.%b: i32 = bind_name b, %b.loc11_16.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.3] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -62,11 +62,11 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Foo.ref.loc14: Foo = name_ref Foo, file.%Foo.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Foo.ref.loc14: = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %.loc14_7: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc14_10: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %Foo.call.loc14: init () = call %Foo.ref.loc14(%.loc14_7, %.loc14_10) -// CHECK:STDOUT: %Foo.ref.loc15: Foo = name_ref Foo, file.%Foo.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Foo.ref.loc15: = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %.loc15_7: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc15_10: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %Foo.call.loc15: init () = call %Foo.ref.loc15(%.loc15_7, %.loc15_10) diff --git a/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon b/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon index 7277e440c9f3..eef8d30af78a 100644 --- a/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon +++ b/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon @@ -16,11 +16,11 @@ fn F(n: i32, a: [i32; n]*); // CHECK:STDOUT: --- fail_param_in_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -29,15 +29,15 @@ fn F(n: i32, a: [i32; n]*); // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc14_9: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc14_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_9.1: type = value_of_initializer %int.make_type_32.loc14_9 [template = i32] // CHECK:STDOUT: %.loc14_9.2: type = converted %int.make_type_32.loc14_9, %.loc14_9.1 [template = i32] // CHECK:STDOUT: %n.loc14_6.1: i32 = param n // CHECK:STDOUT: @F.%n: i32 = bind_name n, %n.loc14_6.1 -// CHECK:STDOUT: %int.make_type_32.loc14_18: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %n.ref: i32 = name_ref n, @F.%n // CHECK:STDOUT: %.loc14_25: type = ptr_type [template = ] // CHECK:STDOUT: %a.loc14_14.1: = param a diff --git a/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon b/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon index 9735a394507e..a243a74b4112 100644 --- a/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon +++ b/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon @@ -19,11 +19,11 @@ fn F(n: i32, n: i32); // CHECK:STDOUT: --- fail_param_redecl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -32,15 +32,15 @@ fn F(n: i32, n: i32); // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc17_9: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc17_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_9.1: type = value_of_initializer %int.make_type_32.loc17_9 [template = i32] // CHECK:STDOUT: %.loc17_9.2: type = converted %int.make_type_32.loc17_9, %.loc17_9.1 [template = i32] // CHECK:STDOUT: %n.loc17_6.1: i32 = param n // CHECK:STDOUT: @F.%n.loc17_6: i32 = bind_name n, %n.loc17_6.1 -// CHECK:STDOUT: %int.make_type_32.loc17_17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc17_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_17.1: type = value_of_initializer %int.make_type_32.loc17_17 [template = i32] // CHECK:STDOUT: %.loc17_17.2: type = converted %int.make_type_32.loc17_17, %.loc17_17.1 [template = i32] // CHECK:STDOUT: %n.loc17_14.1: i32 = param n diff --git a/toolchain/check/testdata/function/declaration/import.carbon b/toolchain/check/testdata/function/declaration/import.carbon index 1f5f3fa40b5a..c471ceff0509 100644 --- a/toolchain/check/testdata/function/declaration/import.carbon +++ b/toolchain/check/testdata/function/declaration/import.carbon @@ -370,22 +370,22 @@ import library "extern_api"; // CHECK:STDOUT: --- api.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: A = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %B: type = fn_type @B [template] -// CHECK:STDOUT: %struct.3: B = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] +// CHECK:STDOUT: %B: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32) [template] // CHECK:STDOUT: %.4: type = struct_type {.c: i32} [template] -// CHECK:STDOUT: %C: type = fn_type @C [template] -// CHECK:STDOUT: %struct.4: C = struct_value () [template] -// CHECK:STDOUT: %D: type = fn_type @D [template] -// CHECK:STDOUT: %struct.5: D = struct_value () [template] -// CHECK:STDOUT: %E: type = fn_type @E [template] -// CHECK:STDOUT: %struct.6: E = struct_value () [template] +// CHECK:STDOUT: %C.type: type = fn_type @C [template] +// CHECK:STDOUT: %C: = struct_value () [template] +// CHECK:STDOUT: %D.type: type = fn_type @D [template] +// CHECK:STDOUT: %D: = struct_value () [template] +// CHECK:STDOUT: %E.type: type = fn_type @E [template] +// CHECK:STDOUT: %E: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -398,41 +398,41 @@ import library "extern_api"; // CHECK:STDOUT: .NS = %NS // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %B.decl: B = fn_decl @B [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc5_9: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %int.make_type_32.loc5_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_9.1: type = value_of_initializer %int.make_type_32.loc5_9 [template = i32] // CHECK:STDOUT: %.loc5_9.2: type = converted %int.make_type_32.loc5_9, %.loc5_9.1 [template = i32] // CHECK:STDOUT: %b.loc5_6.1: i32 = param b // CHECK:STDOUT: @B.%b: i32 = bind_name b, %b.loc5_6.1 -// CHECK:STDOUT: %int.make_type_32.loc5_17: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc5_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_17.1: type = value_of_initializer %int.make_type_32.loc5_17 [template = i32] // CHECK:STDOUT: %.loc5_17.2: type = converted %int.make_type_32.loc5_17, %.loc5_17.1 [template = i32] // CHECK:STDOUT: @B.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %C.decl: C = fn_decl @C [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32.loc6_10: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %C.decl: = fn_decl @C [template = constants.%C] { +// CHECK:STDOUT: %int.make_type_32.loc6_10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_14.1: (type,) = tuple_literal (%int.make_type_32.loc6_10) // CHECK:STDOUT: %.loc6_14.2: type = value_of_initializer %int.make_type_32.loc6_10 [template = i32] // CHECK:STDOUT: %.loc6_14.3: type = converted %int.make_type_32.loc6_10, %.loc6_14.2 [template = i32] // CHECK:STDOUT: %.loc6_14.4: type = converted %.loc6_14.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %c.loc6_6.1: (i32,) = param c // CHECK:STDOUT: @C.%c: (i32,) = bind_name c, %c.loc6_6.1 -// CHECK:STDOUT: %int.make_type_32.loc6_25: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc6_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_25.1: type = value_of_initializer %int.make_type_32.loc6_25 [template = i32] // CHECK:STDOUT: %.loc6_25.2: type = converted %int.make_type_32.loc6_25, %.loc6_25.1 [template = i32] // CHECK:STDOUT: %.loc6_28: type = struct_type {.c: i32} [template = constants.%.4] // CHECK:STDOUT: @C.%return: ref {.c: i32} = var // CHECK:STDOUT: } -// CHECK:STDOUT: %D.decl: D = fn_decl @D [template = constants.%struct.5] {} +// CHECK:STDOUT: %D.decl: = fn_decl @D [template = constants.%D] {} // CHECK:STDOUT: %NS: = namespace [template] { // CHECK:STDOUT: .E = %E.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %E.decl: E = fn_decl @E [template = constants.%struct.6] {} +// CHECK:STDOUT: %E.decl: = fn_decl @E [template = constants.%E] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -450,22 +450,22 @@ import library "extern_api"; // CHECK:STDOUT: --- extern_api.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: A = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %B: type = fn_type @B [template] -// CHECK:STDOUT: %struct.3: B = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] +// CHECK:STDOUT: %B: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32) [template] // CHECK:STDOUT: %.4: type = struct_type {.c: i32} [template] -// CHECK:STDOUT: %C: type = fn_type @C [template] -// CHECK:STDOUT: %struct.4: C = struct_value () [template] -// CHECK:STDOUT: %D: type = fn_type @D [template] -// CHECK:STDOUT: %struct.5: D = struct_value () [template] -// CHECK:STDOUT: %E: type = fn_type @E [template] -// CHECK:STDOUT: %struct.6: E = struct_value () [template] +// CHECK:STDOUT: %C.type: type = fn_type @C [template] +// CHECK:STDOUT: %C: = struct_value () [template] +// CHECK:STDOUT: %D.type: type = fn_type @D [template] +// CHECK:STDOUT: %D: = struct_value () [template] +// CHECK:STDOUT: %E.type: type = fn_type @E [template] +// CHECK:STDOUT: %E: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -478,41 +478,41 @@ import library "extern_api"; // CHECK:STDOUT: .NS = %NS // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %B.decl: B = fn_decl @B [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc5_16: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %int.make_type_32.loc5_16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_16.1: type = value_of_initializer %int.make_type_32.loc5_16 [template = i32] // CHECK:STDOUT: %.loc5_16.2: type = converted %int.make_type_32.loc5_16, %.loc5_16.1 [template = i32] // CHECK:STDOUT: %b.loc5_13.1: i32 = param b // CHECK:STDOUT: @B.%b: i32 = bind_name b, %b.loc5_13.1 -// CHECK:STDOUT: %int.make_type_32.loc5_24: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc5_24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_24.1: type = value_of_initializer %int.make_type_32.loc5_24 [template = i32] // CHECK:STDOUT: %.loc5_24.2: type = converted %int.make_type_32.loc5_24, %.loc5_24.1 [template = i32] // CHECK:STDOUT: @B.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %C.decl: C = fn_decl @C [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32.loc6_17: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %C.decl: = fn_decl @C [template = constants.%C] { +// CHECK:STDOUT: %int.make_type_32.loc6_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_21.1: (type,) = tuple_literal (%int.make_type_32.loc6_17) // CHECK:STDOUT: %.loc6_21.2: type = value_of_initializer %int.make_type_32.loc6_17 [template = i32] // CHECK:STDOUT: %.loc6_21.3: type = converted %int.make_type_32.loc6_17, %.loc6_21.2 [template = i32] // CHECK:STDOUT: %.loc6_21.4: type = converted %.loc6_21.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %c.loc6_13.1: (i32,) = param c // CHECK:STDOUT: @C.%c: (i32,) = bind_name c, %c.loc6_13.1 -// CHECK:STDOUT: %int.make_type_32.loc6_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc6_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_32.1: type = value_of_initializer %int.make_type_32.loc6_32 [template = i32] // CHECK:STDOUT: %.loc6_32.2: type = converted %int.make_type_32.loc6_32, %.loc6_32.1 [template = i32] // CHECK:STDOUT: %.loc6_35: type = struct_type {.c: i32} [template = constants.%.4] // CHECK:STDOUT: @C.%return: ref {.c: i32} = var // CHECK:STDOUT: } -// CHECK:STDOUT: %D.decl: D = fn_decl @D [template = constants.%struct.5] {} +// CHECK:STDOUT: %D.decl: = fn_decl @D [template = constants.%D] {} // CHECK:STDOUT: %NS: = namespace [template] { // CHECK:STDOUT: .E = %E.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %E.decl: E = fn_decl @E [template = constants.%struct.6] {} +// CHECK:STDOUT: %E.decl: = fn_decl @E [template = constants.%E] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: extern fn @A(); @@ -531,22 +531,22 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: type = fn_type @A [template] -// CHECK:STDOUT: %struct.1: A = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %B: type = fn_type @B [template] -// CHECK:STDOUT: %struct.3: B = struct_value () [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] +// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] +// CHECK:STDOUT: %B: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: type = struct_type {.c: i32} [template] // CHECK:STDOUT: %.4: type = tuple_type (i32) [template] -// CHECK:STDOUT: %C: type = fn_type @C [template] -// CHECK:STDOUT: %struct.4: C = struct_value () [template] +// CHECK:STDOUT: %C.type: type = fn_type @C [template] +// CHECK:STDOUT: %C: = struct_value () [template] // CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.2) [template] -// CHECK:STDOUT: %D: type = fn_type @D [template] -// CHECK:STDOUT: %struct.5: D = struct_value () [template] -// CHECK:STDOUT: %E: type = fn_type @E [template] -// CHECK:STDOUT: %struct.6: E = struct_value () [template] +// CHECK:STDOUT: %D.type: type = fn_type @D [template] +// CHECK:STDOUT: %D: = struct_value () [template] +// CHECK:STDOUT: %E.type: type = fn_type @E [template] +// CHECK:STDOUT: %E: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -563,28 +563,28 @@ import library "extern_api"; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: .e = %e // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: A = import_ref ir1, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: B = import_ref ir1, inst+21, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %import_ref.3: C = import_ref ir1, inst+43, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %import_ref.4: D = import_ref ir1, inst+46, loaded [template = constants.%struct.5] +// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+2, loaded [template = constants.%A] +// CHECK:STDOUT: %import_ref.2: = import_ref ir1, inst+21, loaded [template = constants.%B] +// CHECK:STDOUT: %import_ref.3: = import_ref ir1, inst+43, loaded [template = constants.%C] +// CHECK:STDOUT: %import_ref.4: = import_ref ir1, inst+46, loaded [template = constants.%D] // CHECK:STDOUT: %import_ref.5: = import_ref ir1, inst+49, loaded // CHECK:STDOUT: %NS: = namespace %import_ref.5, [template] { // CHECK:STDOUT: .E = %import_ref.6 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: E = import_ref ir1, inst+50, loaded [template = constants.%struct.6] +// CHECK:STDOUT: %import_ref.6: = import_ref ir1, inst+50, loaded [template = constants.%E] // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %.loc6_9.1: () = tuple_literal () // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %a.var: ref () = var a // CHECK:STDOUT: %a: ref () = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_32.loc7, %.loc7_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_13.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_13.2: type = converted %int.make_type_32.loc8, %.loc8_13.1 [template = i32] // CHECK:STDOUT: %.loc8_16: type = struct_type {.c: i32} [template = constants.%.3] @@ -614,25 +614,25 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: A = name_ref A, file.%import_ref.1 [template = constants.%struct.1] +// CHECK:STDOUT: %A.ref: = name_ref A, file.%import_ref.1 [template = constants.%A] // CHECK:STDOUT: %A.call: init () = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call -// CHECK:STDOUT: %B.ref: B = name_ref B, file.%import_ref.2 [template = constants.%struct.3] +// CHECK:STDOUT: %B.ref: = name_ref B, file.%import_ref.2 [template = constants.%B] // CHECK:STDOUT: %.loc7: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc7) // CHECK:STDOUT: assign file.%b.var, %B.call -// CHECK:STDOUT: %C.ref: C = name_ref C, file.%import_ref.3 [template = constants.%struct.4] +// CHECK:STDOUT: %C.ref: = name_ref C, file.%import_ref.3 [template = constants.%C] // CHECK:STDOUT: %.loc8_23: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc8_25: (i32,) = tuple_literal (%.loc8_23) // CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.loc8_23) [template = constants.%tuple] // CHECK:STDOUT: %.loc8_21: (i32,) = converted %.loc8_25, %tuple [template = constants.%tuple] // CHECK:STDOUT: %C.call: init {.c: i32} = call %C.ref(%.loc8_21) // CHECK:STDOUT: assign file.%c.var, %C.call -// CHECK:STDOUT: %D.ref: D = name_ref D, file.%import_ref.4 [template = constants.%struct.5] +// CHECK:STDOUT: %D.ref: = name_ref D, file.%import_ref.4 [template = constants.%D] // CHECK:STDOUT: %D.call: init () = call %D.ref() // CHECK:STDOUT: assign file.%d.var, %D.call // CHECK:STDOUT: %NS.ref: = name_ref NS, file.%NS [template = file.%NS] -// CHECK:STDOUT: %E.ref: E = name_ref E, file.%import_ref.6 [template = constants.%struct.6] +// CHECK:STDOUT: %E.ref: = name_ref E, file.%import_ref.6 [template = constants.%E] // CHECK:STDOUT: %E.call: init () = call %E.ref() // CHECK:STDOUT: assign file.%e.var, %E.call // CHECK:STDOUT: return @@ -641,22 +641,22 @@ import library "extern_api"; // CHECK:STDOUT: --- redecl_api.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: A = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %B: type = fn_type @B [template] -// CHECK:STDOUT: %struct.3: B = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] +// CHECK:STDOUT: %B: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32) [template] // CHECK:STDOUT: %.4: type = struct_type {.c: i32} [template] -// CHECK:STDOUT: %C: type = fn_type @C [template] -// CHECK:STDOUT: %struct.4: C = struct_value () [template] -// CHECK:STDOUT: %D: type = fn_type @D [template] -// CHECK:STDOUT: %struct.5: D = struct_value () [template] -// CHECK:STDOUT: %E: type = fn_type @E [template] -// CHECK:STDOUT: %struct.6: E = struct_value () [template] +// CHECK:STDOUT: %C.type: type = fn_type @C [template] +// CHECK:STDOUT: %C: = struct_value () [template] +// CHECK:STDOUT: %D.type: type = fn_type @D [template] +// CHECK:STDOUT: %D: = struct_value () [template] +// CHECK:STDOUT: %E.type: type = fn_type @E [template] +// CHECK:STDOUT: %E: = struct_value () [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.5) [template] // CHECK:STDOUT: } @@ -675,60 +675,60 @@ import library "extern_api"; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: .e = %e // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: A = import_ref ir1, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: B = import_ref ir1, inst+21, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %import_ref.3: C = import_ref ir1, inst+43, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %import_ref.4: D = import_ref ir1, inst+46, loaded [template = constants.%struct.5] +// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+2, loaded [template = constants.%A] +// CHECK:STDOUT: %import_ref.2: = import_ref ir1, inst+21, loaded [template = constants.%B] +// CHECK:STDOUT: %import_ref.3: = import_ref ir1, inst+43, loaded [template = constants.%C] +// CHECK:STDOUT: %import_ref.4: = import_ref ir1, inst+46, loaded [template = constants.%D] // CHECK:STDOUT: %import_ref.5: = import_ref ir1, inst+49, loaded // CHECK:STDOUT: %NS: = namespace %import_ref.5, [template] { // CHECK:STDOUT: .E = %E.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: E = import_ref ir1, inst+50, loaded [template = constants.%struct.6] +// CHECK:STDOUT: %import_ref.6: = import_ref ir1, inst+50, loaded [template = constants.%E] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %B.decl: B = fn_decl @B [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc7_16: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %import_ref.7: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %int.make_type_32.loc7_16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_16.1: type = value_of_initializer %int.make_type_32.loc7_16 [template = i32] // CHECK:STDOUT: %.loc7_16.2: type = converted %int.make_type_32.loc7_16, %.loc7_16.1 [template = i32] // CHECK:STDOUT: %b.loc7_13.1: i32 = param b // CHECK:STDOUT: %b.loc7_13.2: i32 = bind_name b, %b.loc7_13.1 -// CHECK:STDOUT: %int.make_type_32.loc7_24: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_24.1: type = value_of_initializer %int.make_type_32.loc7_24 [template = i32] // CHECK:STDOUT: %.loc7_24.2: type = converted %int.make_type_32.loc7_24, %.loc7_24.1 [template = i32] // CHECK:STDOUT: %return.var.loc7: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.10: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %C.decl: C = fn_decl @C [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32.loc8_17: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.9: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.10: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %C.decl: = fn_decl @C [template = constants.%C] { +// CHECK:STDOUT: %int.make_type_32.loc8_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_21.1: (type,) = tuple_literal (%int.make_type_32.loc8_17) // CHECK:STDOUT: %.loc8_21.2: type = value_of_initializer %int.make_type_32.loc8_17 [template = i32] // CHECK:STDOUT: %.loc8_21.3: type = converted %int.make_type_32.loc8_17, %.loc8_21.2 [template = i32] // CHECK:STDOUT: %.loc8_21.4: type = converted %.loc8_21.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %c.loc8_13.1: (i32,) = param c // CHECK:STDOUT: %c.loc8_13.2: (i32,) = bind_name c, %c.loc8_13.1 -// CHECK:STDOUT: %int.make_type_32.loc8_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc8_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_32.1: type = value_of_initializer %int.make_type_32.loc8_32 [template = i32] // CHECK:STDOUT: %.loc8_32.2: type = converted %int.make_type_32.loc8_32, %.loc8_32.1 [template = i32] // CHECK:STDOUT: %.loc8_35: type = struct_type {.c: i32} [template = constants.%.4] // CHECK:STDOUT: %return.var.loc8: ref {.c: i32} = var // CHECK:STDOUT: } -// CHECK:STDOUT: %D.decl: D = fn_decl @D [template = constants.%struct.5] {} -// CHECK:STDOUT: %E.decl: E = fn_decl @E [template = constants.%struct.6] {} +// CHECK:STDOUT: %D.decl: = fn_decl @D [template = constants.%D] {} +// CHECK:STDOUT: %E.decl: = fn_decl @E [template = constants.%E] {} // CHECK:STDOUT: %.loc12_9.1: () = tuple_literal () // CHECK:STDOUT: %.loc12_9.2: type = converted %.loc12_9.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %a.var: ref () = var a // CHECK:STDOUT: %a: ref () = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.11: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.11: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_8.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_8.2: type = converted %int.make_type_32.loc13, %.loc13_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b.loc13: ref i32 = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.12: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.12: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] // CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_32.loc14, %.loc14_13.1 [template = i32] // CHECK:STDOUT: %.loc14_16: type = struct_type {.c: i32} [template = constants.%.4] @@ -758,25 +758,25 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: A = name_ref A, file.%A.decl [template = constants.%struct.1] +// CHECK:STDOUT: %A.ref: = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %A.call: init () = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call -// CHECK:STDOUT: %B.ref: B = name_ref B, file.%B.decl [template = constants.%struct.3] +// CHECK:STDOUT: %B.ref: = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %.loc13: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc13) // CHECK:STDOUT: assign file.%b.var, %B.call -// CHECK:STDOUT: %C.ref: C = name_ref C, file.%C.decl [template = constants.%struct.4] +// CHECK:STDOUT: %C.ref: = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc14_23: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc14_25: (i32,) = tuple_literal (%.loc14_23) // CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.loc14_23) [template = constants.%tuple] // CHECK:STDOUT: %.loc14_21: (i32,) = converted %.loc14_25, %tuple [template = constants.%tuple] // CHECK:STDOUT: %C.call: init {.c: i32} = call %C.ref(%.loc14_21) // CHECK:STDOUT: assign file.%c.var, %C.call -// CHECK:STDOUT: %D.ref: D = name_ref D, file.%D.decl [template = constants.%struct.5] +// CHECK:STDOUT: %D.ref: = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %D.call: init () = call %D.ref() // CHECK:STDOUT: assign file.%d.var, %D.call // CHECK:STDOUT: %NS.ref: = name_ref NS, file.%NS [template = file.%NS] -// CHECK:STDOUT: %E.ref: E = name_ref E, file.%E.decl [template = constants.%struct.6] +// CHECK:STDOUT: %E.ref: = name_ref E, file.%E.decl [template = constants.%E] // CHECK:STDOUT: %E.call: init () = call %E.ref() // CHECK:STDOUT: assign file.%e.var, %E.call // CHECK:STDOUT: return @@ -785,22 +785,22 @@ import library "extern_api"; // CHECK:STDOUT: --- redecl_extern_api.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: A = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %B: type = fn_type @B [template] -// CHECK:STDOUT: %struct.3: B = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] +// CHECK:STDOUT: %B: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32) [template] // CHECK:STDOUT: %.4: type = struct_type {.c: i32} [template] -// CHECK:STDOUT: %C: type = fn_type @C [template] -// CHECK:STDOUT: %struct.4: C = struct_value () [template] -// CHECK:STDOUT: %D: type = fn_type @D [template] -// CHECK:STDOUT: %struct.5: D = struct_value () [template] -// CHECK:STDOUT: %E: type = fn_type @E [template] -// CHECK:STDOUT: %struct.6: E = struct_value () [template] +// CHECK:STDOUT: %C.type: type = fn_type @C [template] +// CHECK:STDOUT: %C: = struct_value () [template] +// CHECK:STDOUT: %D.type: type = fn_type @D [template] +// CHECK:STDOUT: %D: = struct_value () [template] +// CHECK:STDOUT: %E.type: type = fn_type @E [template] +// CHECK:STDOUT: %E: = struct_value () [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.5) [template] // CHECK:STDOUT: } @@ -819,60 +819,60 @@ import library "extern_api"; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: .e = %e // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: A = import_ref ir1, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: B = import_ref ir1, inst+21, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %import_ref.3: C = import_ref ir1, inst+43, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %import_ref.4: D = import_ref ir1, inst+46, loaded [template = constants.%struct.5] +// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+2, loaded [template = constants.%A] +// CHECK:STDOUT: %import_ref.2: = import_ref ir1, inst+21, loaded [template = constants.%B] +// CHECK:STDOUT: %import_ref.3: = import_ref ir1, inst+43, loaded [template = constants.%C] +// CHECK:STDOUT: %import_ref.4: = import_ref ir1, inst+46, loaded [template = constants.%D] // CHECK:STDOUT: %import_ref.5: = import_ref ir1, inst+49, loaded // CHECK:STDOUT: %NS: = namespace %import_ref.5, [template] { // CHECK:STDOUT: .E = %E.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: E = import_ref ir1, inst+50, loaded [template = constants.%struct.6] +// CHECK:STDOUT: %import_ref.6: = import_ref ir1, inst+50, loaded [template = constants.%E] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %B.decl: B = fn_decl @B [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc7_16: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %import_ref.7: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %int.make_type_32.loc7_16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_16.1: type = value_of_initializer %int.make_type_32.loc7_16 [template = i32] // CHECK:STDOUT: %.loc7_16.2: type = converted %int.make_type_32.loc7_16, %.loc7_16.1 [template = i32] // CHECK:STDOUT: %b.loc7_13.1: i32 = param b // CHECK:STDOUT: %b.loc7_13.2: i32 = bind_name b, %b.loc7_13.1 -// CHECK:STDOUT: %int.make_type_32.loc7_24: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7_24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_24.1: type = value_of_initializer %int.make_type_32.loc7_24 [template = i32] // CHECK:STDOUT: %.loc7_24.2: type = converted %int.make_type_32.loc7_24, %.loc7_24.1 [template = i32] // CHECK:STDOUT: %return.var.loc7: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.10: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %C.decl: C = fn_decl @C [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32.loc8_17: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.9: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.10: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %C.decl: = fn_decl @C [template = constants.%C] { +// CHECK:STDOUT: %int.make_type_32.loc8_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_21.1: (type,) = tuple_literal (%int.make_type_32.loc8_17) // CHECK:STDOUT: %.loc8_21.2: type = value_of_initializer %int.make_type_32.loc8_17 [template = i32] // CHECK:STDOUT: %.loc8_21.3: type = converted %int.make_type_32.loc8_17, %.loc8_21.2 [template = i32] // CHECK:STDOUT: %.loc8_21.4: type = converted %.loc8_21.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %c.loc8_13.1: (i32,) = param c // CHECK:STDOUT: %c.loc8_13.2: (i32,) = bind_name c, %c.loc8_13.1 -// CHECK:STDOUT: %int.make_type_32.loc8_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc8_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_32.1: type = value_of_initializer %int.make_type_32.loc8_32 [template = i32] // CHECK:STDOUT: %.loc8_32.2: type = converted %int.make_type_32.loc8_32, %.loc8_32.1 [template = i32] // CHECK:STDOUT: %.loc8_35: type = struct_type {.c: i32} [template = constants.%.4] // CHECK:STDOUT: %return.var.loc8: ref {.c: i32} = var // CHECK:STDOUT: } -// CHECK:STDOUT: %D.decl: D = fn_decl @D [template = constants.%struct.5] {} -// CHECK:STDOUT: %E.decl: E = fn_decl @E [template = constants.%struct.6] {} +// CHECK:STDOUT: %D.decl: = fn_decl @D [template = constants.%D] {} +// CHECK:STDOUT: %E.decl: = fn_decl @E [template = constants.%E] {} // CHECK:STDOUT: %.loc12_9.1: () = tuple_literal () // CHECK:STDOUT: %.loc12_9.2: type = converted %.loc12_9.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %a.var: ref () = var a // CHECK:STDOUT: %a: ref () = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.11: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.11: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_8.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_8.2: type = converted %int.make_type_32.loc13, %.loc13_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b.loc13: ref i32 = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.12: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.12: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] // CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_32.loc14, %.loc14_13.1 [template = i32] // CHECK:STDOUT: %.loc14_16: type = struct_type {.c: i32} [template = constants.%.4] @@ -902,25 +902,25 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: A = name_ref A, file.%A.decl [template = constants.%struct.1] +// CHECK:STDOUT: %A.ref: = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %A.call: init () = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call -// CHECK:STDOUT: %B.ref: B = name_ref B, file.%B.decl [template = constants.%struct.3] +// CHECK:STDOUT: %B.ref: = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %.loc13: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc13) // CHECK:STDOUT: assign file.%b.var, %B.call -// CHECK:STDOUT: %C.ref: C = name_ref C, file.%C.decl [template = constants.%struct.4] +// CHECK:STDOUT: %C.ref: = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc14_23: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc14_25: (i32,) = tuple_literal (%.loc14_23) // CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.loc14_23) [template = constants.%tuple] // CHECK:STDOUT: %.loc14_21: (i32,) = converted %.loc14_25, %tuple [template = constants.%tuple] // CHECK:STDOUT: %C.call: init {.c: i32} = call %C.ref(%.loc14_21) // CHECK:STDOUT: assign file.%c.var, %C.call -// CHECK:STDOUT: %D.ref: D = name_ref D, file.%D.decl [template = constants.%struct.5] +// CHECK:STDOUT: %D.ref: = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %D.call: init () = call %D.ref() // CHECK:STDOUT: assign file.%d.var, %D.call // CHECK:STDOUT: %NS.ref: = name_ref NS, file.%NS [template = file.%NS] -// CHECK:STDOUT: %E.ref: E = name_ref E, file.%E.decl [template = constants.%struct.6] +// CHECK:STDOUT: %E.ref: = name_ref E, file.%E.decl [template = constants.%E] // CHECK:STDOUT: %E.call: init () = call %E.ref() // CHECK:STDOUT: assign file.%e.var, %E.call // CHECK:STDOUT: return @@ -930,22 +930,22 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: type = fn_type @A [template] -// CHECK:STDOUT: %struct.1: A = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %B: type = fn_type @B [template] -// CHECK:STDOUT: %struct.3: B = struct_value () [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] +// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] +// CHECK:STDOUT: %B: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: type = struct_type {.c: i32} [template] // CHECK:STDOUT: %.4: type = tuple_type (i32) [template] -// CHECK:STDOUT: %C: type = fn_type @C [template] -// CHECK:STDOUT: %struct.4: C = struct_value () [template] +// CHECK:STDOUT: %C.type: type = fn_type @C [template] +// CHECK:STDOUT: %C: = struct_value () [template] // CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.2) [template] -// CHECK:STDOUT: %D: type = fn_type @D [template] -// CHECK:STDOUT: %struct.5: D = struct_value () [template] -// CHECK:STDOUT: %E: type = fn_type @E [template] -// CHECK:STDOUT: %struct.6: E = struct_value () [template] +// CHECK:STDOUT: %D.type: type = fn_type @D [template] +// CHECK:STDOUT: %D: = struct_value () [template] +// CHECK:STDOUT: %E.type: type = fn_type @E [template] +// CHECK:STDOUT: %E: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -962,15 +962,15 @@ import library "extern_api"; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: .e = %e // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: A = import_ref ir1, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: B = import_ref ir1, inst+21, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %import_ref.3: C = import_ref ir1, inst+43, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %import_ref.4: D = import_ref ir1, inst+46, loaded [template = constants.%struct.5] +// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+2, loaded [template = constants.%A] +// CHECK:STDOUT: %import_ref.2: = import_ref ir1, inst+21, loaded [template = constants.%B] +// CHECK:STDOUT: %import_ref.3: = import_ref ir1, inst+43, loaded [template = constants.%C] +// CHECK:STDOUT: %import_ref.4: = import_ref ir1, inst+46, loaded [template = constants.%D] // CHECK:STDOUT: %import_ref.5: = import_ref ir1, inst+49, loaded // CHECK:STDOUT: %NS: = namespace %import_ref.5, [template] { // CHECK:STDOUT: .E = %import_ref.6 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: E = import_ref ir1, inst+50, loaded [template = constants.%struct.6] +// CHECK:STDOUT: %import_ref.6: = import_ref ir1, inst+50, loaded [template = constants.%E] // CHECK:STDOUT: %import_ref.7 = import_ref ir2, inst+2, unloaded // CHECK:STDOUT: %import_ref.8 = import_ref ir2, inst+21, unloaded // CHECK:STDOUT: %import_ref.9 = import_ref ir2, inst+43, unloaded @@ -981,14 +981,14 @@ import library "extern_api"; // CHECK:STDOUT: %.loc72_9.2: type = converted %.loc72_9.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %a.var: ref () = var a // CHECK:STDOUT: %a: ref () = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.12: Int32 = import_ref ir5, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %int.make_type_32.loc73: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.12: = import_ref ir5, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc73: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc73_8.1: type = value_of_initializer %int.make_type_32.loc73 [template = i32] // CHECK:STDOUT: %.loc73_8.2: type = converted %int.make_type_32.loc73, %.loc73_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.13: Int32 = import_ref ir5, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %int.make_type_32.loc74: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.13: = import_ref ir5, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc74: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc74_13.1: type = value_of_initializer %int.make_type_32.loc74 [template = i32] // CHECK:STDOUT: %.loc74_13.2: type = converted %int.make_type_32.loc74, %.loc74_13.1 [template = i32] // CHECK:STDOUT: %.loc74_16: type = struct_type {.c: i32} [template = constants.%.3] @@ -1018,25 +1018,25 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: A = name_ref A, file.%import_ref.1 [template = constants.%struct.1] +// CHECK:STDOUT: %A.ref: = name_ref A, file.%import_ref.1 [template = constants.%A] // CHECK:STDOUT: %A.call: init () = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call -// CHECK:STDOUT: %B.ref: B = name_ref B, file.%import_ref.2 [template = constants.%struct.3] +// CHECK:STDOUT: %B.ref: = name_ref B, file.%import_ref.2 [template = constants.%B] // CHECK:STDOUT: %.loc73: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc73) // CHECK:STDOUT: assign file.%b.var, %B.call -// CHECK:STDOUT: %C.ref: C = name_ref C, file.%import_ref.3 [template = constants.%struct.4] +// CHECK:STDOUT: %C.ref: = name_ref C, file.%import_ref.3 [template = constants.%C] // CHECK:STDOUT: %.loc74_23: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc74_25: (i32,) = tuple_literal (%.loc74_23) // CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.loc74_23) [template = constants.%tuple] // CHECK:STDOUT: %.loc74_21: (i32,) = converted %.loc74_25, %tuple [template = constants.%tuple] // CHECK:STDOUT: %C.call: init {.c: i32} = call %C.ref(%.loc74_21) // CHECK:STDOUT: assign file.%c.var, %C.call -// CHECK:STDOUT: %D.ref: D = name_ref D, file.%import_ref.4 [template = constants.%struct.5] +// CHECK:STDOUT: %D.ref: = name_ref D, file.%import_ref.4 [template = constants.%D] // CHECK:STDOUT: %D.call: init () = call %D.ref() // CHECK:STDOUT: assign file.%d.var, %D.call // CHECK:STDOUT: %NS.ref: = name_ref NS, file.%NS [template = file.%NS] -// CHECK:STDOUT: %E.ref: E = name_ref E, file.%import_ref.6 [template = constants.%struct.6] +// CHECK:STDOUT: %E.ref: = name_ref E, file.%import_ref.6 [template = constants.%E] // CHECK:STDOUT: %E.call: init () = call %E.ref() // CHECK:STDOUT: assign file.%e.var, %E.call // CHECK:STDOUT: return @@ -1046,22 +1046,22 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: type = fn_type @A [template] -// CHECK:STDOUT: %struct.1: A = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %B: type = fn_type @B [template] -// CHECK:STDOUT: %struct.3: B = struct_value () [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] +// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] +// CHECK:STDOUT: %B: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: type = struct_type {.c: i32} [template] // CHECK:STDOUT: %.4: type = tuple_type (i32) [template] -// CHECK:STDOUT: %C: type = fn_type @C [template] -// CHECK:STDOUT: %struct.4: C = struct_value () [template] +// CHECK:STDOUT: %C.type: type = fn_type @C [template] +// CHECK:STDOUT: %C: = struct_value () [template] // CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.2) [template] -// CHECK:STDOUT: %D: type = fn_type @D [template] -// CHECK:STDOUT: %struct.5: D = struct_value () [template] -// CHECK:STDOUT: %E: type = fn_type @E [template] -// CHECK:STDOUT: %struct.6: E = struct_value () [template] +// CHECK:STDOUT: %D.type: type = fn_type @D [template] +// CHECK:STDOUT: %D: = struct_value () [template] +// CHECK:STDOUT: %E.type: type = fn_type @E [template] +// CHECK:STDOUT: %E: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1078,15 +1078,15 @@ import library "extern_api"; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: .e = %e // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: A = import_ref ir1, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: B = import_ref ir1, inst+21, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %import_ref.3: C = import_ref ir1, inst+43, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %import_ref.4: D = import_ref ir1, inst+46, loaded [template = constants.%struct.5] +// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+2, loaded [template = constants.%A] +// CHECK:STDOUT: %import_ref.2: = import_ref ir1, inst+21, loaded [template = constants.%B] +// CHECK:STDOUT: %import_ref.3: = import_ref ir1, inst+43, loaded [template = constants.%C] +// CHECK:STDOUT: %import_ref.4: = import_ref ir1, inst+46, loaded [template = constants.%D] // CHECK:STDOUT: %import_ref.5: = import_ref ir1, inst+49, loaded // CHECK:STDOUT: %NS: = namespace %import_ref.5, [template] { // CHECK:STDOUT: .E = %import_ref.6 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: E = import_ref ir1, inst+50, loaded [template = constants.%struct.6] +// CHECK:STDOUT: %import_ref.6: = import_ref ir1, inst+50, loaded [template = constants.%E] // CHECK:STDOUT: %import_ref.7 = import_ref ir2, inst+2, unloaded // CHECK:STDOUT: %import_ref.8 = import_ref ir2, inst+21, unloaded // CHECK:STDOUT: %import_ref.9 = import_ref ir2, inst+43, unloaded @@ -1097,14 +1097,14 @@ import library "extern_api"; // CHECK:STDOUT: %.loc72_9.2: type = converted %.loc72_9.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %a.var: ref () = var a // CHECK:STDOUT: %a: ref () = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.12: Int32 = import_ref ir5, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %int.make_type_32.loc73: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.12: = import_ref ir5, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc73: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc73_8.1: type = value_of_initializer %int.make_type_32.loc73 [template = i32] // CHECK:STDOUT: %.loc73_8.2: type = converted %int.make_type_32.loc73, %.loc73_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.13: Int32 = import_ref ir5, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %int.make_type_32.loc74: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.13: = import_ref ir5, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc74: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc74_13.1: type = value_of_initializer %int.make_type_32.loc74 [template = i32] // CHECK:STDOUT: %.loc74_13.2: type = converted %int.make_type_32.loc74, %.loc74_13.1 [template = i32] // CHECK:STDOUT: %.loc74_16: type = struct_type {.c: i32} [template = constants.%.3] @@ -1134,25 +1134,25 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: A = name_ref A, file.%import_ref.1 [template = constants.%struct.1] +// CHECK:STDOUT: %A.ref: = name_ref A, file.%import_ref.1 [template = constants.%A] // CHECK:STDOUT: %A.call: init () = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call -// CHECK:STDOUT: %B.ref: B = name_ref B, file.%import_ref.2 [template = constants.%struct.3] +// CHECK:STDOUT: %B.ref: = name_ref B, file.%import_ref.2 [template = constants.%B] // CHECK:STDOUT: %.loc73: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc73) // CHECK:STDOUT: assign file.%b.var, %B.call -// CHECK:STDOUT: %C.ref: C = name_ref C, file.%import_ref.3 [template = constants.%struct.4] +// CHECK:STDOUT: %C.ref: = name_ref C, file.%import_ref.3 [template = constants.%C] // CHECK:STDOUT: %.loc74_23: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc74_25: (i32,) = tuple_literal (%.loc74_23) // CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.loc74_23) [template = constants.%tuple] // CHECK:STDOUT: %.loc74_21: (i32,) = converted %.loc74_25, %tuple [template = constants.%tuple] // CHECK:STDOUT: %C.call: init {.c: i32} = call %C.ref(%.loc74_21) // CHECK:STDOUT: assign file.%c.var, %C.call -// CHECK:STDOUT: %D.ref: D = name_ref D, file.%import_ref.4 [template = constants.%struct.5] +// CHECK:STDOUT: %D.ref: = name_ref D, file.%import_ref.4 [template = constants.%D] // CHECK:STDOUT: %D.call: init () = call %D.ref() // CHECK:STDOUT: assign file.%d.var, %D.call // CHECK:STDOUT: %NS.ref: = name_ref NS, file.%NS [template = file.%NS] -// CHECK:STDOUT: %E.ref: E = name_ref E, file.%import_ref.6 [template = constants.%struct.6] +// CHECK:STDOUT: %E.ref: = name_ref E, file.%import_ref.6 [template = constants.%E] // CHECK:STDOUT: %E.call: init () = call %E.ref() // CHECK:STDOUT: assign file.%e.var, %E.call // CHECK:STDOUT: return @@ -1162,8 +1162,8 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: type = fn_type @A [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1176,7 +1176,7 @@ import library "extern_api"; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: A = import_ref ir1, inst+2, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+2, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+21, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+43, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+46, unloaded @@ -1190,14 +1190,14 @@ import library "extern_api"; // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %a.var: ref () = var a // CHECK:STDOUT: %a: ref () = bind_name a, %a.var -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: A = name_ref A, file.%import_ref.1 [template = constants.%struct] +// CHECK:STDOUT: %A.ref: = name_ref A, file.%import_ref.1 [template = constants.%A] // CHECK:STDOUT: %A.call: init () = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: return @@ -1207,12 +1207,12 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: type = fn_type @A [template] -// CHECK:STDOUT: %struct.1: A = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %.2: type = fn_type @.1 [template] -// CHECK:STDOUT: %struct.3: = struct_value () [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] +// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %.type: type = fn_type @.1 [template] +// CHECK:STDOUT: %.2: > = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1225,7 +1225,7 @@ import library "extern_api"; // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: A = import_ref ir1, inst+2, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+2, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+21, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+43, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+46, unloaded @@ -1239,9 +1239,9 @@ import library "extern_api"; // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %a.var: ref () = var a // CHECK:STDOUT: %a: ref () = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %.decl: = fn_decl @.1 [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc18_11.2: type = converted %int.make_type_32, %.loc18_11.1 [template = i32] // CHECK:STDOUT: @.1.%return: ref i32 = var @@ -1256,7 +1256,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: A = name_ref A, file.%import_ref.1 [template = constants.%struct.1] +// CHECK:STDOUT: %A.ref: = name_ref A, file.%import_ref.1 [template = constants.%A] // CHECK:STDOUT: %A.call: init () = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: return @@ -1266,8 +1266,8 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: type = fn_type @A [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1280,7 +1280,7 @@ import library "extern_api"; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: A = import_ref ir1, inst+2, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+2, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+21, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+43, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+46, unloaded @@ -1294,14 +1294,14 @@ import library "extern_api"; // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %a.var: ref () = var a // CHECK:STDOUT: %a: ref () = bind_name a, %a.var -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: extern fn @A(); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: A = name_ref A, file.%import_ref.1 [template = constants.%struct] +// CHECK:STDOUT: %A.ref: = name_ref A, file.%import_ref.1 [template = constants.%A] // CHECK:STDOUT: %A.call: init () = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/function/declaration/no_prelude/export_name.carbon b/toolchain/check/testdata/function/declaration/no_prelude/export_name.carbon index 39ce24e39b89..a0b016f2b300 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/export_name.carbon @@ -41,16 +41,16 @@ var f: () = F(); // CHECK:STDOUT: --- base.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(); @@ -58,17 +58,17 @@ var f: () = F(); // CHECK:STDOUT: --- export.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: F = import_ref ir1, inst+1, loaded [template = constants.%struct] -// CHECK:STDOUT: %F: F = export F, %import_ref [template = constants.%struct] +// CHECK:STDOUT: %import_ref: = import_ref ir1, inst+1, loaded [template = constants.%F] +// CHECK:STDOUT: %F: = export F, %import_ref [template = constants.%F] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(); @@ -77,8 +77,8 @@ var f: () = F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -86,7 +86,7 @@ var f: () = F(); // CHECK:STDOUT: .F = %import_ref // CHECK:STDOUT: .f = %f // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: F = import_ref ir1, inst+6, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref: = import_ref ir1, inst+6, loaded [template = constants.%F] // CHECK:STDOUT: %.loc6_9.1: () = tuple_literal () // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %f.var: ref () = var f @@ -97,7 +97,7 @@ var f: () = F(); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%import_ref [template = constants.%struct] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref [template = constants.%F] // CHECK:STDOUT: %F.call: init () = call %F.ref() // CHECK:STDOUT: assign file.%f.var, %F.call // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon b/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon index 85bf33daeba6..29f2653c1c96 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon @@ -59,16 +59,16 @@ class C { // CHECK:STDOUT: --- basic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: extern fn @F(); @@ -76,17 +76,17 @@ class C { // CHECK:STDOUT: --- fail_redecl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl.loc4 // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc4: F = fn_decl @F [template = constants.%struct] {} -// CHECK:STDOUT: %F.decl.loc12: F = fn_decl @F [template = constants.%struct] {} +// CHECK:STDOUT: %F.decl.loc4: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl.loc12: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: extern fn @F(); @@ -94,17 +94,17 @@ class C { // CHECK:STDOUT: --- fail_redecl_extern.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl.loc12 // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc4: F = fn_decl @F [template = constants.%struct] {} -// CHECK:STDOUT: %F.decl.loc12: F = fn_decl @F [template = constants.%struct] {} +// CHECK:STDOUT: %F.decl.loc4: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl.loc12: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(); @@ -113,11 +113,11 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.2: G = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -129,8 +129,8 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] {} -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %self.loc11_15.1: C = param self // CHECK:STDOUT: %self.loc11_15.2: C = bind_name self, %self.loc11_15.1 diff --git a/toolchain/check/testdata/function/declaration/no_prelude/fail_import_incomplete_return.carbon b/toolchain/check/testdata/function/declaration/no_prelude/fail_import_incomplete_return.carbon index 50d02c3c09d5..7dcc1b0e7b25 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/fail_import_incomplete_return.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/fail_import_incomplete_return.carbon @@ -80,17 +80,17 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %ReturnCUnused: type = fn_type @ReturnCUnused [template] +// CHECK:STDOUT: %ReturnCUnused.type: type = fn_type @ReturnCUnused [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: ReturnCUnused = struct_value () [template] -// CHECK:STDOUT: %ReturnCUsed: type = fn_type @ReturnCUsed [template] -// CHECK:STDOUT: %struct.2: ReturnCUsed = struct_value () [template] -// CHECK:STDOUT: %ReturnDUnused: type = fn_type @ReturnDUnused [template] -// CHECK:STDOUT: %struct.3: ReturnDUnused = struct_value () [template] -// CHECK:STDOUT: %ReturnDUsed: type = fn_type @ReturnDUsed [template] -// CHECK:STDOUT: %struct.4: ReturnDUsed = struct_value () [template] -// CHECK:STDOUT: %Call: type = fn_type @Call [template] -// CHECK:STDOUT: %struct.5: Call = struct_value () [template] +// CHECK:STDOUT: %ReturnCUnused: = struct_value () [template] +// CHECK:STDOUT: %ReturnCUsed.type: type = fn_type @ReturnCUsed [template] +// CHECK:STDOUT: %ReturnCUsed: = struct_value () [template] +// CHECK:STDOUT: %ReturnDUnused.type: type = fn_type @ReturnDUnused [template] +// CHECK:STDOUT: %ReturnDUnused: = struct_value () [template] +// CHECK:STDOUT: %ReturnDUsed.type: type = fn_type @ReturnDUsed [template] +// CHECK:STDOUT: %ReturnDUsed: = struct_value () [template] +// CHECK:STDOUT: %Call.type: type = fn_type @Call [template] +// CHECK:STDOUT: %Call: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -106,23 +106,23 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %D.decl.loc5: type = class_decl @D [template = constants.%D] {} -// CHECK:STDOUT: %ReturnCUnused.decl: ReturnCUnused = fn_decl @ReturnCUnused [template = constants.%struct.1] { +// CHECK:STDOUT: %ReturnCUnused.decl: = fn_decl @ReturnCUnused [template = constants.%ReturnCUnused] { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: @ReturnCUnused.%return: ref C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %ReturnCUsed.decl: ReturnCUsed = fn_decl @ReturnCUsed [template = constants.%struct.2] { +// CHECK:STDOUT: %ReturnCUsed.decl: = fn_decl @ReturnCUsed [template = constants.%ReturnCUsed] { // CHECK:STDOUT: %C.ref.loc8: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: @ReturnCUsed.%return: ref C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %ReturnDUnused.decl: ReturnDUnused = fn_decl @ReturnDUnused [template = constants.%struct.3] { +// CHECK:STDOUT: %ReturnDUnused.decl: = fn_decl @ReturnDUnused [template = constants.%ReturnDUnused] { // CHECK:STDOUT: %D.ref.loc9: type = name_ref D, %D.decl.loc5 [template = constants.%D] // CHECK:STDOUT: @ReturnDUnused.%return: ref D = var // CHECK:STDOUT: } -// CHECK:STDOUT: %ReturnDUsed.decl: ReturnDUsed = fn_decl @ReturnDUsed [template = constants.%struct.4] { +// CHECK:STDOUT: %ReturnDUsed.decl: = fn_decl @ReturnDUsed [template = constants.%ReturnDUsed] { // CHECK:STDOUT: %D.ref.loc10: type = name_ref D, %D.decl.loc5 [template = constants.%D] // CHECK:STDOUT: @ReturnDUsed.%return: ref D = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Call.decl: Call = fn_decl @Call [template = constants.%struct.5] {} +// CHECK:STDOUT: %Call.decl: = fn_decl @Call [template = constants.%Call] {} // CHECK:STDOUT: %D.decl.loc37: type = class_decl @D [template = constants.%D] {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -143,9 +143,9 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Call() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %ReturnCUsed.ref: ReturnCUsed = name_ref ReturnCUsed, file.%ReturnCUsed.decl [template = constants.%struct.2] +// CHECK:STDOUT: %ReturnCUsed.ref: = name_ref ReturnCUsed, file.%ReturnCUsed.decl [template = constants.%ReturnCUsed] // CHECK:STDOUT: %ReturnCUsed.call: init = call %ReturnCUsed.ref() -// CHECK:STDOUT: %ReturnDUsed.ref: ReturnDUsed = name_ref ReturnDUsed, file.%ReturnDUsed.decl [template = constants.%struct.4] +// CHECK:STDOUT: %ReturnDUsed.ref: = name_ref ReturnDUsed, file.%ReturnDUsed.decl [template = constants.%ReturnDUsed] // CHECK:STDOUT: %ReturnDUsed.call: init = call %ReturnDUsed.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -153,21 +153,21 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: --- fail_use_imported.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %CallFAndGIncomplete: type = fn_type @CallFAndGIncomplete [template] +// CHECK:STDOUT: %CallFAndGIncomplete.type: type = fn_type @CallFAndGIncomplete [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: CallFAndGIncomplete = struct_value () [template] +// CHECK:STDOUT: %CallFAndGIncomplete: = struct_value () [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %ReturnCUnused: type = fn_type @ReturnCUnused [template] -// CHECK:STDOUT: %struct.2: ReturnCUnused = struct_value () [template] -// CHECK:STDOUT: %ReturnCUsed: type = fn_type @ReturnCUsed [template] -// CHECK:STDOUT: %struct.3: ReturnCUsed = struct_value () [template] +// CHECK:STDOUT: %ReturnCUnused.type: type = fn_type @ReturnCUnused [template] +// CHECK:STDOUT: %ReturnCUnused: = struct_value () [template] +// CHECK:STDOUT: %ReturnCUsed.type: type = fn_type @ReturnCUsed [template] +// CHECK:STDOUT: %ReturnCUsed: = struct_value () [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %ReturnDUnused: type = fn_type @ReturnDUnused [template] -// CHECK:STDOUT: %struct.4: ReturnDUnused = struct_value () [template] +// CHECK:STDOUT: %ReturnDUnused.type: type = fn_type @ReturnDUnused [template] +// CHECK:STDOUT: %ReturnDUnused: = struct_value () [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] -// CHECK:STDOUT: %ReturnDUsed: type = fn_type @ReturnDUsed [template] -// CHECK:STDOUT: %struct.5: ReturnDUsed = struct_value () [template] +// CHECK:STDOUT: %ReturnDUsed.type: type = fn_type @ReturnDUsed [template] +// CHECK:STDOUT: %ReturnDUsed: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -183,12 +183,12 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1 = import_ref ir1, inst+1, unloaded // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: ReturnCUnused = import_ref ir1, inst+7, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.4: ReturnCUsed = import_ref ir1, inst+13, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %import_ref.5: ReturnDUnused = import_ref ir1, inst+18, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %import_ref.6: ReturnDUsed = import_ref ir1, inst+23, loaded [template = constants.%struct.5] +// CHECK:STDOUT: %import_ref.3: = import_ref ir1, inst+7, loaded [template = constants.%ReturnCUnused] +// CHECK:STDOUT: %import_ref.4: = import_ref ir1, inst+13, loaded [template = constants.%ReturnCUsed] +// CHECK:STDOUT: %import_ref.5: = import_ref ir1, inst+18, loaded [template = constants.%ReturnDUnused] +// CHECK:STDOUT: %import_ref.6: = import_ref ir1, inst+23, loaded [template = constants.%ReturnDUsed] // CHECK:STDOUT: %import_ref.7 = import_ref ir1, inst+26, unloaded -// CHECK:STDOUT: %CallFAndGIncomplete.decl: CallFAndGIncomplete = fn_decl @CallFAndGIncomplete [template = constants.%struct.1] {} +// CHECK:STDOUT: %CallFAndGIncomplete.decl: = fn_decl @CallFAndGIncomplete [template = constants.%CallFAndGIncomplete] {} // CHECK:STDOUT: %import_ref.8 = import_ref ir1, inst+4, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -201,15 +201,15 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: // CHECK:STDOUT: fn @CallFAndGIncomplete() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %ReturnCUnused.ref: ReturnCUnused = name_ref ReturnCUnused, file.%import_ref.3 [template = constants.%struct.2] +// CHECK:STDOUT: %ReturnCUnused.ref: = name_ref ReturnCUnused, file.%import_ref.3 [template = constants.%ReturnCUnused] // CHECK:STDOUT: %ReturnCUnused.call: init = call %ReturnCUnused.ref() -// CHECK:STDOUT: %ReturnCUsed.ref: ReturnCUsed = name_ref ReturnCUsed, file.%import_ref.4 [template = constants.%struct.3] +// CHECK:STDOUT: %ReturnCUsed.ref: = name_ref ReturnCUsed, file.%import_ref.4 [template = constants.%ReturnCUsed] // CHECK:STDOUT: %ReturnCUsed.call: init = call %ReturnCUsed.ref() -// CHECK:STDOUT: %ReturnDUnused.ref: ReturnDUnused = name_ref ReturnDUnused, file.%import_ref.5 [template = constants.%struct.4] +// CHECK:STDOUT: %ReturnDUnused.ref: = name_ref ReturnDUnused, file.%import_ref.5 [template = constants.%ReturnDUnused] // CHECK:STDOUT: %.loc24_16.1: ref D = temporary_storage // CHECK:STDOUT: %ReturnDUnused.call: init D = call %ReturnDUnused.ref() to %.loc24_16.1 // CHECK:STDOUT: %.loc24_16.2: ref D = temporary %.loc24_16.1, %ReturnDUnused.call -// CHECK:STDOUT: %ReturnDUsed.ref: ReturnDUsed = name_ref ReturnDUsed, file.%import_ref.6 [template = constants.%struct.5] +// CHECK:STDOUT: %ReturnDUsed.ref: = name_ref ReturnDUsed, file.%import_ref.6 [template = constants.%ReturnDUsed] // CHECK:STDOUT: %ReturnDUsed.call: init = call %ReturnDUsed.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/declaration/no_prelude/fail_modifiers.carbon b/toolchain/check/testdata/function/declaration/no_prelude/fail_modifiers.carbon index 322bd1a13141..61b1fafcfa3a 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/fail_modifiers.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/fail_modifiers.carbon @@ -97,21 +97,21 @@ extern private fn ExternOrderAndConflict() {} // CHECK:STDOUT: --- fail_modifiers.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %WrongOrder: type = fn_type @WrongOrder [template] +// CHECK:STDOUT: %WrongOrder.type: type = fn_type @WrongOrder [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: WrongOrder = struct_value () [template] -// CHECK:STDOUT: %DuplicateVirtual: type = fn_type @DuplicateVirtual [template] -// CHECK:STDOUT: %struct.2: DuplicateVirtual = struct_value () [template] -// CHECK:STDOUT: %TwoAccess: type = fn_type @TwoAccess [template] -// CHECK:STDOUT: %struct.3: TwoAccess = struct_value () [template] -// CHECK:STDOUT: %ModifiersConflict: type = fn_type @ModifiersConflict [template] -// CHECK:STDOUT: %struct.4: ModifiersConflict = struct_value () [template] -// CHECK:STDOUT: %InvalidModifier: type = fn_type @InvalidModifier [template] -// CHECK:STDOUT: %struct.5: InvalidModifier = struct_value () [template] -// CHECK:STDOUT: %ModifiersConflict2: type = fn_type @ModifiersConflict2 [template] -// CHECK:STDOUT: %struct.6: ModifiersConflict2 = struct_value () [template] -// CHECK:STDOUT: %ExternOrderAndConflict: type = fn_type @ExternOrderAndConflict [template] -// CHECK:STDOUT: %struct.7: ExternOrderAndConflict = struct_value () [template] +// CHECK:STDOUT: %WrongOrder: = struct_value () [template] +// CHECK:STDOUT: %DuplicateVirtual.type: type = fn_type @DuplicateVirtual [template] +// CHECK:STDOUT: %DuplicateVirtual: = struct_value () [template] +// CHECK:STDOUT: %TwoAccess.type: type = fn_type @TwoAccess [template] +// CHECK:STDOUT: %TwoAccess: = struct_value () [template] +// CHECK:STDOUT: %ModifiersConflict.type: type = fn_type @ModifiersConflict [template] +// CHECK:STDOUT: %ModifiersConflict: = struct_value () [template] +// CHECK:STDOUT: %InvalidModifier.type: type = fn_type @InvalidModifier [template] +// CHECK:STDOUT: %InvalidModifier: = struct_value () [template] +// CHECK:STDOUT: %ModifiersConflict2.type: type = fn_type @ModifiersConflict2 [template] +// CHECK:STDOUT: %ModifiersConflict2: = struct_value () [template] +// CHECK:STDOUT: %ExternOrderAndConflict.type: type = fn_type @ExternOrderAndConflict [template] +// CHECK:STDOUT: %ExternOrderAndConflict: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -124,13 +124,13 @@ extern private fn ExternOrderAndConflict() {} // CHECK:STDOUT: .ModifiersConflict2 = %ModifiersConflict2.decl // CHECK:STDOUT: .ExternOrderAndConflict = %ExternOrderAndConflict.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %WrongOrder.decl: WrongOrder = fn_decl @WrongOrder [template = constants.%struct.1] {} -// CHECK:STDOUT: %DuplicateVirtual.decl: DuplicateVirtual = fn_decl @DuplicateVirtual [template = constants.%struct.2] {} -// CHECK:STDOUT: %TwoAccess.decl: TwoAccess = fn_decl @TwoAccess [template = constants.%struct.3] {} -// CHECK:STDOUT: %ModifiersConflict.decl: ModifiersConflict = fn_decl @ModifiersConflict [template = constants.%struct.4] {} -// CHECK:STDOUT: %InvalidModifier.decl: InvalidModifier = fn_decl @InvalidModifier [template = constants.%struct.5] {} -// CHECK:STDOUT: %ModifiersConflict2.decl: ModifiersConflict2 = fn_decl @ModifiersConflict2 [template = constants.%struct.6] {} -// CHECK:STDOUT: %ExternOrderAndConflict.decl: ExternOrderAndConflict = fn_decl @ExternOrderAndConflict [template = constants.%struct.7] {} +// CHECK:STDOUT: %WrongOrder.decl: = fn_decl @WrongOrder [template = constants.%WrongOrder] {} +// CHECK:STDOUT: %DuplicateVirtual.decl: = fn_decl @DuplicateVirtual [template = constants.%DuplicateVirtual] {} +// CHECK:STDOUT: %TwoAccess.decl: = fn_decl @TwoAccess [template = constants.%TwoAccess] {} +// CHECK:STDOUT: %ModifiersConflict.decl: = fn_decl @ModifiersConflict [template = constants.%ModifiersConflict] {} +// CHECK:STDOUT: %InvalidModifier.decl: = fn_decl @InvalidModifier [template = constants.%InvalidModifier] {} +// CHECK:STDOUT: %ModifiersConflict2.decl: = fn_decl @ModifiersConflict2 [template = constants.%ModifiersConflict2] {} +// CHECK:STDOUT: %ExternOrderAndConflict.decl: = fn_decl @ExternOrderAndConflict [template = constants.%ExternOrderAndConflict] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @WrongOrder(); diff --git a/toolchain/check/testdata/function/declaration/no_prelude/fail_redecl.carbon b/toolchain/check/testdata/function/declaration/no_prelude/fail_redecl.carbon index 7c84fb468ac6..b93f4e3997a8 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/fail_redecl.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/fail_redecl.carbon @@ -60,19 +60,19 @@ fn E() {} // CHECK:STDOUT: --- fail_redecl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: A = struct_value () [template] -// CHECK:STDOUT: %B: type = fn_type @B [template] -// CHECK:STDOUT: %struct.2: B = struct_value () [template] -// CHECK:STDOUT: %C: type = fn_type @C [template] -// CHECK:STDOUT: %struct.3: C = struct_value () [template] -// CHECK:STDOUT: %.2: type = fn_type @.1 [template] -// CHECK:STDOUT: %struct.4: = struct_value () [template] -// CHECK:STDOUT: %D: type = fn_type @D [template] -// CHECK:STDOUT: %struct.5: D = struct_value () [template] -// CHECK:STDOUT: %E: type = fn_type @E [template] -// CHECK:STDOUT: %struct.6: E = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] +// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %C.type: type = fn_type @C [template] +// CHECK:STDOUT: %C: = struct_value () [template] +// CHECK:STDOUT: %.type: type = fn_type @.1 [template] +// CHECK:STDOUT: %.2: > = struct_value () [template] +// CHECK:STDOUT: %D.type: type = fn_type @D [template] +// CHECK:STDOUT: %D: = struct_value () [template] +// CHECK:STDOUT: %E.type: type = fn_type @E [template] +// CHECK:STDOUT: %E: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -83,31 +83,31 @@ fn E() {} // CHECK:STDOUT: .D = %D.decl.loc41 // CHECK:STDOUT: .E = %E.decl.loc51 // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl.loc11: A = fn_decl @A [template = constants.%struct.1] {} -// CHECK:STDOUT: %A.decl.loc19: A = fn_decl @A [template = constants.%struct.1] {} -// CHECK:STDOUT: %B.decl.loc21: B = fn_decl @B [template = constants.%struct.2] { +// CHECK:STDOUT: %A.decl.loc11: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.decl.loc19: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %B.decl.loc21: = fn_decl @B [template = constants.%B] { // CHECK:STDOUT: %.loc21_10.1: () = tuple_literal () // CHECK:STDOUT: %.loc21_10.2: type = converted %.loc21_10.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %x.loc21_6.1: () = param x // CHECK:STDOUT: @B.%x: () = bind_name x, %x.loc21_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %B.decl.loc29: B = fn_decl @B [template = constants.%struct.2] { +// CHECK:STDOUT: %B.decl.loc29: = fn_decl @B [template = constants.%B] { // CHECK:STDOUT: %.loc29_10.1: () = tuple_literal () // CHECK:STDOUT: %.loc29_10.2: type = converted %.loc29_10.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %x.loc29_6.1: () = param x // CHECK:STDOUT: %x.loc29_6.2: () = bind_name x, %x.loc29_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %C.decl: C = fn_decl @C [template = constants.%struct.3] {} -// CHECK:STDOUT: %.decl: = fn_decl @.1 [template = constants.%struct.4] { +// CHECK:STDOUT: %C.decl: = fn_decl @C [template = constants.%C] {} +// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.2] { // CHECK:STDOUT: %.loc39_10.1: () = tuple_literal () // CHECK:STDOUT: %.loc39_10.2: type = converted %.loc39_10.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %x.loc39_6.1: () = param x // CHECK:STDOUT: @.1.%x: () = bind_name x, %x.loc39_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %D.decl.loc41: D = fn_decl @D [template = constants.%struct.5] {} -// CHECK:STDOUT: %D.decl.loc49: D = fn_decl @D [template = constants.%struct.5] {} -// CHECK:STDOUT: %E.decl.loc51: E = fn_decl @E [template = constants.%struct.6] {} -// CHECK:STDOUT: %E.decl.loc58: E = fn_decl @E [template = constants.%struct.6] {} +// CHECK:STDOUT: %D.decl.loc41: = fn_decl @D [template = constants.%D] {} +// CHECK:STDOUT: %D.decl.loc49: = fn_decl @D [template = constants.%D] {} +// CHECK:STDOUT: %E.decl.loc51: = fn_decl @E [template = constants.%E] {} +// CHECK:STDOUT: %E.decl.loc58: = fn_decl @E [template = constants.%E] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); diff --git a/toolchain/check/testdata/function/declaration/no_prelude/fail_todo_no_params.carbon b/toolchain/check/testdata/function/declaration/no_prelude/fail_todo_no_params.carbon index 2319b4e0c4a7..3e9d54da1fe6 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/fail_todo_no_params.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/fail_todo_no_params.carbon @@ -43,16 +43,16 @@ fn A => 0; // CHECK:STDOUT: --- fail_no_body.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -60,16 +60,16 @@ fn A => 0; // CHECK:STDOUT: --- fail_todo_brace_body.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -80,16 +80,16 @@ fn A => 0; // CHECK:STDOUT: --- fail_todo_arrow_body.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); diff --git a/toolchain/check/testdata/function/declaration/no_prelude/implicit_import.carbon b/toolchain/check/testdata/function/declaration/no_prelude/implicit_import.carbon index 49a620f42920..a5b4bb4c7df4 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/implicit_import.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/implicit_import.carbon @@ -66,16 +66,16 @@ extern fn A(); // CHECK:STDOUT: --- basic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -83,17 +83,17 @@ extern fn A(); // CHECK:STDOUT: --- basic.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: A = import_ref ir0, inst+1, loaded [template = constants.%struct] -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %import_ref: = import_ref ir0, inst+1, loaded [template = constants.%A] +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -101,16 +101,16 @@ extern fn A(); // CHECK:STDOUT: --- extern_api.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: extern fn @A(); @@ -118,17 +118,17 @@ extern fn A(); // CHECK:STDOUT: --- fail_extern_api.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: A = import_ref ir0, inst+1, loaded [template = constants.%struct] -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %import_ref: = import_ref ir0, inst+1, loaded [template = constants.%A] +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -136,16 +136,16 @@ extern fn A(); // CHECK:STDOUT: --- extern_impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -153,17 +153,17 @@ extern fn A(); // CHECK:STDOUT: --- fail_extern_impl.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: A = import_ref ir0, inst+1, loaded [template = constants.%struct] -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %import_ref: = import_ref ir0, inst+1, loaded [template = constants.%A] +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: extern fn @A(); diff --git a/toolchain/check/testdata/function/declaration/no_prelude/simple.carbon b/toolchain/check/testdata/function/declaration/no_prelude/simple.carbon index cfbfa09d4983..509ae3788bdd 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/simple.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/simple.carbon @@ -15,11 +15,11 @@ fn G() { F(); } // CHECK:STDOUT: --- simple.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.2: G = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -27,15 +27,15 @@ fn G() { F(); } // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] {} -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.2] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(); // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%F.decl [template = constants.%struct.1] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init () = call %F.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/declaration/param_same_name.carbon b/toolchain/check/testdata/function/declaration/param_same_name.carbon index 167039bcaeff..76b0a12c9aa3 100644 --- a/toolchain/check/testdata/function/declaration/param_same_name.carbon +++ b/toolchain/check/testdata/function/declaration/param_same_name.carbon @@ -15,13 +15,13 @@ fn G(a: i32); // CHECK:STDOUT: --- param_same_name.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -31,17 +31,17 @@ fn G(a: i32); // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32.loc11, %.loc11_9.1 [template = i32] // CHECK:STDOUT: %a.loc11_6.1: i32 = param a // CHECK:STDOUT: @F.%a: i32 = bind_name a, %a.loc11_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_9.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_9.2: type = converted %int.make_type_32.loc13, %.loc13_9.1 [template = i32] // CHECK:STDOUT: %a.loc13_6.1: i32 = param a diff --git a/toolchain/check/testdata/function/definition/import.carbon b/toolchain/check/testdata/function/definition/import.carbon index eb01e7618a63..71c300ebe963 100644 --- a/toolchain/check/testdata/function/definition/import.carbon +++ b/toolchain/check/testdata/function/definition/import.carbon @@ -97,21 +97,21 @@ fn D() {} // CHECK:STDOUT: --- fns.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: A = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %B: type = fn_type @B [template] -// CHECK:STDOUT: %struct.3: B = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] +// CHECK:STDOUT: %B: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32) [template] // CHECK:STDOUT: %.4: type = struct_type {.c: i32} [template] -// CHECK:STDOUT: %C: type = fn_type @C [template] -// CHECK:STDOUT: %struct.4: C = struct_value () [template] +// CHECK:STDOUT: %C.type: type = fn_type @C [template] +// CHECK:STDOUT: %C: = struct_value () [template] // CHECK:STDOUT: %.5: i32 = int_literal 0 [template] -// CHECK:STDOUT: %D: type = fn_type @D [template] -// CHECK:STDOUT: %struct.5: D = struct_value () [template] +// CHECK:STDOUT: %D.type: type = fn_type @D [template] +// CHECK:STDOUT: %D: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -123,37 +123,37 @@ fn D() {} // CHECK:STDOUT: .D = %D.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %B.decl: B = fn_decl @B [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc5_9: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %int.make_type_32.loc5_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_9.1: type = value_of_initializer %int.make_type_32.loc5_9 [template = i32] // CHECK:STDOUT: %.loc5_9.2: type = converted %int.make_type_32.loc5_9, %.loc5_9.1 [template = i32] // CHECK:STDOUT: %b.loc5_6.1: i32 = param b // CHECK:STDOUT: @B.%b: i32 = bind_name b, %b.loc5_6.1 -// CHECK:STDOUT: %int.make_type_32.loc5_17: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc5_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_17.1: type = value_of_initializer %int.make_type_32.loc5_17 [template = i32] // CHECK:STDOUT: %.loc5_17.2: type = converted %int.make_type_32.loc5_17, %.loc5_17.1 [template = i32] // CHECK:STDOUT: @B.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %C.decl: C = fn_decl @C [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32.loc6_10: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %C.decl: = fn_decl @C [template = constants.%C] { +// CHECK:STDOUT: %int.make_type_32.loc6_10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_14.1: (type,) = tuple_literal (%int.make_type_32.loc6_10) // CHECK:STDOUT: %.loc6_14.2: type = value_of_initializer %int.make_type_32.loc6_10 [template = i32] // CHECK:STDOUT: %.loc6_14.3: type = converted %int.make_type_32.loc6_10, %.loc6_14.2 [template = i32] // CHECK:STDOUT: %.loc6_14.4: type = converted %.loc6_14.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %c.loc6_6.1: (i32,) = param c // CHECK:STDOUT: @C.%c: (i32,) = bind_name c, %c.loc6_6.1 -// CHECK:STDOUT: %int.make_type_32.loc6_25: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc6_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_25.1: type = value_of_initializer %int.make_type_32.loc6_25 [template = i32] // CHECK:STDOUT: %.loc6_25.2: type = converted %int.make_type_32.loc6_25, %.loc6_25.1 [template = i32] // CHECK:STDOUT: %.loc6_28: type = struct_type {.c: i32} [template = constants.%.4] // CHECK:STDOUT: @C.%return: ref {.c: i32} = var // CHECK:STDOUT: } -// CHECK:STDOUT: %D.decl: D = fn_decl @D [template = constants.%struct.5] {} +// CHECK:STDOUT: %D.decl: = fn_decl @D [template = constants.%D] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -185,9 +185,9 @@ fn D() {} // CHECK:STDOUT: --- extern.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -196,7 +196,7 @@ fn D() {} // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: extern fn @A(); @@ -205,17 +205,17 @@ fn D() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: type = fn_type @A [template] -// CHECK:STDOUT: %struct.1: A = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %B: type = fn_type @B [template] -// CHECK:STDOUT: %struct.3: B = struct_value () [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] +// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] +// CHECK:STDOUT: %B: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: type = struct_type {.c: i32} [template] // CHECK:STDOUT: %.4: type = tuple_type (i32) [template] -// CHECK:STDOUT: %C: type = fn_type @C [template] -// CHECK:STDOUT: %struct.4: C = struct_value () [template] +// CHECK:STDOUT: %C.type: type = fn_type @C [template] +// CHECK:STDOUT: %C: = struct_value () [template] // CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -230,23 +230,23 @@ fn D() {} // CHECK:STDOUT: .b = %b // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: A = import_ref ir1, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: B = import_ref ir1, inst+22, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %import_ref.3: C = import_ref ir1, inst+46, loaded [template = constants.%struct.4] +// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+2, loaded [template = constants.%A] +// CHECK:STDOUT: %import_ref.2: = import_ref ir1, inst+22, loaded [template = constants.%B] +// CHECK:STDOUT: %import_ref.3: = import_ref ir1, inst+46, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+58, unloaded // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %.loc6_9.1: () = tuple_literal () // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %a.var: ref () = var a // CHECK:STDOUT: %a: ref () = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_32.loc7, %.loc7_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_13.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_13.2: type = converted %int.make_type_32.loc8, %.loc8_13.1 [template = i32] // CHECK:STDOUT: %.loc8_16: type = struct_type {.c: i32} [template = constants.%.3] @@ -264,14 +264,14 @@ fn D() {} // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: A = name_ref A, file.%import_ref.1 [template = constants.%struct.1] +// CHECK:STDOUT: %A.ref: = name_ref A, file.%import_ref.1 [template = constants.%A] // CHECK:STDOUT: %A.call: init () = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call -// CHECK:STDOUT: %B.ref: B = name_ref B, file.%import_ref.2 [template = constants.%struct.3] +// CHECK:STDOUT: %B.ref: = name_ref B, file.%import_ref.2 [template = constants.%B] // CHECK:STDOUT: %.loc7: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc7) // CHECK:STDOUT: assign file.%b.var, %B.call -// CHECK:STDOUT: %C.ref: C = name_ref C, file.%import_ref.3 [template = constants.%struct.4] +// CHECK:STDOUT: %C.ref: = name_ref C, file.%import_ref.3 [template = constants.%C] // CHECK:STDOUT: %.loc8_23: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc8_25: (i32,) = tuple_literal (%.loc8_23) // CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.loc8_23) [template = constants.%tuple] @@ -284,13 +284,13 @@ fn D() {} // CHECK:STDOUT: --- fail_def_ownership.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: A = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %B: type = fn_type @B [template] -// CHECK:STDOUT: %struct.3: B = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] +// CHECK:STDOUT: %B: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -301,21 +301,21 @@ fn D() {} // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: A = import_ref ir1, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: B = import_ref ir1, inst+22, loaded [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+2, loaded [template = constants.%A] +// CHECK:STDOUT: %import_ref.2: = import_ref ir1, inst+22, loaded [template = constants.%B] // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+46, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+58, unloaded // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir4, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %B.decl: B = fn_decl @B [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc27_9: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %import_ref.5: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir4, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %int.make_type_32.loc27_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc27_9.1: type = value_of_initializer %int.make_type_32.loc27_9 [template = i32] // CHECK:STDOUT: %.loc27_9.2: type = converted %int.make_type_32.loc27_9, %.loc27_9.1 [template = i32] // CHECK:STDOUT: %b.loc27_6.1: i32 = param b // CHECK:STDOUT: %b.loc27_6.2: i32 = bind_name b, %b.loc27_6.1 -// CHECK:STDOUT: %int.make_type_32.loc27_17: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc27_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc27_17.1: type = value_of_initializer %int.make_type_32.loc27_17 [template = i32] // CHECK:STDOUT: %.loc27_17.2: type = converted %int.make_type_32.loc27_17, %.loc27_17.1 [template = i32] // CHECK:STDOUT: %return.var: ref i32 = var @@ -334,9 +334,9 @@ fn D() {} // CHECK:STDOUT: --- redecl_then_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -344,10 +344,10 @@ fn D() {} // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: .A = %A.decl.loc6 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: A = import_ref ir1, inst+2, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref: = import_ref ir1, inst+2, loaded [template = constants.%A] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl.loc6: A = fn_decl @A [template = constants.%struct] {} -// CHECK:STDOUT: %A.decl.loc7: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %A.decl.loc6: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.decl.loc7: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -358,9 +358,9 @@ fn D() {} // CHECK:STDOUT: --- fail_mix_extern_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %D: type = fn_type @D [template] +// CHECK:STDOUT: %D.type: type = fn_type @D [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: D = struct_value () [template] +// CHECK:STDOUT: %D: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -374,10 +374,10 @@ fn D() {} // CHECK:STDOUT: %import_ref.1 = import_ref ir1, inst+2, unloaded // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+22, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+46, unloaded -// CHECK:STDOUT: %import_ref.4: D = import_ref ir1, inst+58, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref.4: = import_ref ir1, inst+58, loaded [template = constants.%D] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %D.decl.loc6: D = fn_decl @D [template = constants.%struct] {} -// CHECK:STDOUT: %D.decl.loc13: D = fn_decl @D [template = constants.%struct] {} +// CHECK:STDOUT: %D.decl.loc6: = fn_decl @D [template = constants.%D] {} +// CHECK:STDOUT: %D.decl.loc13: = fn_decl @D [template = constants.%D] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @D() { diff --git a/toolchain/check/testdata/function/definition/import_access.carbon b/toolchain/check/testdata/function/definition/import_access.carbon index a1d662141a20..ac97b365f4b1 100644 --- a/toolchain/check/testdata/function/definition/import_access.carbon +++ b/toolchain/check/testdata/function/definition/import_access.carbon @@ -150,9 +150,9 @@ private fn Redecl() {} // CHECK:STDOUT: --- def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Def: type = fn_type @Def [template] +// CHECK:STDOUT: %Def.type: type = fn_type @Def [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Def = struct_value () [template] +// CHECK:STDOUT: %Def: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -161,7 +161,7 @@ private fn Redecl() {} // CHECK:STDOUT: .Def [private] = %Def.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Def.decl: Def = fn_decl @Def [template = constants.%struct] {} +// CHECK:STDOUT: %Def.decl: = fn_decl @Def [template = constants.%Def] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Def() { @@ -172,9 +172,9 @@ private fn Redecl() {} // CHECK:STDOUT: --- forward_with_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %ForwardWithDef: type = fn_type @ForwardWithDef [template] +// CHECK:STDOUT: %ForwardWithDef.type: type = fn_type @ForwardWithDef [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: ForwardWithDef = struct_value () [template] +// CHECK:STDOUT: %ForwardWithDef: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -183,8 +183,8 @@ private fn Redecl() {} // CHECK:STDOUT: .ForwardWithDef [private] = %ForwardWithDef.decl.loc4 // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %ForwardWithDef.decl.loc4: ForwardWithDef = fn_decl @ForwardWithDef [template = constants.%struct] {} -// CHECK:STDOUT: %ForwardWithDef.decl.loc6: ForwardWithDef = fn_decl @ForwardWithDef [template = constants.%struct] {} +// CHECK:STDOUT: %ForwardWithDef.decl.loc4: = fn_decl @ForwardWithDef [template = constants.%ForwardWithDef] {} +// CHECK:STDOUT: %ForwardWithDef.decl.loc6: = fn_decl @ForwardWithDef [template = constants.%ForwardWithDef] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ForwardWithDef() { @@ -195,9 +195,9 @@ private fn Redecl() {} // CHECK:STDOUT: --- forward.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Forward: type = fn_type @Forward [template] +// CHECK:STDOUT: %Forward.type: type = fn_type @Forward [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Forward = struct_value () [template] +// CHECK:STDOUT: %Forward: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -206,7 +206,7 @@ private fn Redecl() {} // CHECK:STDOUT: .Forward [private] = %Forward.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Forward.decl: Forward = fn_decl @Forward [template = constants.%struct] {} +// CHECK:STDOUT: %Forward.decl: = fn_decl @Forward [template = constants.%Forward] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Forward(); @@ -371,8 +371,8 @@ private fn Redecl() {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Forward: type = fn_type @Forward [template] -// CHECK:STDOUT: %struct: Forward = struct_value () [template] +// CHECK:STDOUT: %Forward.type: type = fn_type @Forward [template] +// CHECK:STDOUT: %Forward: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -386,7 +386,7 @@ private fn Redecl() {} // CHECK:STDOUT: %.loc8_9.2: type = converted %.loc8_9.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %f.var: ref () = var f // CHECK:STDOUT: %f: ref () = bind_name f, %f.var -// CHECK:STDOUT: %Forward.decl: Forward = fn_decl @Forward [template = constants.%struct] {} +// CHECK:STDOUT: %Forward.decl: = fn_decl @Forward [template = constants.%Forward] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Forward() { @@ -457,9 +457,9 @@ private fn Redecl() {} // CHECK:STDOUT: --- todo_fail_private_on_redecl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Redecl: type = fn_type @Redecl [template] +// CHECK:STDOUT: %Redecl.type: type = fn_type @Redecl [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Redecl = struct_value () [template] +// CHECK:STDOUT: %Redecl: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -468,8 +468,8 @@ private fn Redecl() {} // CHECK:STDOUT: .Redecl [private] = %Redecl.decl.loc4 // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Redecl.decl.loc4: Redecl = fn_decl @Redecl [template = constants.%struct] {} -// CHECK:STDOUT: %Redecl.decl.loc6: Redecl = fn_decl @Redecl [template = constants.%struct] {} +// CHECK:STDOUT: %Redecl.decl.loc4: = fn_decl @Redecl [template = constants.%Redecl] {} +// CHECK:STDOUT: %Redecl.decl.loc6: = fn_decl @Redecl [template = constants.%Redecl] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Redecl() { diff --git a/toolchain/check/testdata/function/definition/no_prelude/extern.carbon b/toolchain/check/testdata/function/definition/no_prelude/extern.carbon index 835ddbba412d..365c450a2f21 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/extern.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/extern.carbon @@ -63,16 +63,16 @@ extern fn F(); // CHECK:STDOUT: --- fail_extern_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -83,17 +83,17 @@ extern fn F(); // CHECK:STDOUT: --- fail_def_for_extern_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl.loc12 // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc4: F = fn_decl @F [template = constants.%struct] {} -// CHECK:STDOUT: %F.decl.loc12: F = fn_decl @F [template = constants.%struct] {} +// CHECK:STDOUT: %F.decl.loc4: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl.loc12: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -104,18 +104,18 @@ extern fn F(); // CHECK:STDOUT: --- fail_extern_diag_suppressed.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl.loc12 // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc4: F = fn_decl @F [template = constants.%struct] {} -// CHECK:STDOUT: %F.decl.loc12: F = fn_decl @F [template = constants.%struct] {} -// CHECK:STDOUT: %F.decl.loc13: F = fn_decl @F [template = constants.%struct] {} +// CHECK:STDOUT: %F.decl.loc4: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl.loc12: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl.loc13: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -126,17 +126,17 @@ extern fn F(); // CHECK:STDOUT: --- fail_extern_decl_after_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl.loc4 // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc4: F = fn_decl @F [template = constants.%struct] {} -// CHECK:STDOUT: %F.decl.loc11: F = fn_decl @F [template = constants.%struct] {} +// CHECK:STDOUT: %F.decl.loc4: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl.loc11: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { diff --git a/toolchain/check/testdata/function/definition/no_prelude/fail_decl_param_mismatch.carbon b/toolchain/check/testdata/function/definition/no_prelude/fail_decl_param_mismatch.carbon index 8a92eef71d2d..5261f1b63936 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/fail_decl_param_mismatch.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/fail_decl_param_mismatch.carbon @@ -67,34 +67,34 @@ fn K() -> {} { return {}; } // CHECK:STDOUT: --- fail_decl_param_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.2: type = fn_type @.1 [template] -// CHECK:STDOUT: %struct.2: = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] -// CHECK:STDOUT: %.3: type = fn_type @.2 [template] -// CHECK:STDOUT: %struct.4: = struct_value () [template] -// CHECK:STDOUT: %H: type = fn_type @H [template] -// CHECK:STDOUT: %struct.5: H = struct_value () [template] -// CHECK:STDOUT: %.4: type = fn_type @.3 [template] -// CHECK:STDOUT: %struct.6: = struct_value () [template] -// CHECK:STDOUT: %I: type = fn_type @I [template] -// CHECK:STDOUT: %struct.7: I = struct_value () [template] -// CHECK:STDOUT: %.5: type = fn_type @.4 [template] -// CHECK:STDOUT: %struct.8: = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %.type.1: type = fn_type @.1 [template] +// CHECK:STDOUT: %.2: > = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %.type.2: type = fn_type @.2 [template] +// CHECK:STDOUT: %.3: > = struct_value () [template] +// CHECK:STDOUT: %H.type: type = fn_type @H [template] +// CHECK:STDOUT: %H: = struct_value () [template] +// CHECK:STDOUT: %.type.3: type = fn_type @.3 [template] +// CHECK:STDOUT: %.4: > = struct_value () [template] +// CHECK:STDOUT: %I.type: type = fn_type @I [template] +// CHECK:STDOUT: %I: = struct_value () [template] +// CHECK:STDOUT: %.type.4: type = fn_type @.4 [template] +// CHECK:STDOUT: %.5: > = struct_value () [template] // CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %J: type = fn_type @J [template] -// CHECK:STDOUT: %struct.9: J = struct_value () [template] -// CHECK:STDOUT: %.6: type = fn_type @.5 [template] -// CHECK:STDOUT: %struct.10: = struct_value () [template] -// CHECK:STDOUT: %K: type = fn_type @K [template] -// CHECK:STDOUT: %struct.11: K = struct_value () [template] +// CHECK:STDOUT: %J.type: type = fn_type @J [template] +// CHECK:STDOUT: %J: = struct_value () [template] +// CHECK:STDOUT: %.type.5: type = fn_type @.5 [template] +// CHECK:STDOUT: %.6: > = struct_value () [template] +// CHECK:STDOUT: %K.type: type = fn_type @K [template] +// CHECK:STDOUT: %K: = struct_value () [template] // CHECK:STDOUT: %.7: type = struct_type {} [template] -// CHECK:STDOUT: %.8: type = fn_type @.6 [template] -// CHECK:STDOUT: %struct.12: = struct_value () [template] -// CHECK:STDOUT: %struct.13: {} = struct_value () [template] +// CHECK:STDOUT: %.type.6: type = fn_type @.6 [template] +// CHECK:STDOUT: %.8: > = struct_value () [template] +// CHECK:STDOUT: %struct: {} = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -106,48 +106,48 @@ fn K() -> {} { return {}; } // CHECK:STDOUT: .J = %J.decl // CHECK:STDOUT: .K = %K.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] {} -// CHECK:STDOUT: %.decl.loc19: = fn_decl @.1 [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %.decl.loc19: > = fn_decl @.1 [template = constants.%.2] { // CHECK:STDOUT: %.loc19_10.1: () = tuple_literal () // CHECK:STDOUT: %.loc19_10.2: type = converted %.loc19_10.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %x.loc19_6.1: () = param x // CHECK:STDOUT: @.1.%x: () = bind_name x, %x.loc19_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %.loc21_10.1: () = tuple_literal () // CHECK:STDOUT: %.loc21_10.2: type = converted %.loc21_10.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %x.loc21_6.1: () = param x // CHECK:STDOUT: @G.%x: () = bind_name x, %x.loc21_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl.loc29: = fn_decl @.2 [template = constants.%struct.4] {} -// CHECK:STDOUT: %H.decl: H = fn_decl @H [template = constants.%struct.5] { +// CHECK:STDOUT: %.decl.loc29: > = fn_decl @.2 [template = constants.%.3] {} +// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] { // CHECK:STDOUT: %.loc31_10.1: () = tuple_literal () // CHECK:STDOUT: %.loc31_10.2: type = converted %.loc31_10.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %x.loc31_6.1: () = param x // CHECK:STDOUT: @H.%x: () = bind_name x, %x.loc31_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl.loc36: = fn_decl @.3 [template = constants.%struct.6] { +// CHECK:STDOUT: %.decl.loc36: > = fn_decl @.3 [template = constants.%.4] { // CHECK:STDOUT: %x.loc36_6.1: = param x // CHECK:STDOUT: @.3.%x: = bind_name x, %x.loc36_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %I.decl: I = fn_decl @I [template = constants.%struct.7] {} -// CHECK:STDOUT: %.decl.loc46: = fn_decl @.4 [template = constants.%struct.8] { +// CHECK:STDOUT: %I.decl: = fn_decl @I [template = constants.%I] {} +// CHECK:STDOUT: %.decl.loc46: > = fn_decl @.4 [template = constants.%.5] { // CHECK:STDOUT: %.loc46_12.1: () = tuple_literal () // CHECK:STDOUT: %.loc46_12.2: type = converted %.loc46_12.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: @.4.%return: ref () = var // CHECK:STDOUT: } -// CHECK:STDOUT: %J.decl: J = fn_decl @J [template = constants.%struct.9] { +// CHECK:STDOUT: %J.decl: = fn_decl @J [template = constants.%J] { // CHECK:STDOUT: %.loc48_12.1: () = tuple_literal () // CHECK:STDOUT: %.loc48_12.2: type = converted %.loc48_12.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: @J.%return: ref () = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl.loc56: = fn_decl @.5 [template = constants.%struct.10] {} -// CHECK:STDOUT: %K.decl: K = fn_decl @K [template = constants.%struct.11] { +// CHECK:STDOUT: %.decl.loc56: > = fn_decl @.5 [template = constants.%.6] {} +// CHECK:STDOUT: %K.decl: = fn_decl @K [template = constants.%K] { // CHECK:STDOUT: %.loc58_12.1: () = tuple_literal () // CHECK:STDOUT: %.loc58_12.2: type = converted %.loc58_12.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: @K.%return: ref () = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl.loc65: = fn_decl @.6 [template = constants.%struct.12] { +// CHECK:STDOUT: %.decl.loc65: > = fn_decl @.6 [template = constants.%.8] { // CHECK:STDOUT: %.loc65_12.1: {} = struct_literal () // CHECK:STDOUT: %.loc65_12.2: type = converted %.loc65_12.1, constants.%.7 [template = constants.%.7] // CHECK:STDOUT: @.6.%return: ref {} = var @@ -197,8 +197,8 @@ fn K() -> {} { return {}; } // CHECK:STDOUT: fn @.6() -> {} { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc65_24: {} = struct_literal () -// CHECK:STDOUT: %struct: {} = struct_value () [template = constants.%struct.13] -// CHECK:STDOUT: %.loc65_25: {} = converted %.loc65_24, %struct [template = constants.%struct.13] +// CHECK:STDOUT: %struct: {} = struct_value () [template = constants.%struct] +// CHECK:STDOUT: %.loc65_25: {} = converted %.loc65_24, %struct [template = constants.%struct] // CHECK:STDOUT: return %.loc65_25 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/definition/no_prelude/fail_redef.carbon b/toolchain/check/testdata/function/definition/no_prelude/fail_redef.carbon index d6263aac1f4c..bf24a76fdce2 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/fail_redef.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/fail_redef.carbon @@ -20,17 +20,17 @@ fn F() {} // CHECK:STDOUT: --- fail_redef.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl.loc11 // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc11: F = fn_decl @F [template = constants.%struct] {} -// CHECK:STDOUT: %F.decl.loc18: F = fn_decl @F [template = constants.%struct] {} +// CHECK:STDOUT: %F.decl.loc11: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %F.decl.loc18: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { diff --git a/toolchain/check/testdata/function/definition/no_prelude/forward_decl.carbon b/toolchain/check/testdata/function/definition/no_prelude/forward_decl.carbon index 37436a8c2e9b..3fafd3ef453d 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/forward_decl.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/forward_decl.carbon @@ -15,17 +15,17 @@ fn Foo() {} // CHECK:STDOUT: --- forward_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Foo: type = fn_type @Foo [template] +// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Foo = struct_value () [template] +// CHECK:STDOUT: %Foo: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Foo = %Foo.decl.loc11 // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl.loc11: Foo = fn_decl @Foo [template = constants.%struct] {} -// CHECK:STDOUT: %Foo.decl.loc13: Foo = fn_decl @Foo [template = constants.%struct] {} +// CHECK:STDOUT: %Foo.decl.loc11: = fn_decl @Foo [template = constants.%Foo] {} +// CHECK:STDOUT: %Foo.decl.loc13: = fn_decl @Foo [template = constants.%Foo] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo() { diff --git a/toolchain/check/testdata/function/definition/no_prelude/implicit_import.carbon b/toolchain/check/testdata/function/definition/no_prelude/implicit_import.carbon index cb7455ab2a0a..b5c20425becd 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/implicit_import.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/implicit_import.carbon @@ -127,16 +127,16 @@ fn B() {} // CHECK:STDOUT: --- basic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -144,17 +144,17 @@ fn B() {} // CHECK:STDOUT: --- basic.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: A = import_ref ir0, inst+1, loaded [template = constants.%struct] -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %import_ref: = import_ref ir0, inst+1, loaded [template = constants.%A] +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -165,16 +165,16 @@ fn B() {} // CHECK:STDOUT: --- extern_api.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: extern fn @A(); @@ -182,17 +182,17 @@ fn B() {} // CHECK:STDOUT: --- fail_extern_api.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: A = import_ref ir0, inst+1, loaded [template = constants.%struct] -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %import_ref: = import_ref ir0, inst+1, loaded [template = constants.%A] +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -203,16 +203,16 @@ fn B() {} // CHECK:STDOUT: --- extern_impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -220,17 +220,17 @@ fn B() {} // CHECK:STDOUT: --- fail_extern_impl.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: A = import_ref ir0, inst+1, loaded [template = constants.%struct] -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %import_ref: = import_ref ir0, inst+1, loaded [template = constants.%A] +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -241,16 +241,16 @@ fn B() {} // CHECK:STDOUT: --- redecl_after_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -261,17 +261,17 @@ fn B() {} // CHECK:STDOUT: --- fail_redecl_after_def.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: A = import_ref ir0, inst+1, loaded [template = constants.%struct] -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %import_ref: = import_ref ir0, inst+1, loaded [template = constants.%A] +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -279,16 +279,16 @@ fn B() {} // CHECK:STDOUT: --- redef_after_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -299,17 +299,17 @@ fn B() {} // CHECK:STDOUT: --- fail_redef_after_def.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: A = import_ref ir0, inst+1, loaded [template = constants.%struct] -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %import_ref: = import_ref ir0, inst+1, loaded [template = constants.%A] +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -320,9 +320,9 @@ fn B() {} // CHECK:STDOUT: --- def_alias.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -330,9 +330,9 @@ fn B() {} // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: .B = %B // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} -// CHECK:STDOUT: %A.ref: A = name_ref A, %A.decl [template = constants.%struct] -// CHECK:STDOUT: %B: A = bind_alias B, %A.decl [template = constants.%struct] +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %A.ref: = name_ref A, %A.decl [template = constants.%A] +// CHECK:STDOUT: %B: = bind_alias B, %A.decl [template = constants.%A] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -340,11 +340,11 @@ fn B() {} // CHECK:STDOUT: --- fail_def_alias.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: A = struct_value () [template] -// CHECK:STDOUT: %.2: type = fn_type @.1 [template] -// CHECK:STDOUT: %struct.2: = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %.type: type = fn_type @.1 [template] +// CHECK:STDOUT: %.2: > = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -353,8 +353,8 @@ fn B() {} // CHECK:STDOUT: .B = %import_ref.2 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1 = import_ref ir0, inst+1, unloaded -// CHECK:STDOUT: %import_ref.2: A = import_ref ir0, inst+6, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %.decl: = fn_decl @.1 [template = constants.%struct.2] {} +// CHECK:STDOUT: %import_ref.2: = import_ref ir0, inst+6, loaded [template = constants.%A] +// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.2] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); diff --git a/toolchain/check/testdata/function/definition/no_prelude/order.carbon b/toolchain/check/testdata/function/definition/no_prelude/order.carbon index d3d205544777..9ccb27778be2 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/order.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/order.carbon @@ -15,13 +15,13 @@ fn Baz() {} // CHECK:STDOUT: --- order.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Foo: type = fn_type @Foo [template] +// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Foo = struct_value () [template] -// CHECK:STDOUT: %Bar: type = fn_type @Bar [template] -// CHECK:STDOUT: %struct.2: Bar = struct_value () [template] -// CHECK:STDOUT: %Baz: type = fn_type @Baz [template] -// CHECK:STDOUT: %struct.3: Baz = struct_value () [template] +// CHECK:STDOUT: %Foo: = struct_value () [template] +// CHECK:STDOUT: %Bar.type: type = fn_type @Bar [template] +// CHECK:STDOUT: %Bar: = struct_value () [template] +// CHECK:STDOUT: %Baz.type: type = fn_type @Baz [template] +// CHECK:STDOUT: %Baz: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -30,9 +30,9 @@ fn Baz() {} // CHECK:STDOUT: .Bar = %Bar.decl // CHECK:STDOUT: .Baz = %Baz.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl: Foo = fn_decl @Foo [template = constants.%struct.1] {} -// CHECK:STDOUT: %Bar.decl: Bar = fn_decl @Bar [template = constants.%struct.2] {} -// CHECK:STDOUT: %Baz.decl: Baz = fn_decl @Baz [template = constants.%struct.3] {} +// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] {} +// CHECK:STDOUT: %Bar.decl: = fn_decl @Bar [template = constants.%Bar] {} +// CHECK:STDOUT: %Baz.decl: = fn_decl @Baz [template = constants.%Baz] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo() { diff --git a/toolchain/check/testdata/function/definition/no_prelude/params_zero.carbon b/toolchain/check/testdata/function/definition/no_prelude/params_zero.carbon index 9fb4faff17e4..d95487729750 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/params_zero.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/params_zero.carbon @@ -13,16 +13,16 @@ fn Foo() {} // CHECK:STDOUT: --- params_zero.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Foo: type = fn_type @Foo [template] +// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Foo = struct_value () [template] +// CHECK:STDOUT: %Foo: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl: Foo = fn_decl @Foo [template = constants.%struct] {} +// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo() { diff --git a/toolchain/check/testdata/function/definition/params_one.carbon b/toolchain/check/testdata/function/definition/params_one.carbon index a08342021c80..523e306e3827 100644 --- a/toolchain/check/testdata/function/definition/params_one.carbon +++ b/toolchain/check/testdata/function/definition/params_one.carbon @@ -13,11 +13,11 @@ fn Foo(a: i32) {} // CHECK:STDOUT: --- params_one.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Foo: type = fn_type @Foo [template] -// CHECK:STDOUT: %struct.2: Foo = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] +// CHECK:STDOUT: %Foo: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -26,9 +26,9 @@ fn Foo(a: i32) {} // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Foo.decl: Foo = fn_decl @Foo [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32] // CHECK:STDOUT: %a.loc11_8.1: i32 = param a diff --git a/toolchain/check/testdata/function/definition/params_one_comma.carbon b/toolchain/check/testdata/function/definition/params_one_comma.carbon index 4991fddb416b..9ccf35b13bcf 100644 --- a/toolchain/check/testdata/function/definition/params_one_comma.carbon +++ b/toolchain/check/testdata/function/definition/params_one_comma.carbon @@ -13,11 +13,11 @@ fn Foo(a: i32,) {} // CHECK:STDOUT: --- params_one_comma.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Foo: type = fn_type @Foo [template] -// CHECK:STDOUT: %struct.2: Foo = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] +// CHECK:STDOUT: %Foo: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -26,9 +26,9 @@ fn Foo(a: i32,) {} // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Foo.decl: Foo = fn_decl @Foo [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32] // CHECK:STDOUT: %a.loc11_8.1: i32 = param a diff --git a/toolchain/check/testdata/function/definition/params_two.carbon b/toolchain/check/testdata/function/definition/params_two.carbon index 558c77203d9d..9b6f0cb6c53d 100644 --- a/toolchain/check/testdata/function/definition/params_two.carbon +++ b/toolchain/check/testdata/function/definition/params_two.carbon @@ -13,11 +13,11 @@ fn Foo(a: i32, b: i32) {} // CHECK:STDOUT: --- params_two.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Foo: type = fn_type @Foo [template] -// CHECK:STDOUT: %struct.2: Foo = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] +// CHECK:STDOUT: %Foo: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -26,15 +26,15 @@ fn Foo(a: i32, b: i32) {} // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Foo.decl: Foo = fn_decl @Foo [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32] // CHECK:STDOUT: %a.loc11_8.1: i32 = param a // CHECK:STDOUT: @Foo.%a: i32 = bind_name a, %a.loc11_8.1 -// CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_32.loc11_19 [template = i32] // CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_32.loc11_19, %.loc11_19.1 [template = i32] // CHECK:STDOUT: %b.loc11_16.1: i32 = param b diff --git a/toolchain/check/testdata/function/definition/params_two_comma.carbon b/toolchain/check/testdata/function/definition/params_two_comma.carbon index 37067319de06..1341fbf1dcac 100644 --- a/toolchain/check/testdata/function/definition/params_two_comma.carbon +++ b/toolchain/check/testdata/function/definition/params_two_comma.carbon @@ -13,11 +13,11 @@ fn Foo(a: i32, b: i32,) {} // CHECK:STDOUT: --- params_two_comma.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Foo: type = fn_type @Foo [template] -// CHECK:STDOUT: %struct.2: Foo = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] +// CHECK:STDOUT: %Foo: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -26,15 +26,15 @@ fn Foo(a: i32, b: i32,) {} // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Foo.decl: Foo = fn_decl @Foo [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { +// CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32] // CHECK:STDOUT: %a.loc11_8.1: i32 = param a // CHECK:STDOUT: @Foo.%a: i32 = bind_name a, %a.loc11_8.1 -// CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_32.loc11_19 [template = i32] // CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_32.loc11_19, %.loc11_19.1 [template = i32] // CHECK:STDOUT: %b.loc11_16.1: i32 = param b diff --git a/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon b/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon index 751e69c1d440..0b0821a92482 100644 --- a/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon +++ b/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon @@ -16,12 +16,12 @@ fn F(N:! i32, a: [i32; N]*); // CHECK:STDOUT: --- fail_todo_param_in_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %N: i32 = bind_symbolic_name N 0 [symbolic] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -30,15 +30,15 @@ fn F(N:! i32, a: [i32; N]*); // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc14_10: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc14_10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %int.make_type_32.loc14_10 [template = i32] // CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_32.loc14_10, %.loc14_10.1 [template = i32] // CHECK:STDOUT: %N.loc14_6.1: i32 = param N // CHECK:STDOUT: @F.%N: i32 = bind_symbolic_name N 0, %N.loc14_6.1 [symbolic = constants.%N] -// CHECK:STDOUT: %int.make_type_32.loc14_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %N.ref: i32 = name_ref N, @F.%N [symbolic = constants.%N] // CHECK:STDOUT: %.loc14_19.1: type = value_of_initializer %int.make_type_32.loc14_19 [template = i32] // CHECK:STDOUT: %.loc14_19.2: type = converted %int.make_type_32.loc14_19, %.loc14_19.1 [template = i32] diff --git a/toolchain/check/testdata/function/generic/no_prelude/fail_type_param_mismatch.carbon b/toolchain/check/testdata/function/generic/no_prelude/fail_type_param_mismatch.carbon index da7e1f3b6124..b3964af3043b 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/fail_type_param_mismatch.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/fail_type_param_mismatch.carbon @@ -21,9 +21,9 @@ fn F(T:! type, U:! type) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U 1 [symbolic] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: type = ptr_type T [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -31,7 +31,7 @@ fn F(T:! type, U:! type) { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc11_6.1: type = param T // CHECK:STDOUT: @F.%T: type = bind_symbolic_name T 0, %T.loc11_6.1 [symbolic = constants.%T] // CHECK:STDOUT: %U.loc11_16.1: type = param U diff --git a/toolchain/check/testdata/function/generic/no_prelude/type_param.carbon b/toolchain/check/testdata/function/generic/no_prelude/type_param.carbon index 0546e0f8e006..7dc868e23710 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/type_param.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/type_param.carbon @@ -17,9 +17,9 @@ fn F(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: type = ptr_type T [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -27,7 +27,7 @@ fn F(T:! type) { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc11_6.1: type = param T // CHECK:STDOUT: @F.%T: type = bind_symbolic_name T 0, %T.loc11_6.1 [symbolic = constants.%T] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/no_prelude/type_param_scope.carbon b/toolchain/check/testdata/function/generic/no_prelude/type_param_scope.carbon index 22cfd706eba8..89c9be22d1e1 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/type_param_scope.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/type_param_scope.carbon @@ -17,16 +17,16 @@ fn F(T:! type, n: T) -> T { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc11_6.1: type = param T // CHECK:STDOUT: @F.%T: type = bind_symbolic_name T 0, %T.loc11_6.1 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref.loc11_19: type = name_ref T, @F.%T [symbolic = constants.%T] diff --git a/toolchain/check/testdata/function/generic/redeclare.carbon b/toolchain/check/testdata/function/generic/redeclare.carbon index 776b8c745ac2..6c8170f408c8 100644 --- a/toolchain/check/testdata/function/generic/redeclare.carbon +++ b/toolchain/check/testdata/function/generic/redeclare.carbon @@ -106,9 +106,9 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %.1: type = ptr_type T [symbolic] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -117,14 +117,14 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: .F = %F.decl.loc4 // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl.loc4: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl.loc4: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc4_6.1: type = param T // CHECK:STDOUT: %T.loc4_6.2: type = bind_symbolic_name T 0, %T.loc4_6.1 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref.loc4: type = name_ref T, %T.loc4_6.2 [symbolic = constants.%T] // CHECK:STDOUT: %.loc4: type = ptr_type T [symbolic = constants.%.1] // CHECK:STDOUT: %return.var.loc4: ref T* = var // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc6: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl.loc6: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc6_6.1: type = param T // CHECK:STDOUT: @F.%T: type = bind_symbolic_name T 0, %T.loc6_6.1 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref.loc6: type = name_ref T, @F.%T [symbolic = constants.%T] @@ -135,7 +135,7 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%T: type) -> T* { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%F.decl.loc4 [template = constants.%struct] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl.loc4 [template = constants.%F] // CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T] // CHECK:STDOUT: %F.call: init T* = call %F.ref(%T.ref) // CHECK:STDOUT: %.loc7_14.1: T* = value_of_initializer %F.call @@ -149,12 +149,12 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U 1 [symbolic] // CHECK:STDOUT: %.1: type = ptr_type T [symbolic] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.3: type = ptr_type U [symbolic] -// CHECK:STDOUT: %.4: type = fn_type @.1 [template] -// CHECK:STDOUT: %struct.2: = struct_value () [template] +// CHECK:STDOUT: %.type: type = fn_type @.1 [template] +// CHECK:STDOUT: %.4: > = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -163,7 +163,7 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc4_6.1: type = param T // CHECK:STDOUT: @F.%T: type = bind_symbolic_name T 0, %T.loc4_6.1 [symbolic = constants.%T] // CHECK:STDOUT: %U.loc4_16.1: type = param U @@ -172,7 +172,7 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %.loc4: type = ptr_type T [symbolic = constants.%.1] // CHECK:STDOUT: @F.%return: ref T* = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: = fn_decl @.1 [template = constants.%struct.2] { +// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.4] { // CHECK:STDOUT: %T.loc13_6.1: type = param T // CHECK:STDOUT: @.1.%T: type = bind_symbolic_name T 0, %T.loc13_6.1 [symbolic = constants.%T] // CHECK:STDOUT: %U.loc13_16.1: type = param U @@ -187,7 +187,7 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: // CHECK:STDOUT: fn @.1(%T: type, %U: type) -> U* { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%F.decl [template = constants.%struct.1] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T] // CHECK:STDOUT: %F.call: init T* = call %F.ref() [template = ] // CHECK:STDOUT: return @@ -199,14 +199,14 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %U.1: type = bind_symbolic_name U 1 [symbolic] // CHECK:STDOUT: %.1: type = ptr_type T [symbolic] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %U.2: type = bind_symbolic_name U 0 [symbolic] // CHECK:STDOUT: %T.2: type = bind_symbolic_name T 1 [symbolic] // CHECK:STDOUT: %.3: type = ptr_type T [symbolic] -// CHECK:STDOUT: %.4: type = fn_type @.1 [template] -// CHECK:STDOUT: %struct.2: = struct_value () [template] +// CHECK:STDOUT: %.type: type = fn_type @.1 [template] +// CHECK:STDOUT: %.4: > = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -215,7 +215,7 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc4_6.1: type = param T // CHECK:STDOUT: @F.%T: type = bind_symbolic_name T 0, %T.loc4_6.1 [symbolic = constants.%T.1] // CHECK:STDOUT: %U.loc4_16.1: type = param U @@ -224,7 +224,7 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %.loc4: type = ptr_type T [symbolic = constants.%.1] // CHECK:STDOUT: @F.%return: ref T* = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: = fn_decl @.1 [template = constants.%struct.2] { +// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.4] { // CHECK:STDOUT: %U.loc13_6.1: type = param U // CHECK:STDOUT: @.1.%U: type = bind_symbolic_name U 0, %U.loc13_6.1 [symbolic = constants.%U.2] // CHECK:STDOUT: %T.loc13_16.1: type = param T @@ -239,7 +239,7 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: // CHECK:STDOUT: fn @.1(%U: type, %T: type) -> T* { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%F.decl [template = constants.%struct.1] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T.2] // CHECK:STDOUT: %F.call: init T* = call %F.ref() [template = ] // CHECK:STDOUT: return @@ -251,14 +251,14 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %U.1: type = bind_symbolic_name U 1 [symbolic] // CHECK:STDOUT: %.1: type = ptr_type T [symbolic] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %U.2: type = bind_symbolic_name U 0 [symbolic] // CHECK:STDOUT: %T.2: type = bind_symbolic_name T 1 [symbolic] // CHECK:STDOUT: %.3: type = ptr_type U [symbolic] -// CHECK:STDOUT: %.4: type = fn_type @.1 [template] -// CHECK:STDOUT: %struct.2: = struct_value () [template] +// CHECK:STDOUT: %.type: type = fn_type @.1 [template] +// CHECK:STDOUT: %.4: > = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -267,7 +267,7 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc4_6.1: type = param T // CHECK:STDOUT: @F.%T: type = bind_symbolic_name T 0, %T.loc4_6.1 [symbolic = constants.%T.1] // CHECK:STDOUT: %U.loc4_16.1: type = param U @@ -276,7 +276,7 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %.loc4: type = ptr_type T [symbolic = constants.%.1] // CHECK:STDOUT: @F.%return: ref T* = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: = fn_decl @.1 [template = constants.%struct.2] { +// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.4] { // CHECK:STDOUT: %U.loc13_6.1: type = param U // CHECK:STDOUT: @.1.%U: type = bind_symbolic_name U 0, %U.loc13_6.1 [symbolic = constants.%U.2] // CHECK:STDOUT: %T.loc13_16.1: type = param T @@ -291,7 +291,7 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: // CHECK:STDOUT: fn @.1(%U: type, %T: type) -> U* { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%F.decl [template = constants.%struct.1] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T.2] // CHECK:STDOUT: %F.call: init T* = call %F.ref() [template = ] // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/global/class_with_fun.carbon b/toolchain/check/testdata/global/class_with_fun.carbon index 9be200154163..533295bf6dd7 100644 --- a/toolchain/check/testdata/global/class_with_fun.carbon +++ b/toolchain/check/testdata/global/class_with_fun.carbon @@ -20,11 +20,11 @@ var a: A = {}; // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %ret_a: type = fn_type @ret_a [template] +// CHECK:STDOUT: %ret_a.type: type = fn_type @ret_a [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: ret_a = struct_value () [template] +// CHECK:STDOUT: %ret_a: = struct_value () [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] -// CHECK:STDOUT: %struct.2: A = struct_value () [template] +// CHECK:STDOUT: %struct: A = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -36,7 +36,7 @@ var a: A = {}; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} -// CHECK:STDOUT: %ret_a.decl: ret_a = fn_decl @ret_a [template = constants.%struct.1] { +// CHECK:STDOUT: %ret_a.decl: = fn_decl @ret_a [template = constants.%ret_a] { // CHECK:STDOUT: %A.ref.loc12: type = name_ref A, %A.decl [template = constants.%A] // CHECK:STDOUT: @ret_a.%return: ref A = var // CHECK:STDOUT: } @@ -53,16 +53,16 @@ var a: A = {}; // CHECK:STDOUT: fn @ret_a() -> %return: A { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc13_11.1: {} = struct_literal () -// CHECK:STDOUT: %.loc13_11.2: init A = class_init (), %return [template = constants.%struct.2] -// CHECK:STDOUT: %.loc13_12: init A = converted %.loc13_11.1, %.loc13_11.2 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc13_11.2: init A = class_init (), %return [template = constants.%struct] +// CHECK:STDOUT: %.loc13_12: init A = converted %.loc13_11.1, %.loc13_11.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc13_12 to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc16_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc16_13.2: init A = class_init (), file.%a.var [template = constants.%struct.2] -// CHECK:STDOUT: %.loc16_14: init A = converted %.loc16_13.1, %.loc16_13.2 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc16_13.2: init A = class_init (), file.%a.var [template = constants.%struct] +// CHECK:STDOUT: %.loc16_14: init A = converted %.loc16_13.1, %.loc16_13.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%a.var, %.loc16_14 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/global/decl.carbon b/toolchain/check/testdata/global/decl.carbon index a7e935ced597..21a868778901 100644 --- a/toolchain/check/testdata/global/decl.carbon +++ b/toolchain/check/testdata/global/decl.carbon @@ -12,9 +12,9 @@ var a: i32; // CHECK:STDOUT: --- decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -23,8 +23,8 @@ var a: i32; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc10_8.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_32, %.loc10_8.1 [template = i32] // CHECK:STDOUT: %a.var: ref i32 = var a diff --git a/toolchain/check/testdata/global/simple_init.carbon b/toolchain/check/testdata/global/simple_init.carbon index 763ed9b026f2..1c7f61c22fc1 100644 --- a/toolchain/check/testdata/global/simple_init.carbon +++ b/toolchain/check/testdata/global/simple_init.carbon @@ -12,9 +12,9 @@ var a: i32 = 0; // CHECK:STDOUT: --- simple_init.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -24,8 +24,8 @@ var a: i32 = 0; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc10_8.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_32, %.loc10_8.1 [template = i32] // CHECK:STDOUT: %a.var: ref i32 = var a diff --git a/toolchain/check/testdata/global/simple_with_fun.carbon b/toolchain/check/testdata/global/simple_with_fun.carbon index d31296a494df..b80bf5d0efa3 100644 --- a/toolchain/check/testdata/global/simple_with_fun.carbon +++ b/toolchain/check/testdata/global/simple_with_fun.carbon @@ -17,11 +17,11 @@ var a: i32 = test_a(); // CHECK:STDOUT: --- simple_with_fun.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %test_a: type = fn_type @test_a [template] -// CHECK:STDOUT: %struct.2: test_a = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %test_a.type: type = fn_type @test_a [template] +// CHECK:STDOUT: %test_a: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -32,15 +32,15 @@ var a: i32 = test_a(); // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %test_a.decl: test_a = fn_decl @test_a [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %test_a.decl: = fn_decl @test_a [template = constants.%test_a] { +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_16.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_16.2: type = converted %int.make_type_32.loc11, %.loc11_16.1 [template = i32] // CHECK:STDOUT: @test_a.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_32.loc15, %.loc15_8.1 [template = i32] // CHECK:STDOUT: %a.var: ref i32 = var a @@ -57,7 +57,7 @@ var a: i32 = test_a(); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %test_a.ref: test_a = name_ref test_a, file.%test_a.decl [template = constants.%struct.2] +// CHECK:STDOUT: %test_a.ref: = name_ref test_a, file.%test_a.decl [template = constants.%test_a] // CHECK:STDOUT: %test_a.call: init i32 = call %test_a.ref() // CHECK:STDOUT: assign file.%a.var, %test_a.call // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/if/else.carbon b/toolchain/check/testdata/if/else.carbon index e0db48ca0d60..fd76cd29a11b 100644 --- a/toolchain/check/testdata/if/else.carbon +++ b/toolchain/check/testdata/if/else.carbon @@ -24,17 +24,17 @@ fn If(b: bool) { // CHECK:STDOUT: --- else.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.2: G = struct_value () [template] -// CHECK:STDOUT: %H: type = fn_type @H [template] -// CHECK:STDOUT: %struct.3: H = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.4: Bool = struct_value () [template] -// CHECK:STDOUT: %If: type = fn_type @If [template] -// CHECK:STDOUT: %struct.5: If = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %H.type: type = fn_type @H [template] +// CHECK:STDOUT: %H: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %If.type: type = fn_type @If [template] +// CHECK:STDOUT: %If: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -46,12 +46,12 @@ fn If(b: bool) { // CHECK:STDOUT: .If = %If.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] {} -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.2] {} -// CHECK:STDOUT: %H.decl: H = fn_decl @H [template = constants.%struct.3] {} -// CHECK:STDOUT: %import_ref: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %If.decl: If = fn_decl @If [template = constants.%struct.5] { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct.4() [template = bool] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} +// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] {} +// CHECK:STDOUT: %import_ref: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %If.decl: = fn_decl @If [template = constants.%If] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc15_10.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc15_10.2: type = converted %bool.make_type, %.loc15_10.1 [template = bool] // CHECK:STDOUT: %b.loc15_7.1: bool = param b @@ -82,17 +82,17 @@ fn If(b: bool) { // CHECK:STDOUT: if %b.ref br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%F.decl [template = constants.%struct.1] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init () = call %F.ref() // CHECK:STDOUT: br !if.done // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %G.ref: G = name_ref G, file.%G.decl [template = constants.%struct.2] +// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %G.call: init () = call %G.ref() // CHECK:STDOUT: br !if.done // CHECK:STDOUT: // CHECK:STDOUT: !if.done: -// CHECK:STDOUT: %H.ref: H = name_ref H, file.%H.decl [template = constants.%struct.3] +// CHECK:STDOUT: %H.ref: = name_ref H, file.%H.decl [template = constants.%H] // CHECK:STDOUT: %H.call: init () = call %H.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon b/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon index 500681fb46ce..b360a0b8ca73 100644 --- a/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon +++ b/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon @@ -42,19 +42,19 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: --- fail_reachable_fallthrough.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Bool = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %If1: type = fn_type @If1 [template] -// CHECK:STDOUT: %struct.3: If1 = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %If1.type: type = fn_type @If1 [template] +// CHECK:STDOUT: %If1: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] -// CHECK:STDOUT: %If2: type = fn_type @If2 [template] -// CHECK:STDOUT: %struct.4: If2 = struct_value () [template] +// CHECK:STDOUT: %If2.type: type = fn_type @If2 [template] +// CHECK:STDOUT: %If2: = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] -// CHECK:STDOUT: %If3: type = fn_type @If3 [template] -// CHECK:STDOUT: %struct.5: If3 = struct_value () [template] +// CHECK:STDOUT: %If3.type: type = fn_type @If3 [template] +// CHECK:STDOUT: %If3: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -65,41 +65,41 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: .If3 = %If3.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %If1.decl: If1 = fn_decl @If1 [template = constants.%struct.3] { -// CHECK:STDOUT: %bool.make_type.loc11: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %If1.decl: = fn_decl @If1 [template = constants.%If1] { +// CHECK:STDOUT: %bool.make_type.loc11: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %bool.make_type.loc11 [template = bool] // CHECK:STDOUT: %.loc11_11.2: type = converted %bool.make_type.loc11, %.loc11_11.1 [template = bool] // CHECK:STDOUT: %b.loc11_8.1: bool = param b // CHECK:STDOUT: @If1.%b: bool = bind_name b, %b.loc11_8.1 -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_20.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_20.2: type = converted %int.make_type_32.loc11, %.loc11_20.1 [template = i32] // CHECK:STDOUT: @If1.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %If2.decl: If2 = fn_decl @If2 [template = constants.%struct.4] { -// CHECK:STDOUT: %bool.make_type.loc22: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %If2.decl: = fn_decl @If2 [template = constants.%If2] { +// CHECK:STDOUT: %bool.make_type.loc22: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc22_11.1: type = value_of_initializer %bool.make_type.loc22 [template = bool] // CHECK:STDOUT: %.loc22_11.2: type = converted %bool.make_type.loc22, %.loc22_11.1 [template = bool] // CHECK:STDOUT: %b.loc22_8.1: bool = param b // CHECK:STDOUT: @If2.%b: bool = bind_name b, %b.loc22_8.1 -// CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_20.1: type = value_of_initializer %int.make_type_32.loc22 [template = i32] // CHECK:STDOUT: %.loc22_20.2: type = converted %int.make_type_32.loc22, %.loc22_20.1 [template = i32] // CHECK:STDOUT: @If2.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %If3.decl: If3 = fn_decl @If3 [template = constants.%struct.5] { -// CHECK:STDOUT: %bool.make_type.loc33: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.5: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %If3.decl: = fn_decl @If3 [template = constants.%If3] { +// CHECK:STDOUT: %bool.make_type.loc33: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc33_11.1: type = value_of_initializer %bool.make_type.loc33 [template = bool] // CHECK:STDOUT: %.loc33_11.2: type = converted %bool.make_type.loc33, %.loc33_11.1 [template = bool] // CHECK:STDOUT: %b.loc33_8.1: bool = param b // CHECK:STDOUT: @If3.%b: bool = bind_name b, %b.loc33_8.1 -// CHECK:STDOUT: %int.make_type_32.loc33: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc33_20.1: type = value_of_initializer %int.make_type_32.loc33 [template = i32] // CHECK:STDOUT: %.loc33_20.2: type = converted %int.make_type_32.loc33, %.loc33_20.1 [template = i32] // CHECK:STDOUT: @If3.%return: ref i32 = var diff --git a/toolchain/check/testdata/if/fail_scope.carbon b/toolchain/check/testdata/if/fail_scope.carbon index 6167cffce381..f2fd15f96552 100644 --- a/toolchain/check/testdata/if/fail_scope.carbon +++ b/toolchain/check/testdata/if/fail_scope.carbon @@ -22,13 +22,13 @@ fn VarScope(b: bool) -> i32 { // CHECK:STDOUT: --- fail_scope.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Bool = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %VarScope: type = fn_type @VarScope [template] -// CHECK:STDOUT: %struct.3: VarScope = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %VarScope.type: type = fn_type @VarScope [template] +// CHECK:STDOUT: %VarScope: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -38,20 +38,20 @@ fn VarScope(b: bool) -> i32 { // CHECK:STDOUT: .VarScope = %VarScope.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %VarScope.decl: VarScope = fn_decl @VarScope [template = constants.%struct.3] { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %VarScope.decl: = fn_decl @VarScope [template = constants.%VarScope] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_16.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc11_16.2: type = converted %bool.make_type, %.loc11_16.1 [template = bool] // CHECK:STDOUT: %b.loc11_13.1: bool = param b // CHECK:STDOUT: @VarScope.%b: bool = bind_name b, %b.loc11_13.1 -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_25.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_25.2: type = converted %int.make_type_32, %.loc11_25.1 [template = i32] // CHECK:STDOUT: @VarScope.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; @@ -64,7 +64,7 @@ fn VarScope(b: bool) -> i32 { // CHECK:STDOUT: if %b.ref br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_12.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc13_12.2: type = converted %int.make_type_32, %.loc13_12.1 [template = i32] // CHECK:STDOUT: %n.var: ref i32 = var n diff --git a/toolchain/check/testdata/if/no_else.carbon b/toolchain/check/testdata/if/no_else.carbon index b4f4e8b69ca7..dcbd7ea5e0de 100644 --- a/toolchain/check/testdata/if/no_else.carbon +++ b/toolchain/check/testdata/if/no_else.carbon @@ -21,15 +21,15 @@ fn If(b: bool) { // CHECK:STDOUT: --- no_else.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.2: G = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.3: Bool = struct_value () [template] -// CHECK:STDOUT: %If: type = fn_type @If [template] -// CHECK:STDOUT: %struct.4: If = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %If.type: type = fn_type @If [template] +// CHECK:STDOUT: %If: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -40,11 +40,11 @@ fn If(b: bool) { // CHECK:STDOUT: .If = %If.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] {} -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.2] {} -// CHECK:STDOUT: %import_ref: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %If.decl: If = fn_decl @If [template = constants.%struct.4] { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct.3() [template = bool] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} +// CHECK:STDOUT: %import_ref: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %If.decl: = fn_decl @If [template = constants.%If] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc14_10.2: type = converted %bool.make_type, %.loc14_10.1 [template = bool] // CHECK:STDOUT: %b.loc14_7.1: bool = param b @@ -70,12 +70,12 @@ fn If(b: bool) { // CHECK:STDOUT: if %b.ref br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%F.decl [template = constants.%struct.1] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init () = call %F.ref() // CHECK:STDOUT: br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %G.ref: G = name_ref G, file.%G.decl [template = constants.%struct.2] +// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %G.call: init () = call %G.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/if/unreachable_fallthrough.carbon b/toolchain/check/testdata/if/unreachable_fallthrough.carbon index 765ea770630e..fc222e6afc3e 100644 --- a/toolchain/check/testdata/if/unreachable_fallthrough.carbon +++ b/toolchain/check/testdata/if/unreachable_fallthrough.carbon @@ -20,13 +20,13 @@ fn If(b: bool) -> i32 { // CHECK:STDOUT: --- unreachable_fallthrough.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Bool = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %If: type = fn_type @If [template] -// CHECK:STDOUT: %struct.3: If = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %If.type: type = fn_type @If [template] +// CHECK:STDOUT: %If: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: } @@ -37,15 +37,15 @@ fn If(b: bool) -> i32 { // CHECK:STDOUT: .If = %If.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %If.decl: If = fn_decl @If [template = constants.%struct.3] { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %If.decl: = fn_decl @If [template = constants.%If] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_10.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc11_10.2: type = converted %bool.make_type, %.loc11_10.1 [template = bool] // CHECK:STDOUT: %b.loc11_7.1: bool = param b // CHECK:STDOUT: @If.%b: bool = bind_name b, %b.loc11_7.1 -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_32, %.loc11_19.1 [template = i32] // CHECK:STDOUT: @If.%return: ref i32 = var diff --git a/toolchain/check/testdata/if_expr/basic.carbon b/toolchain/check/testdata/if_expr/basic.carbon index 7b44b798d26d..fc03c8e28586 100644 --- a/toolchain/check/testdata/if_expr/basic.carbon +++ b/toolchain/check/testdata/if_expr/basic.carbon @@ -16,13 +16,13 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: --- basic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Bool = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.3: F = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] // CHECK:STDOUT: %.4: type = ptr_type [i32; 1] [template] @@ -37,32 +37,32 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.3] { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc11_9.2: type = converted %bool.make_type, %.loc11_9.1 [template = bool] // CHECK:STDOUT: %b.loc11_6.1: bool = param b // CHECK:STDOUT: @F.%b: bool = bind_name b, %b.loc11_6.1 -// CHECK:STDOUT: %int.make_type_32.loc11_18: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_18.1: type = value_of_initializer %int.make_type_32.loc11_18 [template = i32] // CHECK:STDOUT: %.loc11_18.2: type = converted %int.make_type_32.loc11_18, %.loc11_18.1 [template = i32] // CHECK:STDOUT: %n.loc11_15.1: i32 = param n // CHECK:STDOUT: @F.%n: i32 = bind_name n, %n.loc11_15.1 -// CHECK:STDOUT: %int.make_type_32.loc11_26: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_26.1: type = value_of_initializer %int.make_type_32.loc11_26 [template = i32] // CHECK:STDOUT: %.loc11_26.2: type = converted %int.make_type_32.loc11_26, %.loc11_26.1 [template = i32] // CHECK:STDOUT: %m.loc11_23.1: i32 = param m // CHECK:STDOUT: @F.%m: i32 = bind_name m, %m.loc11_23.1 -// CHECK:STDOUT: %int.make_type_32.loc11_34: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_34.1: type = value_of_initializer %int.make_type_32.loc11_34 [template = i32] // CHECK:STDOUT: %.loc11_34.2: type = converted %int.make_type_32.loc11_34, %.loc11_34.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; @@ -71,7 +71,7 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%b: bool, %n: i32, %m: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_16: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc12_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_11.2: type = converted %int.make_type_32, %.loc12_11.1 [template = i32] diff --git a/toolchain/check/testdata/if_expr/constant_condition.carbon b/toolchain/check/testdata/if_expr/constant_condition.carbon index 325460ce4222..bd2aa2895921 100644 --- a/toolchain/check/testdata/if_expr/constant_condition.carbon +++ b/toolchain/check/testdata/if_expr/constant_condition.carbon @@ -34,26 +34,26 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: --- constant_condition.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %A: type = fn_type @A [template] -// CHECK:STDOUT: %struct.2: A = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] -// CHECK:STDOUT: %B: type = fn_type @B [template] -// CHECK:STDOUT: %struct.3: B = struct_value () [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] +// CHECK:STDOUT: %B: = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.4: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.4: bool = bool_literal true [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.5: G = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.5: bool = bool_literal false [template] -// CHECK:STDOUT: %Constant: type = fn_type @Constant [template] -// CHECK:STDOUT: %struct.6: Constant = struct_value () [template] +// CHECK:STDOUT: %Constant.type: type = fn_type @Constant [template] +// CHECK:STDOUT: %Constant: = struct_value () [template] // CHECK:STDOUT: %.6: type = ptr_type i32 [template] -// CHECK:STDOUT: %PartiallyConstant: type = fn_type @PartiallyConstant [template] -// CHECK:STDOUT: %struct.7: PartiallyConstant = struct_value () [template] +// CHECK:STDOUT: %PartiallyConstant.type: type = fn_type @PartiallyConstant [template] +// CHECK:STDOUT: %PartiallyConstant: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -67,56 +67,56 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: .PartiallyConstant = %PartiallyConstant.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] { +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11, %.loc11_11.1 [template = i32] // CHECK:STDOUT: @A.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %B.decl: B = fn_decl @B [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_11.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_11.2: type = converted %int.make_type_32.loc12, %.loc12_11.1 [template = i32] // CHECK:STDOUT: @B.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_11.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] // CHECK:STDOUT: %.loc14_11.2: type = converted %int.make_type_32.loc14, %.loc14_11.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.5] { -// CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_11.1: type = value_of_initializer %int.make_type_32.loc18 [template = i32] // CHECK:STDOUT: %.loc18_11.2: type = converted %int.make_type_32.loc18, %.loc18_11.1 [template = i32] // CHECK:STDOUT: @G.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Constant.decl: Constant = fn_decl @Constant [template = constants.%struct.6] { -// CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Constant.decl: = fn_decl @Constant [template = constants.%Constant] { +// CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_18.1: type = value_of_initializer %int.make_type_32.loc22 [template = i32] // CHECK:STDOUT: %.loc22_18.2: type = converted %int.make_type_32.loc22, %.loc22_18.1 [template = i32] // CHECK:STDOUT: @Constant.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.9: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.10: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %PartiallyConstant.decl: PartiallyConstant = fn_decl @PartiallyConstant [template = constants.%struct.7] { +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %PartiallyConstant.decl: = fn_decl @PartiallyConstant [template = constants.%PartiallyConstant] { // CHECK:STDOUT: %t.loc28_22.1: type = param t // CHECK:STDOUT: @PartiallyConstant.%t: type = bind_name t, %t.loc28_22.1 -// CHECK:STDOUT: %int.make_type_32.loc28: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc28: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc28_34.1: type = value_of_initializer %int.make_type_32.loc28 [template = i32] // CHECK:STDOUT: %.loc28_34.2: type = converted %int.make_type_32.loc28, %.loc28_34.1 [template = i32] // CHECK:STDOUT: @PartiallyConstant.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.11: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.12: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -139,14 +139,14 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: if %.loc15_13 br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: -// CHECK:STDOUT: %A.ref: A = name_ref A, file.%A.decl [template = constants.%struct.2] +// CHECK:STDOUT: %A.ref: = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %A.call: init i32 = call %A.ref() // CHECK:STDOUT: %.loc15_24.1: i32 = value_of_initializer %A.call // CHECK:STDOUT: %.loc15_24.2: i32 = converted %A.call, %.loc15_24.1 // CHECK:STDOUT: br !if.expr.result(%.loc15_24.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: -// CHECK:STDOUT: %B.ref: B = name_ref B, file.%B.decl [template = constants.%struct.3] +// CHECK:STDOUT: %B.ref: = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %B.call: init i32 = call %B.ref() // CHECK:STDOUT: %.loc15_27.1: i32 = value_of_initializer %B.call // CHECK:STDOUT: %.loc15_27.2: i32 = converted %B.call, %.loc15_27.1 @@ -163,14 +163,14 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: if %.loc19_13 br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: -// CHECK:STDOUT: %A.ref: A = name_ref A, file.%A.decl [template = constants.%struct.2] +// CHECK:STDOUT: %A.ref: = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %A.call: init i32 = call %A.ref() // CHECK:STDOUT: %.loc19_25.1: i32 = value_of_initializer %A.call // CHECK:STDOUT: %.loc19_25.2: i32 = converted %A.call, %.loc19_25.1 // CHECK:STDOUT: br !if.expr.result(%.loc19_25.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: -// CHECK:STDOUT: %B.ref: B = name_ref B, file.%B.decl [template = constants.%struct.3] +// CHECK:STDOUT: %B.ref: = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %B.call: init i32 = call %B.ref() // CHECK:STDOUT: %.loc19_28.1: i32 = value_of_initializer %B.call // CHECK:STDOUT: %.loc19_28.2: i32 = converted %B.call, %.loc19_28.1 @@ -187,13 +187,13 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: if %.loc23_13 br !if.expr.then.loc23 else br !if.expr.else.loc23 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc23: -// CHECK:STDOUT: %int.make_type_32.loc23_23: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc23_23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_23.1: type = value_of_initializer %int.make_type_32.loc23_23 [template = i32] // CHECK:STDOUT: %.loc23_23.2: type = converted %int.make_type_32.loc23_23, %.loc23_23.1 [template = i32] // CHECK:STDOUT: br !if.expr.result.loc23(%.loc23_23.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc23: -// CHECK:STDOUT: %int.make_type_32.loc23_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc23_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_35.1: type = value_of_initializer %int.make_type_32.loc23_32 [template = i32] // CHECK:STDOUT: %.loc23_35.2: type = converted %int.make_type_32.loc23_32, %.loc23_35.1 [template = i32] // CHECK:STDOUT: %.loc23_35.3: type = ptr_type i32 [template = constants.%.6] @@ -209,13 +209,13 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: if %.loc24_13 br !if.expr.then.loc24 else br !if.expr.else.loc24 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc24: -// CHECK:STDOUT: %int.make_type_32.loc24_24: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc24_24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc24_24.1: type = value_of_initializer %int.make_type_32.loc24_24 [template = i32] // CHECK:STDOUT: %.loc24_24.2: type = converted %int.make_type_32.loc24_24, %.loc24_24.1 [template = i32] // CHECK:STDOUT: br !if.expr.result.loc24(%.loc24_24.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc24: -// CHECK:STDOUT: %int.make_type_32.loc24_33: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc24_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc24_36.1: type = value_of_initializer %int.make_type_32.loc24_33 [template = i32] // CHECK:STDOUT: %.loc24_36.2: type = converted %int.make_type_32.loc24_33, %.loc24_36.1 [template = i32] // CHECK:STDOUT: %.loc24_36.3: type = ptr_type i32 [template = constants.%.6] @@ -241,7 +241,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: if %.loc29_13 br !if.expr.then.loc29 else br !if.expr.else.loc29 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc29: -// CHECK:STDOUT: %int.make_type_32.loc29: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc29: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc29_23.1: type = value_of_initializer %int.make_type_32.loc29 [template = i32] // CHECK:STDOUT: %.loc29_23.2: type = converted %int.make_type_32.loc29, %.loc29_23.1 [template = i32] // CHECK:STDOUT: br !if.expr.result.loc29(%.loc29_23.2) @@ -264,7 +264,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: br !if.expr.result.loc30(%t.ref.loc30) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc30: -// CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc30_34.1: type = value_of_initializer %int.make_type_32.loc30 [template = i32] // CHECK:STDOUT: %.loc30_34.2: type = converted %int.make_type_32.loc30, %.loc30_34.1 [template = i32] // CHECK:STDOUT: %.loc30_34.3: type = ptr_type i32 [template = constants.%.6] diff --git a/toolchain/check/testdata/if_expr/control_flow.carbon b/toolchain/check/testdata/if_expr/control_flow.carbon index 6e7aa714a3ea..26a586ca380f 100644 --- a/toolchain/check/testdata/if_expr/control_flow.carbon +++ b/toolchain/check/testdata/if_expr/control_flow.carbon @@ -18,19 +18,19 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: --- control_flow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %A: type = fn_type @A [template] -// CHECK:STDOUT: %struct.2: A = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] -// CHECK:STDOUT: %B: type = fn_type @B [template] -// CHECK:STDOUT: %struct.3: B = struct_value () [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] +// CHECK:STDOUT: %B: = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.4: Bool = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.5: F = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -41,29 +41,29 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] { +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11, %.loc11_11.1 [template = i32] // CHECK:STDOUT: @A.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %B.decl: B = fn_decl @B [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_11.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_11.2: type = converted %int.make_type_32.loc12, %.loc12_11.1 [template = i32] // CHECK:STDOUT: @B.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.5] { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct.4() [template = bool] +// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc14_9.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc14_9.2: type = converted %bool.make_type, %.loc14_9.1 [template = bool] // CHECK:STDOUT: %b.loc14_6.1: bool = param b // CHECK:STDOUT: @F.%b: bool = bind_name b, %b.loc14_6.1 -// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_18.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] // CHECK:STDOUT: %.loc14_18.2: type = converted %int.make_type_32.loc14, %.loc14_18.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var @@ -92,14 +92,14 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: if %b.ref br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: -// CHECK:STDOUT: %A.ref: A = name_ref A, file.%A.decl [template = constants.%struct.2] +// CHECK:STDOUT: %A.ref: = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %A.call: init i32 = call %A.ref() // CHECK:STDOUT: %.loc15_21.1: i32 = value_of_initializer %A.call // CHECK:STDOUT: %.loc15_21.2: i32 = converted %A.call, %.loc15_21.1 // CHECK:STDOUT: br !if.expr.result(%.loc15_21.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: -// CHECK:STDOUT: %B.ref: B = name_ref B, file.%B.decl [template = constants.%struct.3] +// CHECK:STDOUT: %B.ref: = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %B.call: init i32 = call %B.ref() // CHECK:STDOUT: %.loc15_24.1: i32 = value_of_initializer %B.call // CHECK:STDOUT: %.loc15_24.2: i32 = converted %B.call, %.loc15_24.1 diff --git a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon index b6e45d62a99e..d94e01737a92 100644 --- a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon +++ b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon @@ -40,16 +40,16 @@ class C { // CHECK:STDOUT: --- fail_not_in_function.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal true [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] // CHECK:STDOUT: %.4: i32 = int_literal 0 [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.5: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] -// CHECK:STDOUT: %struct.2: Float = struct_value () [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] +// CHECK:STDOUT: %Float: = struct_value () [template] // CHECK:STDOUT: %.6: type = unbound_element_type C, i32 [template] // CHECK:STDOUT: %.7: type = struct_type {.n: i32} [template] // CHECK:STDOUT: } @@ -58,8 +58,8 @@ class C { // CHECK:STDOUT: %.loc23: i32 = block_arg [template = constants.%.3] // CHECK:STDOUT: %x: i32 = bind_name x, %.loc23 // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { diff --git a/toolchain/check/testdata/if_expr/fail_partial_constant.carbon b/toolchain/check/testdata/if_expr/fail_partial_constant.carbon index d20fd2e715dc..0de787624ea8 100644 --- a/toolchain/check/testdata/if_expr/fail_partial_constant.carbon +++ b/toolchain/check/testdata/if_expr/fail_partial_constant.carbon @@ -42,13 +42,13 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: --- fail_non_constant_condition.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Bool = struct_value () [template] -// CHECK:STDOUT: %ConditionIsNonConstant: type = fn_type @ConditionIsNonConstant [template] -// CHECK:STDOUT: %struct.2: ConditionIsNonConstant = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.3: Int32 = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %ConditionIsNonConstant.type: type = fn_type @ConditionIsNonConstant [template] +// CHECK:STDOUT: %ConditionIsNonConstant: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -58,16 +58,16 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: .ConditionIsNonConstant = %ConditionIsNonConstant.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %ConditionIsNonConstant.decl: ConditionIsNonConstant = fn_decl @ConditionIsNonConstant [template = constants.%struct.2] { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %ConditionIsNonConstant.decl: = fn_decl @ConditionIsNonConstant [template = constants.%ConditionIsNonConstant] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc4_30.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc4_30.2: type = converted %bool.make_type, %.loc4_30.1 [template = bool] // CHECK:STDOUT: %b.loc4_27.1: bool = param b // CHECK:STDOUT: @ConditionIsNonConstant.%b: bool = bind_name b, %b.loc4_27.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; @@ -78,13 +78,13 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: if %b.ref br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: -// CHECK:STDOUT: %int.make_type_32.loc12_20: init type = call constants.%struct.3() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12_20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_20.1: type = value_of_initializer %int.make_type_32.loc12_20 [template = i32] // CHECK:STDOUT: %.loc12_20.2: type = converted %int.make_type_32.loc12_20, %.loc12_20.1 [template = i32] // CHECK:STDOUT: br !if.expr.result(%.loc12_20.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: -// CHECK:STDOUT: %int.make_type_32.loc12_29: init type = call constants.%struct.3() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12_29: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_24.1: type = value_of_initializer %int.make_type_32.loc12_29 [template = i32] // CHECK:STDOUT: %.loc12_24.2: type = converted %int.make_type_32.loc12_29, %.loc12_24.1 [template = i32] // CHECK:STDOUT: br !if.expr.result(%.loc12_24.2) @@ -103,12 +103,12 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: --- fail_non_constant_result.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %ChosenBranchIsNonConstant: type = fn_type @ChosenBranchIsNonConstant [template] +// CHECK:STDOUT: %ChosenBranchIsNonConstant.type: type = fn_type @ChosenBranchIsNonConstant [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: ChosenBranchIsNonConstant = struct_value () [template] +// CHECK:STDOUT: %ChosenBranchIsNonConstant: = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal true [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] // CHECK:STDOUT: %.4: bool = bool_literal false [template] // CHECK:STDOUT: } @@ -119,12 +119,12 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: .ChosenBranchIsNonConstant = %ChosenBranchIsNonConstant.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %ChosenBranchIsNonConstant.decl: ChosenBranchIsNonConstant = fn_decl @ChosenBranchIsNonConstant [template = constants.%struct.1] { +// CHECK:STDOUT: %ChosenBranchIsNonConstant.decl: = fn_decl @ChosenBranchIsNonConstant [template = constants.%ChosenBranchIsNonConstant] { // CHECK:STDOUT: %t.loc4_30.1: type = param t // CHECK:STDOUT: @ChosenBranchIsNonConstant.%t: type = bind_name t, %t.loc4_30.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ChosenBranchIsNonConstant(%t: type) { @@ -137,7 +137,7 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: br !if.expr.result.loc9(%t.ref.loc9) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc9: -// CHECK:STDOUT: %int.make_type_32.loc9: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_25.1: type = value_of_initializer %int.make_type_32.loc9 [template = i32] // CHECK:STDOUT: %.loc9_25.2: type = converted %int.make_type_32.loc9, %.loc9_25.1 [template = i32] // CHECK:STDOUT: br !if.expr.result.loc9(%.loc9_25.2) @@ -152,7 +152,7 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: if %.loc13_13 br !if.expr.then.loc13 else br !if.expr.else.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc13: -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_24.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_24.2: type = converted %int.make_type_32.loc13, %.loc13_24.1 [template = i32] // CHECK:STDOUT: br !if.expr.result.loc13(%.loc13_24.2) diff --git a/toolchain/check/testdata/if_expr/nested.carbon b/toolchain/check/testdata/if_expr/nested.carbon index 3a271daa3a2c..1b24d5ebb69b 100644 --- a/toolchain/check/testdata/if_expr/nested.carbon +++ b/toolchain/check/testdata/if_expr/nested.carbon @@ -15,13 +15,13 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: --- nested.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Bool = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.3: F = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: i32 = int_literal 3 [template] @@ -34,27 +34,27 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.3] { -// CHECK:STDOUT: %bool.make_type.loc11_9: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.2: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %bool.make_type.loc11_9: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %bool.make_type.loc11_9 [template = bool] // CHECK:STDOUT: %.loc11_9.2: type = converted %bool.make_type.loc11_9, %.loc11_9.1 [template = bool] // CHECK:STDOUT: %a.loc11_6.1: bool = param a // CHECK:STDOUT: @F.%a: bool = bind_name a, %a.loc11_6.1 -// CHECK:STDOUT: %bool.make_type.loc11_18: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc11_18: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_18.1: type = value_of_initializer %bool.make_type.loc11_18 [template = bool] // CHECK:STDOUT: %.loc11_18.2: type = converted %bool.make_type.loc11_18, %.loc11_18.1 [template = bool] // CHECK:STDOUT: %b.loc11_15.1: bool = param b // CHECK:STDOUT: @F.%b: bool = bind_name b, %b.loc11_15.1 -// CHECK:STDOUT: %bool.make_type.loc11_27: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc11_27: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_27.1: type = value_of_initializer %bool.make_type.loc11_27 [template = bool] // CHECK:STDOUT: %.loc11_27.2: type = converted %bool.make_type.loc11_27, %.loc11_27.1 [template = bool] // CHECK:STDOUT: %c.loc11_24.1: bool = param c // CHECK:STDOUT: @F.%c: bool = bind_name c, %c.loc11_24.1 -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_36.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_36.2: type = converted %int.make_type_32, %.loc11_36.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var diff --git a/toolchain/check/testdata/if_expr/struct.carbon b/toolchain/check/testdata/if_expr/struct.carbon index 06035a1170df..2e7e78536f83 100644 --- a/toolchain/check/testdata/if_expr/struct.carbon +++ b/toolchain/check/testdata/if_expr/struct.carbon @@ -18,20 +18,20 @@ fn F(cond: bool) { // CHECK:STDOUT: --- struct.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.2: G = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.3: Bool = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.4: F = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.3: type = ptr_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: i32 = int_literal 2 [template] -// CHECK:STDOUT: %struct.5: {.a: i32, .b: i32} = struct_value (%.4, %.5) [template] +// CHECK:STDOUT: %struct: {.a: i32, .b: i32} = struct_value (%.4, %.5) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -41,29 +41,29 @@ fn F(cond: bool) { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_32.loc11_14 [template = i32] // CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_32.loc11_14, %.loc11_14.1 [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc11_23: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_23.1: type = value_of_initializer %int.make_type_32.loc11_23 [template = i32] // CHECK:STDOUT: %.loc11_23.2: type = converted %int.make_type_32.loc11_23, %.loc11_23.1 [template = i32] // CHECK:STDOUT: %.loc11_26: type = struct_type {.a: i32, .b: i32} [template = constants.%.2] // CHECK:STDOUT: %s.loc11_6.1: {.a: i32, .b: i32} = param s // CHECK:STDOUT: @G.%s: {.a: i32, .b: i32} = bind_name s, %s.loc11_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.4] { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct.3() [template = bool] +// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc13_12.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc13_12.2: type = converted %bool.make_type, %.loc13_12.1 [template = bool] // CHECK:STDOUT: %cond.loc13_6.1: bool = param cond // CHECK:STDOUT: @F.%cond: bool = bind_name cond, %cond.loc13_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -74,10 +74,10 @@ fn F(cond: bool) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%cond: bool) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32.loc14_15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_15.1: type = value_of_initializer %int.make_type_32.loc14_15 [template = i32] // CHECK:STDOUT: %.loc14_15.2: type = converted %int.make_type_32.loc14_15, %.loc14_15.1 [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc14_24: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_24.1: type = value_of_initializer %int.make_type_32.loc14_24 [template = i32] // CHECK:STDOUT: %.loc14_24.2: type = converted %int.make_type_32.loc14_24, %.loc14_24.1 [template = i32] // CHECK:STDOUT: %.loc14_27: type = struct_type {.a: i32, .b: i32} [template = constants.%.2] @@ -90,10 +90,10 @@ fn F(cond: bool) { // CHECK:STDOUT: %.loc14_46.3: init i32 = initialize_from %.loc14_37 to %.loc14_46.2 [template = constants.%.4] // CHECK:STDOUT: %.loc14_46.4: ref i32 = struct_access %a.var, element1 // CHECK:STDOUT: %.loc14_46.5: init i32 = initialize_from %.loc14_45 to %.loc14_46.4 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_46.6: init {.a: i32, .b: i32} = struct_init (%.loc14_46.3, %.loc14_46.5) to %a.var [template = constants.%struct.5] -// CHECK:STDOUT: %.loc14_47: init {.a: i32, .b: i32} = converted %.loc14_46.1, %.loc14_46.6 [template = constants.%struct.5] +// CHECK:STDOUT: %.loc14_46.6: init {.a: i32, .b: i32} = struct_init (%.loc14_46.3, %.loc14_46.5) to %a.var [template = constants.%struct] +// CHECK:STDOUT: %.loc14_47: init {.a: i32, .b: i32} = converted %.loc14_46.1, %.loc14_46.6 [template = constants.%struct] // CHECK:STDOUT: assign %a.var, %.loc14_47 -// CHECK:STDOUT: %G.ref: G = name_ref G, file.%G.decl [template = constants.%struct.2] +// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %cond.ref: bool = name_ref cond, %cond // CHECK:STDOUT: if %cond.ref br !if.expr.then else br !if.expr.else // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/compound.carbon b/toolchain/check/testdata/impl/compound.carbon index d7e789a0fd1d..92ac2f9ccefb 100644 --- a/toolchain/check/testdata/impl/compound.carbon +++ b/toolchain/check/testdata/impl/compound.carbon @@ -39,31 +39,31 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Simple [template] // CHECK:STDOUT: %Self: Simple = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Simple, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @Simple.%F.decl [template] -// CHECK:STDOUT: %G.1: type = fn_type @G.1 [template] -// CHECK:STDOUT: %struct.2: G = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @Simple, G [template] -// CHECK:STDOUT: %.6: = assoc_entity element1, @Simple.%G.decl [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.3: Int32 = struct_value () [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.4: F = struct_value () [template] -// CHECK:STDOUT: %G.2: type = fn_type @G.2 [template] -// CHECK:STDOUT: %struct.5: G = struct_value () [template] -// CHECK:STDOUT: %.7: = interface_witness (%struct.4, %struct.5) [template] -// CHECK:STDOUT: %NonInstanceCall: type = fn_type @NonInstanceCall [template] -// CHECK:STDOUT: %struct.6: NonInstanceCall = struct_value () [template] -// CHECK:STDOUT: %InstanceCall: type = fn_type @InstanceCall [template] -// CHECK:STDOUT: %struct.7: InstanceCall = struct_value () [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Simple, [template] +// CHECK:STDOUT: %.4: in Simple> = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] +// CHECK:STDOUT: %G.1: = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @Simple, [template] +// CHECK:STDOUT: %.6: in Simple> = assoc_entity element1, @Simple.%G.decl [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] +// CHECK:STDOUT: %G.2: = struct_value () [template] +// CHECK:STDOUT: %.7: = interface_witness (%F.2, %G.2) [template] +// CHECK:STDOUT: %NonInstanceCall.type: type = fn_type @NonInstanceCall [template] +// CHECK:STDOUT: %NonInstanceCall: = struct_value () [template] +// CHECK:STDOUT: %InstanceCall.type: type = fn_type @InstanceCall [template] +// CHECK:STDOUT: %InstanceCall: = struct_value () [template] // CHECK:STDOUT: %.8: type = ptr_type i32 [template] -// CHECK:STDOUT: %NonInstanceCallIndirect: type = fn_type @NonInstanceCallIndirect [template] -// CHECK:STDOUT: %struct.8: NonInstanceCallIndirect = struct_value () [template] -// CHECK:STDOUT: %InstanceCallIndirect: type = fn_type @InstanceCallIndirect [template] -// CHECK:STDOUT: %struct.9: InstanceCallIndirect = struct_value () [template] +// CHECK:STDOUT: %NonInstanceCallIndirect.type: type = fn_type @NonInstanceCallIndirect [template] +// CHECK:STDOUT: %NonInstanceCallIndirect: = struct_value () [template] +// CHECK:STDOUT: %InstanceCallIndirect.type: type = fn_type @InstanceCallIndirect [template] +// CHECK:STDOUT: %InstanceCallIndirect: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -77,42 +77,42 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: impl_decl @impl { -// CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%struct.3() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_6.1: type = value_of_initializer %int.make_type_32.loc16 [template = i32] // CHECK:STDOUT: %.loc16_6.2: type = converted %int.make_type_32.loc16, %.loc16_6.1 [template = i32] // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, %Simple.decl [template = constants.%.1] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %NonInstanceCall.decl: NonInstanceCall = fn_decl @NonInstanceCall [template = constants.%struct.6] { -// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%struct.3() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %NonInstanceCall.decl: = fn_decl @NonInstanceCall [template = constants.%NonInstanceCall] { +// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_23.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_23.2: type = converted %int.make_type_32.loc21, %.loc21_23.1 [template = i32] // CHECK:STDOUT: %n.loc21_20.1: i32 = param n // CHECK:STDOUT: @NonInstanceCall.%n: i32 = bind_name n, %n.loc21_20.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %InstanceCall.decl: InstanceCall = fn_decl @InstanceCall [template = constants.%struct.7] { -// CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%struct.3() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %InstanceCall.decl: = fn_decl @InstanceCall [template = constants.%InstanceCall] { +// CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc25_20.1: type = value_of_initializer %int.make_type_32.loc25 [template = i32] // CHECK:STDOUT: %.loc25_20.2: type = converted %int.make_type_32.loc25, %.loc25_20.1 [template = i32] // CHECK:STDOUT: %n.loc25_17.1: i32 = param n // CHECK:STDOUT: @InstanceCall.%n: i32 = bind_name n, %n.loc25_17.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %NonInstanceCallIndirect.decl: NonInstanceCallIndirect = fn_decl @NonInstanceCallIndirect [template = constants.%struct.8] { -// CHECK:STDOUT: %int.make_type_32.loc29: init type = call constants.%struct.3() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %NonInstanceCallIndirect.decl: = fn_decl @NonInstanceCallIndirect [template = constants.%NonInstanceCallIndirect] { +// CHECK:STDOUT: %int.make_type_32.loc29: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc29_34.1: type = value_of_initializer %int.make_type_32.loc29 [template = i32] // CHECK:STDOUT: %.loc29_34.2: type = converted %int.make_type_32.loc29, %.loc29_34.1 [template = i32] // CHECK:STDOUT: %.loc29_34.3: type = ptr_type i32 [template = constants.%.8] // CHECK:STDOUT: %p.loc29_28.1: i32* = param p // CHECK:STDOUT: @NonInstanceCallIndirect.%p: i32* = bind_name p, %p.loc29_28.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %InstanceCallIndirect.decl: InstanceCallIndirect = fn_decl @InstanceCallIndirect [template = constants.%struct.9] { -// CHECK:STDOUT: %int.make_type_32.loc33: init type = call constants.%struct.3() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %InstanceCallIndirect.decl: = fn_decl @InstanceCallIndirect [template = constants.%InstanceCallIndirect] { +// CHECK:STDOUT: %int.make_type_32.loc33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc33_31.1: type = value_of_initializer %int.make_type_32.loc33 [template = i32] // CHECK:STDOUT: %.loc33_31.2: type = converted %int.make_type_32.loc33, %.loc33_31.1 [template = i32] // CHECK:STDOUT: %.loc33_31.3: type = ptr_type i32 [template = constants.%.8] @@ -123,16 +123,16 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { // CHECK:STDOUT: %Self: Simple = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] {} -// CHECK:STDOUT: %.loc12: = assoc_entity element0, %F.decl [template = constants.%.4] -// CHECK:STDOUT: %G.decl: G = fn_decl @G.1 [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc12: in Simple> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %G.decl: = fn_decl @G.1 [template = constants.%G.1] { // CHECK:STDOUT: %Self.ref: Simple = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc13_14.1: type = facet_type_access %Self.ref [symbolic = constants.%Self] // CHECK:STDOUT: %.loc13_14.2: type = converted %Self.ref, %.loc13_14.1 [symbolic = constants.%Self] // CHECK:STDOUT: %self.loc13_8.1: Self = param self // CHECK:STDOUT: %self.loc13_8.2: Self = bind_name self, %self.loc13_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13_21: = assoc_entity element1, %G.decl [template = constants.%.6] +// CHECK:STDOUT: %.loc13_21: in Simple> = assoc_entity element1, %G.decl [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -142,9 +142,9 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: i32 as Simple { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.4] {} -// CHECK:STDOUT: %G.decl: G = fn_decl @G.2 [template = constants.%struct.5] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.3() [template = i32] +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} +// CHECK:STDOUT: %G.decl: = fn_decl @G.2 [template = constants.%G.2] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc18_14.2: type = converted %int.make_type_32, %.loc18_14.1 [template = i32] // CHECK:STDOUT: %self.loc18_8.1: i32 = param self @@ -172,8 +172,8 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: i32 = name_ref n, %n // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%.1] -// CHECK:STDOUT: %F.ref: = name_ref F, @Simple.%.loc12 [template = constants.%.4] -// CHECK:STDOUT: %.1: F = interface_witness_access @impl.%.1, element0 [template = constants.%struct.4] +// CHECK:STDOUT: %F.ref: in Simple> = name_ref F, @Simple.%.loc12 [template = constants.%.4] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] // CHECK:STDOUT: %F.call: init () = call %.1() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -182,8 +182,8 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: i32 = name_ref n, %n // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%.1] -// CHECK:STDOUT: %G.ref: = name_ref G, @Simple.%.loc13_21 [template = constants.%.6] -// CHECK:STDOUT: %.1: G = interface_witness_access @impl.%.1, element1 [template = constants.%struct.5] +// CHECK:STDOUT: %G.ref: in Simple> = name_ref G, @Simple.%.loc13_21 [template = constants.%.6] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element1 [template = constants.%G.2] // CHECK:STDOUT: %.loc26: = bound_method %n.ref, %.1 // CHECK:STDOUT: %G.call: init () = call %.loc26(%n.ref) // CHECK:STDOUT: return @@ -193,9 +193,9 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: i32* = name_ref p, %p // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%.1] -// CHECK:STDOUT: %F.ref: = name_ref F, @Simple.%.loc12 [template = constants.%.4] +// CHECK:STDOUT: %F.ref: in Simple> = name_ref F, @Simple.%.loc12 [template = constants.%.4] // CHECK:STDOUT: %.loc30: ref i32 = deref %p.ref -// CHECK:STDOUT: %.1: F = interface_witness_access @impl.%.1, element0 [template = constants.%struct.4] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] // CHECK:STDOUT: %F.call: init () = call %.1() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -204,9 +204,9 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: i32* = name_ref p, %p // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%.1] -// CHECK:STDOUT: %G.ref: = name_ref G, @Simple.%.loc13_21 [template = constants.%.6] +// CHECK:STDOUT: %G.ref: in Simple> = name_ref G, @Simple.%.loc13_21 [template = constants.%.6] // CHECK:STDOUT: %.loc34_4.1: ref i32 = deref %p.ref -// CHECK:STDOUT: %.1: G = interface_witness_access @impl.%.1, element1 [template = constants.%struct.5] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element1 [template = constants.%G.2] // CHECK:STDOUT: %.loc34_4.2: = bound_method %.loc34_4.1, %.1 // CHECK:STDOUT: %.loc34_4.3: i32 = bind_value %.loc34_4.1 // CHECK:STDOUT: %G.call: init () = call %.loc34_4.2(%.loc34_4.3) diff --git a/toolchain/check/testdata/impl/declaration.carbon b/toolchain/check/testdata/impl/declaration.carbon index f82006654eb5..5bf41d415c13 100644 --- a/toolchain/check/testdata/impl/declaration.carbon +++ b/toolchain/check/testdata/impl/declaration.carbon @@ -17,9 +17,9 @@ impl i32 as I; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -29,9 +29,9 @@ impl i32 as I; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: impl_decl @impl { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_6.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc13_6.2: type = converted %int.make_type_32, %.loc13_6.1 [template = i32] // CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [template = constants.%.1] diff --git a/toolchain/check/testdata/impl/empty.carbon b/toolchain/check/testdata/impl/empty.carbon index 61c56ce533a1..ca95ca11b8dc 100644 --- a/toolchain/check/testdata/impl/empty.carbon +++ b/toolchain/check/testdata/impl/empty.carbon @@ -19,9 +19,9 @@ impl i32 as Empty { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Empty [template] // CHECK:STDOUT: %Self: Empty = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.3: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -32,9 +32,9 @@ impl i32 as Empty { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: impl_decl @impl { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_6.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_6.2: type = converted %int.make_type_32, %.loc14_6.1 [template = i32] // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, %Empty.decl [template = constants.%.1] diff --git a/toolchain/check/testdata/impl/extend_impl.carbon b/toolchain/check/testdata/impl/extend_impl.carbon index e1b5bd60b9c6..451e723e8b10 100644 --- a/toolchain/check/testdata/impl/extend_impl.carbon +++ b/toolchain/check/testdata/impl/extend_impl.carbon @@ -28,18 +28,18 @@ fn G(c: C) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @HasF [template] // CHECK:STDOUT: %Self: HasF = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @HasF, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @HasF, [template] +// CHECK:STDOUT: %.4: in HasF> = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%struct.2) [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] // CHECK:STDOUT: %.6: type = struct_type {} [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.7: type = ptr_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -53,7 +53,7 @@ fn G(c: C) { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [template = constants.%.1] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %c.loc21_6.1: C = param c // CHECK:STDOUT: @G.%c: C = bind_name c, %c.loc21_6.1 @@ -62,8 +62,8 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { // CHECK:STDOUT: %Self: HasF = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] {} -// CHECK:STDOUT: %.loc12: = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc12: in HasF> = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -72,7 +72,7 @@ fn G(c: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: C as HasF { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.2] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} // CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -100,12 +100,12 @@ fn G(c: C) { // CHECK:STDOUT: fn @G(%c: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %F.ref.loc22: = name_ref F, @HasF.%.loc12 [template = constants.%.4] -// CHECK:STDOUT: %.1: F = interface_witness_access @impl.%.1, element0 [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref.loc22: in HasF> = name_ref F, @HasF.%.loc12 [template = constants.%.4] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] // CHECK:STDOUT: %F.call.loc22: init () = call %.1() // CHECK:STDOUT: %c.ref: C = name_ref c, %c -// CHECK:STDOUT: %F.ref.loc23: = name_ref F, @HasF.%.loc12 [template = constants.%.4] -// CHECK:STDOUT: %.2: F = interface_witness_access @impl.%.1, element0 [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref.loc23: in HasF> = name_ref F, @HasF.%.loc12 [template = constants.%.4] +// CHECK:STDOUT: %.2: = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] // CHECK:STDOUT: %F.call.loc23: init () = call %.2() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/fail_call_invalid.carbon b/toolchain/check/testdata/impl/fail_call_invalid.carbon index 0bd9265edbbd..d6ceaafa9ef0 100644 --- a/toolchain/check/testdata/impl/fail_call_invalid.carbon +++ b/toolchain/check/testdata/impl/fail_call_invalid.carbon @@ -28,17 +28,17 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Simple [template] // CHECK:STDOUT: %Self: Simple = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %G.1: type = fn_type @G.1 [template] +// CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: G = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Simple, G [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @Simple.%G.decl [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %G.2: type = fn_type @G.2 [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] -// CHECK:STDOUT: %InstanceCall: type = fn_type @InstanceCall [template] -// CHECK:STDOUT: %struct.4: InstanceCall = struct_value () [template] +// CHECK:STDOUT: %G.1: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Simple, [template] +// CHECK:STDOUT: %.4: in Simple> = assoc_entity element0, @Simple.%G.decl [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] +// CHECK:STDOUT: %G.2: = struct_value () [template] +// CHECK:STDOUT: %InstanceCall.type: type = fn_type @InstanceCall [template] +// CHECK:STDOUT: %InstanceCall: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -49,16 +49,16 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: impl_decl @impl { -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_6.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_6.2: type = converted %int.make_type_32.loc15, %.loc15_6.1 [template = i32] // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, %Simple.decl [template = constants.%.1] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %InstanceCall.decl: InstanceCall = fn_decl @InstanceCall [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %InstanceCall.decl: = fn_decl @InstanceCall [template = constants.%InstanceCall] { +// CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_20.1: type = value_of_initializer %int.make_type_32.loc22 [template = i32] // CHECK:STDOUT: %.loc22_20.2: type = converted %int.make_type_32.loc22, %.loc22_20.1 [template = i32] // CHECK:STDOUT: %n.loc22_17.1: i32 = param n @@ -68,14 +68,14 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { // CHECK:STDOUT: %Self: Simple = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %G.decl: G = fn_decl @G.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %G.decl: = fn_decl @G.1 [template = constants.%G.1] { // CHECK:STDOUT: %Self.ref: Simple = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc12_14.1: type = facet_type_access %Self.ref [symbolic = constants.%Self] // CHECK:STDOUT: %.loc12_14.2: type = converted %Self.ref, %.loc12_14.1 [symbolic = constants.%Self] // CHECK:STDOUT: %self.loc12_8.1: Self = param self // CHECK:STDOUT: %self.loc12_8.2: Self = bind_name self, %self.loc12_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12_21: = assoc_entity element0, %G.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12_21: in Simple> = assoc_entity element0, %G.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -84,7 +84,7 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: i32 as Simple { -// CHECK:STDOUT: %G.decl: G = fn_decl @G.2 [template = constants.%struct.3] { +// CHECK:STDOUT: %G.decl: = fn_decl @G.2 [template = constants.%G.2] { // CHECK:STDOUT: %Undeclared.ref: = name_ref Undeclared, [template = ] // CHECK:STDOUT: %self.loc19_8.1: = param self // CHECK:STDOUT: %self.loc19_8.2: = bind_name self, %self.loc19_8.1 @@ -106,8 +106,8 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: i32 = name_ref n, %n // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%.1] -// CHECK:STDOUT: %G.ref: = name_ref G, @Simple.%.loc12_21 [template = constants.%.4] -// CHECK:STDOUT: %.1: G = interface_witness_access @impl.%.1, element0 [template = ] +// CHECK:STDOUT: %G.ref: in Simple> = name_ref G, @Simple.%.loc12_21 [template = constants.%.4] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = ] // CHECK:STDOUT: %.loc23: = bound_method %n.ref, %.1 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon index 1b6f2cea3126..0320d7b29a37 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon @@ -35,14 +35,14 @@ class C { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %.1: type = interface_type @GenericInterface [template] // CHECK:STDOUT: %Self: GenericInterface = bind_symbolic_name Self 1 [symbolic] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @GenericInterface, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @GenericInterface.%F.decl [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @GenericInterface, [template] +// CHECK:STDOUT: %.4: in GenericInterface> = assoc_entity element0, @GenericInterface.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] // CHECK:STDOUT: %.5: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -62,12 +62,12 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: interface @GenericInterface { // CHECK:STDOUT: %Self: GenericInterface = bind_symbolic_name Self 1 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %T.ref: type = name_ref T, file.%T.loc11_28.2 [symbolic = constants.%T] // CHECK:STDOUT: %x.loc12_8.1: T = param x // CHECK:STDOUT: %x.loc12_8.2: T = bind_name x, %x.loc12_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12: in GenericInterface> = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -76,7 +76,7 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: C as { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %T.ref: type = name_ref T, @C.%T.loc27_23.2 [symbolic = constants.%T] // CHECK:STDOUT: %x.loc28_10.1: T = param x // CHECK:STDOUT: %x.loc28_10.2: T = bind_name x, %x.loc28_10.1 diff --git a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon index 5ada8e738ffc..815891e319f3 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon @@ -20,9 +20,9 @@ extend impl i32 as I {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.3: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -33,9 +33,9 @@ extend impl i32 as I {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: impl_decl @impl { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc16_13.2: type = converted %int.make_type_32, %.loc16_13.1 [template = i32] // CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [template = constants.%.1] diff --git a/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon b/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon index faf499e3fbc5..fef9cbeec22e 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon @@ -45,9 +45,9 @@ class E { // CHECK:STDOUT: %.1: type = interface_type @I [template] // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.3: = interface_witness () [template] // CHECK:STDOUT: %.4: type = struct_type {} [template] // CHECK:STDOUT: %D: type = class_type @D [template] @@ -65,7 +65,7 @@ class E { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} // CHECK:STDOUT: %E.decl: type = class_decl @E [template = constants.%E] {} // CHECK:STDOUT: } @@ -96,7 +96,7 @@ class E { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: impl_decl @impl.1 { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_15.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc18_15.2: type = converted %int.make_type_32, %.loc18_15.1 [template = i32] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] diff --git a/toolchain/check/testdata/impl/fail_extend_non_interface.carbon b/toolchain/check/testdata/impl/fail_extend_non_interface.carbon index 5a6d3d44f79e..e91a6d0e86f8 100644 --- a/toolchain/check/testdata/impl/fail_extend_non_interface.carbon +++ b/toolchain/check/testdata/impl/fail_extend_non_interface.carbon @@ -19,9 +19,9 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -32,7 +32,7 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: C as i32; @@ -41,7 +41,7 @@ class C { // CHECK:STDOUT: %.loc15_18.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc15_18.2: type = converted %int.make_type_32, %.loc15_18.1 [template = i32] // CHECK:STDOUT: impl_decl @impl { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: diff --git a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon index 3f8a2a6e0831..058a7cbaa9a5 100644 --- a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon +++ b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon @@ -24,14 +24,14 @@ impl as Simple { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Simple [template] // CHECK:STDOUT: %Self: Simple = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Simple, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @Simple.%F.decl [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%struct.2) [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Simple, [template] +// CHECK:STDOUT: %.4: in Simple> = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -48,8 +48,8 @@ impl as Simple { // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { // CHECK:STDOUT: %Self: Simple = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] {} -// CHECK:STDOUT: %.loc12: = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc12: in Simple> = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -58,7 +58,7 @@ impl as Simple { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: as Simple { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.2] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} // CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: diff --git a/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon b/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon index 0425c0f9eaaf..645c88150ce2 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon @@ -22,9 +22,9 @@ impl bool as I {} // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.2: type = assoc_entity_type @I, type [template] // CHECK:STDOUT: %.3: = assoc_entity element0, @I.%T [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.4: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Bool = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -34,9 +34,9 @@ impl bool as I {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref: = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: impl_decl @impl { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct() [template = bool] +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_6.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc16_6.2: type = converted %bool.make_type, %.loc16_6.1 [template = bool] // CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [template = constants.%.1] diff --git a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon index ccd474441f99..dc72e46b20e5 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon @@ -218,85 +218,85 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] // CHECK:STDOUT: %Self.1: I = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @I, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @I, [template] +// CHECK:STDOUT: %.4: in I> = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %NoF: type = class_type @NoF [template] // CHECK:STDOUT: %.5: type = struct_type {} [template] // CHECK:STDOUT: %FNotFunction: type = class_type @FNotFunction [template] // CHECK:STDOUT: %F.2: type = class_type @F.16 [template] -// CHECK:STDOUT: %PossiblyF: type = fn_type @PossiblyF [template] -// CHECK:STDOUT: %struct.2: PossiblyF = struct_value () [template] +// CHECK:STDOUT: %PossiblyF.type: type = fn_type @PossiblyF [template] +// CHECK:STDOUT: %PossiblyF: = struct_value () [template] // CHECK:STDOUT: %FAlias: type = class_type @FAlias [template] // CHECK:STDOUT: %FExtraParam: type = class_type @FExtraParam [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.3: Bool = struct_value () [template] -// CHECK:STDOUT: %F.3: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.4: F = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.3: = struct_value () [template] // CHECK:STDOUT: %FExtraImplicitParam: type = class_type @FExtraImplicitParam [template] -// CHECK:STDOUT: %F.4: type = fn_type @F.3 [template] -// CHECK:STDOUT: %struct.5: F = struct_value () [template] +// CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] +// CHECK:STDOUT: %F.4: = struct_value () [template] // CHECK:STDOUT: %FExtraReturnType: type = class_type @FExtraReturnType [template] -// CHECK:STDOUT: %F.5: type = fn_type @F.4 [template] -// CHECK:STDOUT: %struct.6: F = struct_value () [template] +// CHECK:STDOUT: %F.type.4: type = fn_type @F.4 [template] +// CHECK:STDOUT: %F.5: = struct_value () [template] // CHECK:STDOUT: %.6: type = interface_type @J [template] // CHECK:STDOUT: %Self.2: J = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F.6: type = fn_type @F.5 [template] -// CHECK:STDOUT: %struct.7: F = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type @J, F [template] -// CHECK:STDOUT: %.8: = assoc_entity element0, @J.%F.decl [template] +// CHECK:STDOUT: %F.type.5: type = fn_type @F.5 [template] +// CHECK:STDOUT: %F.6: = struct_value () [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type @J, [template] +// CHECK:STDOUT: %.8: in J> = assoc_entity element0, @J.%F.decl [template] // CHECK:STDOUT: %FMissingParam: type = class_type @FMissingParam [template] -// CHECK:STDOUT: %F.7: type = fn_type @F.6 [template] -// CHECK:STDOUT: %struct.8: F = struct_value () [template] +// CHECK:STDOUT: %F.type.6: type = fn_type @F.6 [template] +// CHECK:STDOUT: %F.7: = struct_value () [template] // CHECK:STDOUT: %FMissingImplicitParam: type = class_type @FMissingImplicitParam [template] -// CHECK:STDOUT: %F.8: type = fn_type @F.7 [template] -// CHECK:STDOUT: %struct.9: F = struct_value () [template] +// CHECK:STDOUT: %F.type.7: type = fn_type @F.7 [template] +// CHECK:STDOUT: %F.8: = struct_value () [template] // CHECK:STDOUT: %FMissingReturnType: type = class_type @FMissingReturnType [template] -// CHECK:STDOUT: %F.9: type = fn_type @F.8 [template] -// CHECK:STDOUT: %struct.10: F = struct_value () [template] +// CHECK:STDOUT: %F.type.8: type = fn_type @F.8 [template] +// CHECK:STDOUT: %F.9: = struct_value () [template] // CHECK:STDOUT: %FDifferentParamType: type = class_type @FDifferentParamType [template] -// CHECK:STDOUT: %F.10: type = fn_type @F.9 [template] -// CHECK:STDOUT: %struct.11: F = struct_value () [template] +// CHECK:STDOUT: %F.type.9: type = fn_type @F.9 [template] +// CHECK:STDOUT: %F.10: = struct_value () [template] // CHECK:STDOUT: %FDifferentImplicitParamType: type = class_type @FDifferentImplicitParamType [template] -// CHECK:STDOUT: %F.11: type = fn_type @F.10 [template] -// CHECK:STDOUT: %struct.12: F = struct_value () [template] +// CHECK:STDOUT: %F.type.10: type = fn_type @F.10 [template] +// CHECK:STDOUT: %F.11: = struct_value () [template] // CHECK:STDOUT: %FDifferentReturnType: type = class_type @FDifferentReturnType [template] -// CHECK:STDOUT: %F.12: type = fn_type @F.11 [template] -// CHECK:STDOUT: %struct.13: F = struct_value () [template] +// CHECK:STDOUT: %F.type.11: type = fn_type @F.11 [template] +// CHECK:STDOUT: %F.12: = struct_value () [template] // CHECK:STDOUT: %FDifferentParamName: type = class_type @FDifferentParamName [template] -// CHECK:STDOUT: %F.13: type = fn_type @F.12 [template] -// CHECK:STDOUT: %struct.14: F = struct_value () [template] +// CHECK:STDOUT: %F.type.12: type = fn_type @F.12 [template] +// CHECK:STDOUT: %F.13: = struct_value () [template] // CHECK:STDOUT: %.9: type = interface_type @SelfNested [template] // CHECK:STDOUT: %Self.3: SelfNested = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.10: type = ptr_type Self [symbolic] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.15: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.11: type = struct_type {.x: Self, .y: i32} [symbolic] // CHECK:STDOUT: %.12: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.13: type = tuple_type (Self*, {.x: Self, .y: i32}) [symbolic] // CHECK:STDOUT: %.14: i32 = int_literal 4 [template] // CHECK:STDOUT: %.15: type = array_type %.14, Self [symbolic] -// CHECK:STDOUT: %F.14: type = fn_type @F.13 [template] -// CHECK:STDOUT: %struct.16: F = struct_value () [template] -// CHECK:STDOUT: %.16: type = assoc_entity_type @SelfNested, F [template] -// CHECK:STDOUT: %.17: = assoc_entity element0, @SelfNested.%F.decl [template] +// CHECK:STDOUT: %F.type.13: type = fn_type @F.13 [template] +// CHECK:STDOUT: %F.14: = struct_value () [template] +// CHECK:STDOUT: %.16: type = assoc_entity_type @SelfNested, [template] +// CHECK:STDOUT: %.17: in SelfNested> = assoc_entity element0, @SelfNested.%F.decl [template] // CHECK:STDOUT: %SelfNestedBadParam: type = class_type @SelfNestedBadParam [template] // CHECK:STDOUT: %.18: type = ptr_type SelfNestedBadParam [template] // CHECK:STDOUT: %.19: type = struct_type {.x: i32, .y: i32} [template] // CHECK:STDOUT: %.20: type = tuple_type (SelfNestedBadParam*, {.x: i32, .y: i32}) [template] // CHECK:STDOUT: %.21: type = array_type %.14, SelfNestedBadParam [template] -// CHECK:STDOUT: %F.15: type = fn_type @F.14 [template] -// CHECK:STDOUT: %struct.17: F = struct_value () [template] +// CHECK:STDOUT: %F.type.14: type = fn_type @F.14 [template] +// CHECK:STDOUT: %F.15: = struct_value () [template] // CHECK:STDOUT: %.22: type = struct_type {.x: SelfNestedBadParam, .y: i32} [template] // CHECK:STDOUT: %.23: type = tuple_type (SelfNestedBadParam*, {.x: SelfNestedBadParam, .y: i32}) [template] // CHECK:STDOUT: %SelfNestedBadReturnType: type = class_type @SelfNestedBadReturnType [template] // CHECK:STDOUT: %.24: type = ptr_type SelfNestedBadReturnType [template] // CHECK:STDOUT: %.25: type = struct_type {.x: SelfNestedBadReturnType, .y: i32} [template] // CHECK:STDOUT: %.26: type = tuple_type (SelfNestedBadReturnType*, {.x: SelfNestedBadReturnType, .y: i32}) [template] -// CHECK:STDOUT: %F.16: type = fn_type @F.15 [template] -// CHECK:STDOUT: %struct.18: F = struct_value () [template] +// CHECK:STDOUT: %F.type.15: type = fn_type @F.15 [template] +// CHECK:STDOUT: %F.16: = struct_value () [template] // CHECK:STDOUT: %.27: type = array_type %.14, SelfNestedBadReturnType [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -327,52 +327,52 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} // CHECK:STDOUT: %NoF.decl: type = class_decl @NoF [template = constants.%NoF] {} // CHECK:STDOUT: %FNotFunction.decl: type = class_decl @FNotFunction [template = constants.%FNotFunction] {} -// CHECK:STDOUT: %PossiblyF.decl: PossiblyF = fn_decl @PossiblyF [template = constants.%struct.2] {} +// CHECK:STDOUT: %PossiblyF.decl: = fn_decl @PossiblyF [template = constants.%PossiblyF] {} // CHECK:STDOUT: %FAlias.decl: type = class_decl @FAlias [template = constants.%FAlias] {} // CHECK:STDOUT: %FExtraParam.decl: type = class_decl @FExtraParam [template = constants.%FExtraParam] {} -// CHECK:STDOUT: %import_ref.1: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %FExtraImplicitParam.decl: type = class_decl @FExtraImplicitParam [template = constants.%FExtraImplicitParam] {} // CHECK:STDOUT: %FExtraReturnType.decl: type = class_decl @FExtraReturnType [template = constants.%FExtraReturnType] {} -// CHECK:STDOUT: %import_ref.2: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.2: = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %J.decl: type = interface_decl @J [template = constants.%.6] {} -// CHECK:STDOUT: %import_ref.3: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %import_ref.4: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %import_ref.5: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.4: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.5: = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %FMissingParam.decl: type = class_decl @FMissingParam [template = constants.%FMissingParam] {} -// CHECK:STDOUT: %import_ref.6: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %import_ref.7: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.6: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.7: = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %FMissingImplicitParam.decl: type = class_decl @FMissingImplicitParam [template = constants.%FMissingImplicitParam] {} -// CHECK:STDOUT: %import_ref.8: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %import_ref.9: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.9: = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %FMissingReturnType.decl: type = class_decl @FMissingReturnType [template = constants.%FMissingReturnType] {} -// CHECK:STDOUT: %import_ref.10: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %import_ref.11: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.10: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.11: = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %FDifferentParamType.decl: type = class_decl @FDifferentParamType [template = constants.%FDifferentParamType] {} -// CHECK:STDOUT: %import_ref.12: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %import_ref.13: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.12: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.13: = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %FDifferentImplicitParamType.decl: type = class_decl @FDifferentImplicitParamType [template = constants.%FDifferentImplicitParamType] {} -// CHECK:STDOUT: %import_ref.14: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %import_ref.15: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.14: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.15: = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %FDifferentReturnType.decl: type = class_decl @FDifferentReturnType [template = constants.%FDifferentReturnType] {} -// CHECK:STDOUT: %import_ref.16: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %import_ref.17: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.16: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.17: = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %FDifferentParamName.decl: type = class_decl @FDifferentParamName [template = constants.%FDifferentParamName] {} -// CHECK:STDOUT: %import_ref.18: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %import_ref.19: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %import_ref.20: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.18: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.19: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.20: = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: %SelfNested.decl: type = interface_decl @SelfNested [template = constants.%.9] {} -// CHECK:STDOUT: %import_ref.21: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.15] +// CHECK:STDOUT: %import_ref.21: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %SelfNestedBadParam.decl: type = class_decl @SelfNestedBadParam [template = constants.%SelfNestedBadParam] {} -// CHECK:STDOUT: %import_ref.22: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.15] -// CHECK:STDOUT: %import_ref.23: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.15] +// CHECK:STDOUT: %import_ref.22: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.23: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %SelfNestedBadReturnType.decl: type = class_decl @SelfNestedBadReturnType [template = constants.%SelfNestedBadReturnType] {} -// CHECK:STDOUT: %import_ref.24: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.15] +// CHECK:STDOUT: %import_ref.24: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] {} -// CHECK:STDOUT: %.loc11: = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc11: in I> = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -382,23 +382,23 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: interface @J { // CHECK:STDOUT: %Self: J = bind_symbolic_name Self 0 [symbolic = constants.%Self.2] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.5 [template = constants.%struct.7] { -// CHECK:STDOUT: %bool.make_type.loc93_26: init type = call constants.%struct.3() [template = bool] +// CHECK:STDOUT: %F.decl: = fn_decl @F.5 [template = constants.%F.6] { +// CHECK:STDOUT: %bool.make_type.loc93_26: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc93_26.1: type = value_of_initializer %bool.make_type.loc93_26 [template = bool] // CHECK:STDOUT: %.loc93_26.2: type = converted %bool.make_type.loc93_26, %.loc93_26.1 [template = bool] // CHECK:STDOUT: %self.loc93_20.1: bool = param self // CHECK:STDOUT: %self.loc93_20.2: bool = bind_name self, %self.loc93_20.1 -// CHECK:STDOUT: %bool.make_type.loc93_35: init type = call constants.%struct.3() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc93_35: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc93_35.1: type = value_of_initializer %bool.make_type.loc93_35 [template = bool] // CHECK:STDOUT: %.loc93_35.2: type = converted %bool.make_type.loc93_35, %.loc93_35.1 [template = bool] // CHECK:STDOUT: %b.loc93_32.1: bool = param b // CHECK:STDOUT: %b.loc93_32.2: bool = bind_name b, %b.loc93_32.1 -// CHECK:STDOUT: %bool.make_type.loc93_44: init type = call constants.%struct.3() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc93_44: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc93_44.1: type = value_of_initializer %bool.make_type.loc93_44 [template = bool] // CHECK:STDOUT: %.loc93_44.2: type = converted %bool.make_type.loc93_44, %.loc93_44.1 [template = bool] // CHECK:STDOUT: %return.var: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc93_48: = assoc_entity element0, %F.decl [template = constants.%.8] +// CHECK:STDOUT: %.loc93_48: in J> = assoc_entity element0, %F.decl [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -408,7 +408,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: interface @SelfNested { // CHECK:STDOUT: %Self: SelfNested = bind_symbolic_name Self 0 [symbolic = constants.%Self.3] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.13 [template = constants.%struct.16] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.13 [template = constants.%F.14] { // CHECK:STDOUT: %Self.ref.loc188_12: SelfNested = name_ref Self, %Self [symbolic = constants.%Self.3] // CHECK:STDOUT: %.loc188_16.1: type = facet_type_access %Self.ref.loc188_12 [symbolic = constants.%Self.3] // CHECK:STDOUT: %.loc188_16.2: type = converted %Self.ref.loc188_12, %.loc188_16.1 [symbolic = constants.%Self.3] @@ -416,7 +416,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref.loc188_24: SelfNested = name_ref Self, %Self [symbolic = constants.%Self.3] // CHECK:STDOUT: %.loc188_24.1: type = facet_type_access %Self.ref.loc188_24 [symbolic = constants.%Self.3] // CHECK:STDOUT: %.loc188_24.2: type = converted %Self.ref.loc188_24, %.loc188_24.1 [symbolic = constants.%Self.3] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.15() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc188_34.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc188_34.2: type = converted %int.make_type_32, %.loc188_34.1 [template = i32] // CHECK:STDOUT: %.loc188_37: type = struct_type {.x: Self, .y: i32} [symbolic = constants.%.11] @@ -431,7 +431,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %.loc188_52: type = array_type %.loc188_51, Self [symbolic = constants.%.15] // CHECK:STDOUT: %return.var: ref [Self; 4] = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc188_53: = assoc_entity element0, %F.decl [template = constants.%.17] +// CHECK:STDOUT: %.loc188_53: in SelfNested> = assoc_entity element0, %F.decl [template = constants.%.17] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -456,8 +456,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.3: FAlias as I { -// CHECK:STDOUT: %PossiblyF.ref: PossiblyF = name_ref PossiblyF, file.%PossiblyF.decl [template = constants.%struct.2] -// CHECK:STDOUT: %F: PossiblyF = bind_alias F, file.%PossiblyF.decl [template = constants.%struct.2] +// CHECK:STDOUT: %PossiblyF.ref: = name_ref PossiblyF, file.%PossiblyF.decl [template = constants.%PossiblyF] +// CHECK:STDOUT: %F: = bind_alias F, file.%PossiblyF.decl [template = constants.%PossiblyF] // CHECK:STDOUT: %.1: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -466,8 +466,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.4: FExtraParam as I { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.4] { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct.3() [template = bool] +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.3] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc62_13.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc62_13.2: type = converted %bool.make_type, %.loc62_13.1 [template = bool] // CHECK:STDOUT: %b.loc62_10.1: bool = param b @@ -481,7 +481,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.5: FExtraImplicitParam as I { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.3 [template = constants.%struct.5] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.3 [template = constants.%F.4] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraImplicitParam [template = constants.%FExtraImplicitParam] // CHECK:STDOUT: %self.loc75_10.1: FExtraImplicitParam = param self // CHECK:STDOUT: %self.loc75_10.2: FExtraImplicitParam = bind_name self, %self.loc75_10.1 @@ -494,8 +494,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.6: FExtraReturnType as I { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.4 [template = constants.%struct.6] { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct.3() [template = bool] +// CHECK:STDOUT: %F.decl: = fn_decl @F.4 [template = constants.%F.5] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc89_15.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc89_15.2: type = converted %bool.make_type, %.loc89_15.1 [template = bool] // CHECK:STDOUT: %return.var: ref bool = var @@ -508,13 +508,13 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.7: FMissingParam as J { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.6 [template = constants.%struct.8] { -// CHECK:STDOUT: %bool.make_type.loc104_16: init type = call constants.%struct.3() [template = bool] +// CHECK:STDOUT: %F.decl: = fn_decl @F.6 [template = constants.%F.7] { +// CHECK:STDOUT: %bool.make_type.loc104_16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc104_16.1: type = value_of_initializer %bool.make_type.loc104_16 [template = bool] // CHECK:STDOUT: %.loc104_16.2: type = converted %bool.make_type.loc104_16, %.loc104_16.1 [template = bool] // CHECK:STDOUT: %self.loc104_10.1: bool = param self // CHECK:STDOUT: %self.loc104_10.2: bool = bind_name self, %self.loc104_10.1 -// CHECK:STDOUT: %bool.make_type.loc104_27: init type = call constants.%struct.3() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc104_27: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc104_27.1: type = value_of_initializer %bool.make_type.loc104_27 [template = bool] // CHECK:STDOUT: %.loc104_27.2: type = converted %bool.make_type.loc104_27, %.loc104_27.1 [template = bool] // CHECK:STDOUT: %return.var: ref bool = var @@ -527,13 +527,13 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.8: FMissingImplicitParam as J { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.7 [template = constants.%struct.9] { -// CHECK:STDOUT: %bool.make_type.loc117_13: init type = call constants.%struct.3() [template = bool] +// CHECK:STDOUT: %F.decl: = fn_decl @F.7 [template = constants.%F.8] { +// CHECK:STDOUT: %bool.make_type.loc117_13: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc117_13.1: type = value_of_initializer %bool.make_type.loc117_13 [template = bool] // CHECK:STDOUT: %.loc117_13.2: type = converted %bool.make_type.loc117_13, %.loc117_13.1 [template = bool] // CHECK:STDOUT: %b.loc117_10.1: bool = param b // CHECK:STDOUT: %b.loc117_10.2: bool = bind_name b, %b.loc117_10.1 -// CHECK:STDOUT: %bool.make_type.loc117_22: init type = call constants.%struct.3() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc117_22: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc117_22.1: type = value_of_initializer %bool.make_type.loc117_22 [template = bool] // CHECK:STDOUT: %.loc117_22.2: type = converted %bool.make_type.loc117_22, %.loc117_22.1 [template = bool] // CHECK:STDOUT: %return.var: ref bool = var @@ -546,13 +546,13 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.9: FMissingReturnType as J { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.8 [template = constants.%struct.10] { -// CHECK:STDOUT: %bool.make_type.loc130_16: init type = call constants.%struct.3() [template = bool] +// CHECK:STDOUT: %F.decl: = fn_decl @F.8 [template = constants.%F.9] { +// CHECK:STDOUT: %bool.make_type.loc130_16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc130_16.1: type = value_of_initializer %bool.make_type.loc130_16 [template = bool] // CHECK:STDOUT: %.loc130_16.2: type = converted %bool.make_type.loc130_16, %.loc130_16.1 [template = bool] // CHECK:STDOUT: %self.loc130_10.1: bool = param self // CHECK:STDOUT: %self.loc130_10.2: bool = bind_name self, %self.loc130_10.1 -// CHECK:STDOUT: %bool.make_type.loc130_25: init type = call constants.%struct.3() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc130_25: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc130_25.1: type = value_of_initializer %bool.make_type.loc130_25 [template = bool] // CHECK:STDOUT: %.loc130_25.2: type = converted %bool.make_type.loc130_25, %.loc130_25.1 [template = bool] // CHECK:STDOUT: %b.loc130_22.1: bool = param b @@ -566,8 +566,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.10: FDifferentParamType as J { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.9 [template = constants.%struct.11] { -// CHECK:STDOUT: %bool.make_type.loc143_16: init type = call constants.%struct.3() [template = bool] +// CHECK:STDOUT: %F.decl: = fn_decl @F.9 [template = constants.%F.10] { +// CHECK:STDOUT: %bool.make_type.loc143_16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc143_16.1: type = value_of_initializer %bool.make_type.loc143_16 [template = bool] // CHECK:STDOUT: %.loc143_16.2: type = converted %bool.make_type.loc143_16, %.loc143_16.1 [template = bool] // CHECK:STDOUT: %self.loc143_10.1: bool = param self @@ -575,7 +575,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentParamType [template = constants.%FDifferentParamType] // CHECK:STDOUT: %b.loc143_22.1: FDifferentParamType = param b // CHECK:STDOUT: %b.loc143_22.2: FDifferentParamType = bind_name b, %b.loc143_22.1 -// CHECK:STDOUT: %bool.make_type.loc143_34: init type = call constants.%struct.3() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc143_34: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc143_34.1: type = value_of_initializer %bool.make_type.loc143_34 [template = bool] // CHECK:STDOUT: %.loc143_34.2: type = converted %bool.make_type.loc143_34, %.loc143_34.1 [template = bool] // CHECK:STDOUT: %return.var: ref bool = var @@ -588,16 +588,16 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.11: FDifferentImplicitParamType as J { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.10 [template = constants.%struct.12] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.10 [template = constants.%F.11] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentImplicitParamType [template = constants.%FDifferentImplicitParamType] // CHECK:STDOUT: %self.loc156_10.1: FDifferentImplicitParamType = param self // CHECK:STDOUT: %self.loc156_10.2: FDifferentImplicitParamType = bind_name self, %self.loc156_10.1 -// CHECK:STDOUT: %bool.make_type.loc156_25: init type = call constants.%struct.3() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc156_25: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc156_25.1: type = value_of_initializer %bool.make_type.loc156_25 [template = bool] // CHECK:STDOUT: %.loc156_25.2: type = converted %bool.make_type.loc156_25, %.loc156_25.1 [template = bool] // CHECK:STDOUT: %b.loc156_22.1: bool = param b // CHECK:STDOUT: %b.loc156_22.2: bool = bind_name b, %b.loc156_22.1 -// CHECK:STDOUT: %bool.make_type.loc156_34: init type = call constants.%struct.3() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc156_34: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc156_34.1: type = value_of_initializer %bool.make_type.loc156_34 [template = bool] // CHECK:STDOUT: %.loc156_34.2: type = converted %bool.make_type.loc156_34, %.loc156_34.1 [template = bool] // CHECK:STDOUT: %return.var: ref bool = var @@ -610,13 +610,13 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.12: FDifferentReturnType as J { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.11 [template = constants.%struct.13] { -// CHECK:STDOUT: %bool.make_type.loc169_16: init type = call constants.%struct.3() [template = bool] +// CHECK:STDOUT: %F.decl: = fn_decl @F.11 [template = constants.%F.12] { +// CHECK:STDOUT: %bool.make_type.loc169_16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc169_16.1: type = value_of_initializer %bool.make_type.loc169_16 [template = bool] // CHECK:STDOUT: %.loc169_16.2: type = converted %bool.make_type.loc169_16, %.loc169_16.1 [template = bool] // CHECK:STDOUT: %self.loc169_10.1: bool = param self // CHECK:STDOUT: %self.loc169_10.2: bool = bind_name self, %self.loc169_10.1 -// CHECK:STDOUT: %bool.make_type.loc169_25: init type = call constants.%struct.3() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc169_25: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc169_25.1: type = value_of_initializer %bool.make_type.loc169_25 [template = bool] // CHECK:STDOUT: %.loc169_25.2: type = converted %bool.make_type.loc169_25, %.loc169_25.1 [template = bool] // CHECK:STDOUT: %b.loc169_22.1: bool = param b @@ -632,18 +632,18 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.13: FDifferentParamName as J { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.12 [template = constants.%struct.14] { -// CHECK:STDOUT: %bool.make_type.loc183_16: init type = call constants.%struct.3() [template = bool] +// CHECK:STDOUT: %F.decl: = fn_decl @F.12 [template = constants.%F.13] { +// CHECK:STDOUT: %bool.make_type.loc183_16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc183_16.1: type = value_of_initializer %bool.make_type.loc183_16 [template = bool] // CHECK:STDOUT: %.loc183_16.2: type = converted %bool.make_type.loc183_16, %.loc183_16.1 [template = bool] // CHECK:STDOUT: %self.loc183_10.1: bool = param self // CHECK:STDOUT: %self.loc183_10.2: bool = bind_name self, %self.loc183_10.1 -// CHECK:STDOUT: %bool.make_type.loc183_29: init type = call constants.%struct.3() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc183_29: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc183_29.1: type = value_of_initializer %bool.make_type.loc183_29 [template = bool] // CHECK:STDOUT: %.loc183_29.2: type = converted %bool.make_type.loc183_29, %.loc183_29.1 [template = bool] // CHECK:STDOUT: %not_b.loc183_22.1: bool = param not_b // CHECK:STDOUT: %not_b.loc183_22.2: bool = bind_name not_b, %not_b.loc183_22.1 -// CHECK:STDOUT: %bool.make_type.loc183_38: init type = call constants.%struct.3() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc183_38: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc183_38.1: type = value_of_initializer %bool.make_type.loc183_38 [template = bool] // CHECK:STDOUT: %.loc183_38.2: type = converted %bool.make_type.loc183_38, %.loc183_38.1 [template = bool] // CHECK:STDOUT: %return.var: ref bool = var @@ -656,13 +656,13 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.14: SelfNestedBadParam as SelfNested { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.14 [template = constants.%struct.17] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.14 [template = constants.%F.15] { // CHECK:STDOUT: %SelfNestedBadParam.ref.loc200_14: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [template = constants.%SelfNestedBadParam] // CHECK:STDOUT: %.loc200_32: type = ptr_type SelfNestedBadParam [template = constants.%.18] -// CHECK:STDOUT: %int.make_type_32.loc200_40: init type = call constants.%struct.15() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc200_40: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc200_40.1: type = value_of_initializer %int.make_type_32.loc200_40 [template = i32] // CHECK:STDOUT: %.loc200_40.2: type = converted %int.make_type_32.loc200_40, %.loc200_40.1 [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc200_49: init type = call constants.%struct.15() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc200_49: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc200_49.1: type = value_of_initializer %int.make_type_32.loc200_49 [template = i32] // CHECK:STDOUT: %.loc200_49.2: type = converted %int.make_type_32.loc200_49, %.loc200_49.1 [template = i32] // CHECK:STDOUT: %.loc200_52: type = struct_type {.x: i32, .y: i32} [template = constants.%.19] @@ -683,11 +683,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.15: SelfNestedBadReturnType as SelfNested { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.15 [template = constants.%struct.18] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.15 [template = constants.%F.16] { // CHECK:STDOUT: %SelfNestedBadReturnType.ref.loc212_14: type = name_ref SelfNestedBadReturnType, file.%SelfNestedBadReturnType.decl [template = constants.%SelfNestedBadReturnType] // CHECK:STDOUT: %.loc212_37: type = ptr_type SelfNestedBadReturnType [template = constants.%.24] // CHECK:STDOUT: %SelfNestedBadReturnType.ref.loc212_45: type = name_ref SelfNestedBadReturnType, file.%SelfNestedBadReturnType.decl [template = constants.%SelfNestedBadReturnType] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.15() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc212_74.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc212_74.2: type = converted %int.make_type_32, %.loc212_74.1 [template = i32] // CHECK:STDOUT: %.loc212_77: type = struct_type {.x: SelfNestedBadReturnType, .y: i32} [template = constants.%.25] diff --git a/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon b/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon index ff45a635d06d..daeaf2488177 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon @@ -20,9 +20,9 @@ impl i32 as false {} // CHECK:STDOUT: --- fail_impl_bad_interface.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal false [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -31,9 +31,9 @@ impl i32 as false {} // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: impl_decl @impl { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_6.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc18_6.2: type = converted %int.make_type_32, %.loc18_6.1 [template = i32] // CHECK:STDOUT: %.loc18_13: bool = bool_literal false [template = constants.%.2] diff --git a/toolchain/check/testdata/impl/fail_redefinition.carbon b/toolchain/check/testdata/impl/fail_redefinition.carbon index e1dc49d2e3c9..7e8743880362 100644 --- a/toolchain/check/testdata/impl/fail_redefinition.carbon +++ b/toolchain/check/testdata/impl/fail_redefinition.carbon @@ -25,9 +25,9 @@ impl i32 as I {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.3: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -38,16 +38,16 @@ impl i32 as I {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: impl_decl @impl { -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_6.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_6.2: type = converted %int.make_type_32.loc13, %.loc13_6.1 [template = i32] // CHECK:STDOUT: %I.ref.loc13: type = name_ref I, %I.decl [template = constants.%.1] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: impl_decl @impl { -// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_6.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_6.2: type = converted %int.make_type_32.loc21, %.loc21_6.1 [template = i32] // CHECK:STDOUT: %I.ref.loc21: type = name_ref I, %I.decl [template = constants.%.1] diff --git a/toolchain/check/testdata/impl/fail_todo_impl_assoc_const.carbon b/toolchain/check/testdata/impl/fail_todo_impl_assoc_const.carbon index 82da1491a479..cf904688ab84 100644 --- a/toolchain/check/testdata/impl/fail_todo_impl_assoc_const.carbon +++ b/toolchain/check/testdata/impl/fail_todo_impl_assoc_const.carbon @@ -22,9 +22,9 @@ impl bool as I where .T = bool {} // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.2: type = assoc_entity_type @I, type [template] // CHECK:STDOUT: %.3: = assoc_entity element0, @I.%T [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.4: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Bool = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -34,9 +34,9 @@ impl bool as I where .T = bool {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref: = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: impl_decl @impl { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct() [template = bool] +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_6.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc16_6.2: type = converted %bool.make_type, %.loc16_6.1 [template = bool] // CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [template = constants.%.1] diff --git a/toolchain/check/testdata/impl/impl_as.carbon b/toolchain/check/testdata/impl/impl_as.carbon index 9bae3dabe4ec..4ba24c8d86ce 100644 --- a/toolchain/check/testdata/impl/impl_as.carbon +++ b/toolchain/check/testdata/impl/impl_as.carbon @@ -26,18 +26,18 @@ class C { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Simple [template] // CHECK:STDOUT: %Self: Simple = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Simple, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Simple, [template] +// CHECK:STDOUT: %.4: in Simple> = assoc_entity element0, @Simple.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%struct.2) [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] // CHECK:STDOUT: %.6: type = struct_type {} [template] // CHECK:STDOUT: %.7: type = ptr_type {} [template] -// CHECK:STDOUT: %struct.3: C = struct_value () [template] +// CHECK:STDOUT: %struct: C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -53,8 +53,8 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { // CHECK:STDOUT: %Self: Simple = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] {} -// CHECK:STDOUT: %.loc12: = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc12: in Simple> = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -63,7 +63,7 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: C as Simple { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.2] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} // CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -88,8 +88,8 @@ class C { // CHECK:STDOUT: %c.var: ref C = var c // CHECK:STDOUT: %c: ref C = bind_name c, %c.var // CHECK:STDOUT: %.loc19_19.1: {} = struct_literal () -// CHECK:STDOUT: %.loc19_19.2: init C = class_init (), %c.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc19_20: init C = converted %.loc19_19.1, %.loc19_19.2 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc19_19.2: init C = class_init (), %c.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_20: init C = converted %.loc19_19.1, %.loc19_19.2 [template = constants.%struct] // CHECK:STDOUT: assign %c.var, %.loc19_20 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/impl_forall.carbon b/toolchain/check/testdata/impl/impl_forall.carbon index f76d08dd233b..517af5f83503 100644 --- a/toolchain/check/testdata/impl/impl_forall.carbon +++ b/toolchain/check/testdata/impl/impl_forall.carbon @@ -21,15 +21,15 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Simple [template] // CHECK:STDOUT: %Self: Simple = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Simple, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Simple, [template] +// CHECK:STDOUT: %.4: in Simple> = assoc_entity element0, @Simple.%F.decl [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%struct.2) [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -49,8 +49,8 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { // CHECK:STDOUT: %Self: Simple = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] {} -// CHECK:STDOUT: %.loc12: = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc12: in Simple> = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -59,7 +59,7 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: T as Simple { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.2] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} // CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: diff --git a/toolchain/check/testdata/impl/lookup/alias.carbon b/toolchain/check/testdata/impl/lookup/alias.carbon index 32ee548981f4..d404bb5c45d7 100644 --- a/toolchain/check/testdata/impl/lookup/alias.carbon +++ b/toolchain/check/testdata/impl/lookup/alias.carbon @@ -30,18 +30,18 @@ fn G(c: C) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @HasF [template] // CHECK:STDOUT: %Self: HasF = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @HasF, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @HasF, [template] +// CHECK:STDOUT: %.4: in HasF> = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%struct.2) [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.7: type = ptr_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -59,7 +59,7 @@ fn G(c: C) { // CHECK:STDOUT: %C.ref.loc19: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, %HasF.decl [template = constants.%.1] // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %C.ref.loc23: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %c.loc23_6.1: C = param c // CHECK:STDOUT: @G.%c: C = bind_name c, %c.loc23_6.1 @@ -68,8 +68,8 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { // CHECK:STDOUT: %Self: HasF = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] {} -// CHECK:STDOUT: %.loc12: = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc12: in HasF> = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -78,7 +78,7 @@ fn G(c: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: C as HasF { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.2] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} // CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -88,8 +88,8 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%.1] -// CHECK:STDOUT: %F.ref: = name_ref F, @HasF.%.loc12 [template = constants.%.4] -// CHECK:STDOUT: %G: = bind_alias G, @HasF.%.loc12 [template = constants.%.4] +// CHECK:STDOUT: %F.ref: in HasF> = name_ref F, @HasF.%.loc12 [template = constants.%.4] +// CHECK:STDOUT: %G: in HasF> = bind_alias G, @HasF.%.loc12 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -106,12 +106,12 @@ fn G(c: C) { // CHECK:STDOUT: fn @G(%c: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %G.ref.loc24: = name_ref G, @C.%G [template = constants.%.4] -// CHECK:STDOUT: %.1: F = interface_witness_access @impl.%.1, element0 [template = constants.%struct.2] +// CHECK:STDOUT: %G.ref.loc24: in HasF> = name_ref G, @C.%G [template = constants.%.4] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] // CHECK:STDOUT: %F.call.loc24: init () = call %.1() // CHECK:STDOUT: %c.ref: C = name_ref c, %c -// CHECK:STDOUT: %G.ref.loc25: = name_ref G, @C.%G [template = constants.%.4] -// CHECK:STDOUT: %.2: F = interface_witness_access @impl.%.1, element0 [template = constants.%struct.2] +// CHECK:STDOUT: %G.ref.loc25: in HasF> = name_ref G, @C.%G [template = constants.%.4] +// CHECK:STDOUT: %.2: = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] // CHECK:STDOUT: %F.call.loc25: init () = call %.2() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon b/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon index 7b10b65171f9..700c54109c54 100644 --- a/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon +++ b/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon @@ -33,15 +33,15 @@ fn F(c: C) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @I, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @I, [template] +// CHECK:STDOUT: %.4: in I> = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] // CHECK:STDOUT: %.6: type = ptr_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -55,7 +55,7 @@ fn F(c: C) { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %c.loc19_6.1: C = param c // CHECK:STDOUT: @F.2.%c: C = bind_name c, %c.loc19_6.1 @@ -64,8 +64,8 @@ fn F(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] {} -// CHECK:STDOUT: %.loc12: = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc12: in I> = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -75,8 +75,8 @@ fn F(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] -// CHECK:STDOUT: %F.ref: = name_ref F, @I.%.loc12 [template = constants.%.4] -// CHECK:STDOUT: %F: = bind_alias F, @I.%.loc12 [template = constants.%.4] +// CHECK:STDOUT: %F.ref: in I> = name_ref F, @I.%.loc12 [template = constants.%.4] +// CHECK:STDOUT: %F: in I> = bind_alias F, @I.%.loc12 [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -88,9 +88,9 @@ fn F(c: C) { // CHECK:STDOUT: fn @F.2(%c: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %F.ref.loc24: = name_ref F, @C.%F [template = constants.%.4] +// CHECK:STDOUT: %F.ref.loc24: in I> = name_ref F, @C.%F [template = constants.%.4] // CHECK:STDOUT: %c.ref: C = name_ref c, %c -// CHECK:STDOUT: %F.ref.loc28: = name_ref F, @C.%F [template = constants.%.4] +// CHECK:STDOUT: %F.ref.loc28: in I> = name_ref F, @C.%F [template = constants.%.4] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon b/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon index 5619c3d85a66..5b04635a9b8f 100644 --- a/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon +++ b/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon @@ -33,20 +33,20 @@ impl C as I { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @I, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @I, [template] +// CHECK:STDOUT: %.4: in I> = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.3: F = struct_value () [template] -// CHECK:STDOUT: %F.3: type = fn_type @F.3 [template] -// CHECK:STDOUT: %struct.4: F = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%struct.4) [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] +// CHECK:STDOUT: %F.3: = struct_value () [template] +// CHECK:STDOUT: %.6: = interface_witness (%F.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -59,9 +59,9 @@ impl C as I { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc19_11.2: type = converted %int.make_type_32, %.loc19_11.1 [template = i32] // CHECK:STDOUT: @F.2.%return: ref i32 = var @@ -74,8 +74,8 @@ impl C as I { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] {} -// CHECK:STDOUT: %.loc12: = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc12: in I> = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -84,7 +84,7 @@ impl C as I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: C as I { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.3 [template = constants.%struct.4] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F.3 [template = constants.%F.3] {} // CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -109,7 +109,7 @@ impl C as I { // CHECK:STDOUT: fn @F.2() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %F.ref: = name_ref F, @I.%.loc12 [template = constants.%.4] +// CHECK:STDOUT: %F.ref: in I> = name_ref F, @I.%.loc12 [template = constants.%.4] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/import.carbon b/toolchain/check/testdata/impl/lookup/import.carbon index 3c1adb73036b..eca714a353da 100644 --- a/toolchain/check/testdata/impl/lookup/import.carbon +++ b/toolchain/check/testdata/impl/lookup/import.carbon @@ -35,16 +35,16 @@ fn G(c: Impl.C) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @HasF [template] // CHECK:STDOUT: %Self: HasF = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @HasF, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @HasF, [template] +// CHECK:STDOUT: %.4: in HasF> = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%struct.2) [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -64,8 +64,8 @@ fn G(c: Impl.C) { // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { // CHECK:STDOUT: %Self: HasF = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] {} -// CHECK:STDOUT: %.loc5: = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc5: in HasF> = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -74,7 +74,7 @@ fn G(c: Impl.C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: C as HasF { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.2] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} // CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -101,17 +101,17 @@ fn G(c: Impl.C) { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @HasF [template] // CHECK:STDOUT: %Self: HasF = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %G: type = fn_type @G [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: G = struct_value () [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.4: type = ptr_type {} [template] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @HasF, F [template] -// CHECK:STDOUT: %.6: = assoc_entity element0, file.%import_ref.8 [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.3: F = struct_value () [template] -// CHECK:STDOUT: %.7: = interface_witness (%struct.3) [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @HasF, [template] +// CHECK:STDOUT: %.6: in HasF> = assoc_entity element0, file.%import_ref.8 [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %.7: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -123,12 +123,12 @@ fn G(c: Impl.C) { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Impl: = namespace [template] {} // CHECK:STDOUT: %import_ref.1 = import_ref ir8, inst+14, unloaded -// CHECK:STDOUT: %import_ref.2: = import_ref ir8, inst+11, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.2: in HasF> = import_ref ir8, inst+11, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.3 = import_ref ir8, inst+4, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref ir8, inst+6, unloaded // CHECK:STDOUT: %import_ref.5: = import_ref ir8, inst+22, loaded [template = constants.%.7] // CHECK:STDOUT: %import_ref.6: type = import_ref ir8, inst+13, loaded [template = constants.%C] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.1] { +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Impl.ref: = name_ref Impl, %Impl [template = %Impl] // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.6 [template = constants.%C] // CHECK:STDOUT: %c.loc4_6.1: C = param c @@ -157,8 +157,8 @@ fn G(c: Impl.C) { // CHECK:STDOUT: %c.ref: C = name_ref c, %c // CHECK:STDOUT: %Impl.ref: = name_ref Impl, file.%Impl [template = file.%Impl] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%import_ref.7 [template = constants.%.2] -// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref.2 [template = constants.%.6] -// CHECK:STDOUT: %.1: F = interface_witness_access file.%import_ref.5, element0 [template = constants.%struct.3] +// CHECK:STDOUT: %F.ref: in HasF> = name_ref F, file.%import_ref.2 [template = constants.%.6] +// CHECK:STDOUT: %.1: = interface_witness_access file.%import_ref.5, element0 [template = constants.%F.2] // CHECK:STDOUT: %F.call: init () = call %.1() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/lookup/instance_method.carbon b/toolchain/check/testdata/impl/lookup/instance_method.carbon index c72b7be3f4f6..36a4f2fd9200 100644 --- a/toolchain/check/testdata/impl/lookup/instance_method.carbon +++ b/toolchain/check/testdata/impl/lookup/instance_method.carbon @@ -30,19 +30,19 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = interface_type @I [template] // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @I, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @I.%F.decl [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.3: F = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%struct.3) [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @I, [template] +// CHECK:STDOUT: %.4: in I> = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] // CHECK:STDOUT: %.6: type = struct_type {} [template] -// CHECK:STDOUT: %F.3: type = fn_type @F.3 [template] -// CHECK:STDOUT: %struct.4: F = struct_value () [template] +// CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] +// CHECK:STDOUT: %F.3: = struct_value () [template] // CHECK:STDOUT: %.7: type = ptr_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -56,15 +56,15 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %C.decl.loc11: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %C.decl.loc17: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.3 [template = constants.%struct.4] { +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F.3 [template = constants.%F.3] { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl.loc11 [template = constants.%C] // CHECK:STDOUT: %c.loc23_6.1: C = param c // CHECK:STDOUT: @F.3.%c: C = bind_name c, %c.loc23_6.1 -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_15.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc23_15.2: type = converted %int.make_type_32, %.loc23_15.1 [template = i32] // CHECK:STDOUT: @F.3.%return: ref i32 = var @@ -73,18 +73,18 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %Self.ref: I = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc14_14.1: type = facet_type_access %Self.ref [symbolic = constants.%Self] // CHECK:STDOUT: %.loc14_14.2: type = converted %Self.ref, %.loc14_14.1 [symbolic = constants.%Self] // CHECK:STDOUT: %self.loc14_8.1: Self = param self // CHECK:STDOUT: %self.loc14_8.2: Self = bind_name self, %self.loc14_8.1 -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_25.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_25.2: type = converted %int.make_type_32, %.loc14_25.1 [template = i32] // CHECK:STDOUT: %return.var: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14_28: = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc14_28: in I> = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -93,11 +93,11 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: C as I { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.3] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %self.loc19_10.1: C = param self // CHECK:STDOUT: %self.loc19_10.2: C = bind_name self, %self.loc19_10.1 -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_27.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc19_27.2: type = converted %int.make_type_32, %.loc19_27.1 [template = i32] // CHECK:STDOUT: %return.var: ref i32 = var @@ -128,8 +128,8 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: fn @F.3(%c: C) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: C = name_ref c, %c -// CHECK:STDOUT: %F.ref: = name_ref F, @I.%.loc14_28 [template = constants.%.4] -// CHECK:STDOUT: %.1: F = interface_witness_access @impl.%.1, element0 [template = constants.%struct.3] +// CHECK:STDOUT: %F.ref: in I> = name_ref F, @I.%.loc14_28 [template = constants.%.4] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] // CHECK:STDOUT: %.loc24_11: = bound_method %c.ref, %.1 // CHECK:STDOUT: %F.call: init i32 = call %.loc24_11(%c.ref) // CHECK:STDOUT: %.loc24_15.1: i32 = value_of_initializer %F.call diff --git a/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon b/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon index 1bb830c5e22a..bb31ef90b8f3 100644 --- a/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon +++ b/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon @@ -35,16 +35,16 @@ fn G(c: Impl.C) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @HasF [template] // CHECK:STDOUT: %Self: HasF = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @HasF, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @HasF, [template] +// CHECK:STDOUT: %.4: in HasF> = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%struct.2) [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -62,8 +62,8 @@ fn G(c: Impl.C) { // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { // CHECK:STDOUT: %Self: HasF = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] {} -// CHECK:STDOUT: %.loc5: = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc5: in HasF> = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -72,7 +72,7 @@ fn G(c: Impl.C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: C as HasF { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.2] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} // CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -99,17 +99,17 @@ fn G(c: Impl.C) { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @HasF [template] // CHECK:STDOUT: %Self: HasF = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %G: type = fn_type @G [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: G = struct_value () [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.4: type = ptr_type {} [template] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @HasF, F [template] -// CHECK:STDOUT: %.6: = assoc_entity element0, file.%import_ref.8 [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.3: F = struct_value () [template] -// CHECK:STDOUT: %.7: = interface_witness (%struct.3) [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @HasF, [template] +// CHECK:STDOUT: %.6: in HasF> = assoc_entity element0, file.%import_ref.8 [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %.7: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -119,12 +119,12 @@ fn G(c: Impl.C) { // CHECK:STDOUT: } // CHECK:STDOUT: %Impl: = namespace [template] {} // CHECK:STDOUT: %import_ref.1 = import_ref ir1, inst+13, unloaded -// CHECK:STDOUT: %import_ref.2: = import_ref ir1, inst+10, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.2: in HasF> = import_ref ir1, inst+10, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+3, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+5, unloaded // CHECK:STDOUT: %import_ref.5: = import_ref ir1, inst+21, loaded [template = constants.%.7] // CHECK:STDOUT: %import_ref.6: type = import_ref ir1, inst+12, loaded [template = constants.%C] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.1] { +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Impl.ref: = name_ref Impl, %Impl [template = %Impl] // CHECK:STDOUT: %C.ref: type = name_ref C, %import_ref.6 [template = constants.%C] // CHECK:STDOUT: %c.loc4_6.1: C = param c @@ -153,8 +153,8 @@ fn G(c: Impl.C) { // CHECK:STDOUT: %c.ref: C = name_ref c, %c // CHECK:STDOUT: %Impl.ref: = name_ref Impl, file.%Impl [template = file.%Impl] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%import_ref.7 [template = constants.%.2] -// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref.2 [template = constants.%.6] -// CHECK:STDOUT: %.1: F = interface_witness_access file.%import_ref.5, element0 [template = constants.%struct.3] +// CHECK:STDOUT: %F.ref: in HasF> = name_ref F, file.%import_ref.2 [template = constants.%.6] +// CHECK:STDOUT: %.1: = interface_witness_access file.%import_ref.5, element0 [template = constants.%F.2] // CHECK:STDOUT: %F.call: init () = call %.1() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/no_prelude/basic.carbon b/toolchain/check/testdata/impl/no_prelude/basic.carbon index 2337827f1687..7c2651b69e5c 100644 --- a/toolchain/check/testdata/impl/no_prelude/basic.carbon +++ b/toolchain/check/testdata/impl/no_prelude/basic.carbon @@ -23,16 +23,16 @@ impl C as Simple { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Simple [template] // CHECK:STDOUT: %Self: Simple = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Simple, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Simple, [template] +// CHECK:STDOUT: %.4: in Simple> = assoc_entity element0, @Simple.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%struct.2) [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -50,8 +50,8 @@ impl C as Simple { // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { // CHECK:STDOUT: %Self: Simple = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] {} -// CHECK:STDOUT: %.loc12: = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc12: in Simple> = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -60,7 +60,7 @@ impl C as Simple { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: C as Simple { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.2] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} // CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: diff --git a/toolchain/check/testdata/impl/no_prelude/import_self.carbon b/toolchain/check/testdata/impl/no_prelude/import_self.carbon index 8d7661dfbf19..effb4687eec5 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_self.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_self.carbon @@ -35,11 +35,11 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Add [template] // CHECK:STDOUT: %Self: Add = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Op: type = fn_type @Op [template] +// CHECK:STDOUT: %Op.type: type = fn_type @Op [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Op = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Add, Op [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @Add.%Op.decl [template] +// CHECK:STDOUT: %Op: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Add, [template] +// CHECK:STDOUT: %.4: in Add> = assoc_entity element0, @Add.%Op.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -51,7 +51,7 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: // CHECK:STDOUT: interface @Add { // CHECK:STDOUT: %Self: Add = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op [template = constants.%struct] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op [template = constants.%Op] { // CHECK:STDOUT: %Self.ref.loc5_15: Add = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc5_15.1: type = facet_type_access %Self.ref.loc5_15 [symbolic = constants.%Self] // CHECK:STDOUT: %.loc5_15.2: type = converted %Self.ref.loc5_15, %.loc5_15.1 [symbolic = constants.%Self] @@ -67,7 +67,7 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: %.loc5_37.2: type = converted %Self.ref.loc5_37, %.loc5_37.1 [symbolic = constants.%Self] // CHECK:STDOUT: %return.var: ref Self = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc5_41: = assoc_entity element0, %Op.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc5_41: in Add> = assoc_entity element0, %Op.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -83,16 +83,16 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %.2: type = interface_type @Add [template] // CHECK:STDOUT: %Self: Add = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Op.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %struct.1: Op = struct_value () [template] -// CHECK:STDOUT: %Op.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %struct.2: Op = struct_value () [template] -// CHECK:STDOUT: %.3: = interface_witness (%struct.1) [template] +// CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] +// CHECK:STDOUT: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] +// CHECK:STDOUT: %Op.2: = struct_value () [template] +// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.3: F = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type @Add, Op [template] -// CHECK:STDOUT: %.5: = assoc_entity element0, file.%import_ref.5 [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type @Add, [template] +// CHECK:STDOUT: %.5: in Add> = assoc_entity element0, file.%import_ref.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -101,15 +101,15 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref ir1, inst+1, loaded [template = constants.%.2] -// CHECK:STDOUT: %import_ref.2: = import_ref ir1, inst+24, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.2: in Add> = import_ref ir1, inst+24, loaded [template = constants.%.5] // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+3, unloaded -// CHECK:STDOUT: %import_ref.4: Op = import_ref ir1, inst+19, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.4: = import_ref ir1, inst+19, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %.loc6_7.1: () = tuple_literal () // CHECK:STDOUT: %.loc6_7.2: type = converted %.loc6_7.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %Add.ref: type = name_ref Add, %import_ref.1 [template = constants.%.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.3] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %.loc10_10.1: () = tuple_literal () // CHECK:STDOUT: %.loc10_10.2: type = converted %.loc10_10.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %x.loc10_6.1: () = param x @@ -133,7 +133,7 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: () as Add { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %Self.ref.loc7_15: type = name_ref Self, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %self.loc7_9.1: () = param self // CHECK:STDOUT: %self.loc7_9.2: () = bind_name self, %self.loc7_9.1 @@ -164,8 +164,8 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: () = name_ref x, %x // CHECK:STDOUT: %Add.ref: type = name_ref Add, file.%import_ref.1 [template = constants.%.2] -// CHECK:STDOUT: %Op.ref: = name_ref Op, file.%import_ref.2 [template = constants.%.5] -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.%.1, element0 [template = constants.%struct.1] +// CHECK:STDOUT: %Op.ref: in Add> = name_ref Op, file.%import_ref.2 [template = constants.%.5] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc11_11: = bound_method %x.ref, %.1 // CHECK:STDOUT: %y.ref: () = name_ref y, %y // CHECK:STDOUT: %Op.call: init () = call %.loc11_11(%x.ref, %y.ref) diff --git a/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon b/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon index acdfff9b4c6a..f0f116b279f9 100644 --- a/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon +++ b/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon @@ -27,19 +27,19 @@ class A { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @DefaultConstructible [template] // CHECK:STDOUT: %Self: DefaultConstructible = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Make.1: type = fn_type @Make.1 [template] +// CHECK:STDOUT: %Make.type.1: type = fn_type @Make.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Make = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @DefaultConstructible, Make [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @DefaultConstructible.%Make.decl [template] +// CHECK:STDOUT: %Make.1: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @DefaultConstructible, [template] +// CHECK:STDOUT: %.4: in DefaultConstructible> = assoc_entity element0, @DefaultConstructible.%Make.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.5: type = struct_type {} [template] // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %Make.2: type = fn_type @Make.2 [template] -// CHECK:STDOUT: %struct.2: Make = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%struct.2) [template] +// CHECK:STDOUT: %Make.type.2: type = fn_type @Make.2 [template] +// CHECK:STDOUT: %Make.2: = struct_value () [template] +// CHECK:STDOUT: %.6: = interface_witness (%Make.2) [template] // CHECK:STDOUT: %.7: type = ptr_type {} [template] -// CHECK:STDOUT: %struct.3: C = struct_value () [template] +// CHECK:STDOUT: %struct: C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -55,13 +55,13 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: interface @DefaultConstructible { // CHECK:STDOUT: %Self: DefaultConstructible = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %Make.decl: Make = fn_decl @Make.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %Make.decl: = fn_decl @Make.1 [template = constants.%Make.1] { // CHECK:STDOUT: %Self.ref: DefaultConstructible = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc12_16.1: type = facet_type_access %Self.ref [symbolic = constants.%Self] // CHECK:STDOUT: %.loc12_16.2: type = converted %Self.ref, %.loc12_16.1 [symbolic = constants.%Self] // CHECK:STDOUT: %return.var: ref Self = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12_20: = assoc_entity element0, %Make.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12_20: in DefaultConstructible> = assoc_entity element0, %Make.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -70,7 +70,7 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: C as DefaultConstructible { -// CHECK:STDOUT: %Make.decl: Make = fn_decl @Make.2 [template = constants.%struct.2] { +// CHECK:STDOUT: %Make.decl: = fn_decl @Make.2 [template = constants.%Make.2] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %return.var: ref C = var // CHECK:STDOUT: } @@ -101,8 +101,8 @@ class A { // CHECK:STDOUT: fn @Make.2() -> @impl.%return.var: C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc21_33.1: {} = struct_literal () -// CHECK:STDOUT: %.loc21_33.2: init C = class_init (), @impl.%return.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc21_34: init C = converted %.loc21_33.1, %.loc21_33.2 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc21_33.2: init C = class_init (), @impl.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc21_34: init C = converted %.loc21_33.1, %.loc21_33.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc21_34 to @impl.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon b/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon index 72cfd9db6fe9..21bd3bc74204 100644 --- a/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon +++ b/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon @@ -41,45 +41,45 @@ impl D as SelfNested { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @UseSelf [template] // CHECK:STDOUT: %Self.1: UseSelf = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @UseSelf, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @UseSelf.%F.decl [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @UseSelf, [template] +// CHECK:STDOUT: %.4: in UseSelf> = assoc_entity element0, @UseSelf.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.5: type = struct_type {} [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%struct.2) [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] // CHECK:STDOUT: %.7: type = ptr_type {} [template] -// CHECK:STDOUT: %struct.3: C = struct_value () [template] -// CHECK:STDOUT: %F.3: type = fn_type @F.3 [template] -// CHECK:STDOUT: %struct.4: F = struct_value () [template] -// CHECK:STDOUT: %.8: = interface_witness (%struct.4) [template] -// CHECK:STDOUT: %struct.5: D = struct_value () [template] +// CHECK:STDOUT: %struct.1: C = struct_value () [template] +// CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] +// CHECK:STDOUT: %F.3: = struct_value () [template] +// CHECK:STDOUT: %.8: = interface_witness (%F.3) [template] +// CHECK:STDOUT: %struct.2: D = struct_value () [template] // CHECK:STDOUT: %.9: type = interface_type @SelfNested [template] // CHECK:STDOUT: %Self.2: SelfNested = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.10: type = ptr_type Self [symbolic] // CHECK:STDOUT: %.11: type = struct_type {.x: Self, .y: ()} [symbolic] // CHECK:STDOUT: %.12: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.13: type = tuple_type (Self*, {.x: Self, .y: ()}) [symbolic] -// CHECK:STDOUT: %F.4: type = fn_type @F.4 [template] -// CHECK:STDOUT: %struct.6: F = struct_value () [template] -// CHECK:STDOUT: %.14: type = assoc_entity_type @SelfNested, F [template] -// CHECK:STDOUT: %.15: = assoc_entity element0, @SelfNested.%F.decl [template] +// CHECK:STDOUT: %F.type.4: type = fn_type @F.4 [template] +// CHECK:STDOUT: %F.4: = struct_value () [template] +// CHECK:STDOUT: %.14: type = assoc_entity_type @SelfNested, [template] +// CHECK:STDOUT: %.15: in SelfNested> = assoc_entity element0, @SelfNested.%F.decl [template] // CHECK:STDOUT: %.16: type = ptr_type C [template] // CHECK:STDOUT: %.17: type = struct_type {.x: C, .y: ()} [template] // CHECK:STDOUT: %.18: type = tuple_type (C*, {.x: C, .y: ()}) [template] -// CHECK:STDOUT: %F.5: type = fn_type @F.5 [template] -// CHECK:STDOUT: %struct.7: F = struct_value () [template] -// CHECK:STDOUT: %.19: = interface_witness (%struct.7) [template] +// CHECK:STDOUT: %F.type.5: type = fn_type @F.5 [template] +// CHECK:STDOUT: %F.5: = struct_value () [template] +// CHECK:STDOUT: %.19: = interface_witness (%F.5) [template] // CHECK:STDOUT: %.20: type = ptr_type D [template] // CHECK:STDOUT: %.21: type = struct_type {.x: D, .y: ()} [template] // CHECK:STDOUT: %.22: type = tuple_type (D*, {.x: D, .y: ()}) [template] -// CHECK:STDOUT: %F.6: type = fn_type @F.6 [template] -// CHECK:STDOUT: %struct.8: F = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%struct.8) [template] +// CHECK:STDOUT: %F.type.6: type = fn_type @F.6 [template] +// CHECK:STDOUT: %F.6: = struct_value () [template] +// CHECK:STDOUT: %.23: = interface_witness (%F.6) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -113,7 +113,7 @@ impl D as SelfNested { // CHECK:STDOUT: // CHECK:STDOUT: interface @UseSelf { // CHECK:STDOUT: %Self: UseSelf = bind_symbolic_name Self 0 [symbolic = constants.%Self.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %Self.ref.loc12_14: UseSelf = name_ref Self, %Self [symbolic = constants.%Self.1] // CHECK:STDOUT: %.loc12_14.1: type = facet_type_access %Self.ref.loc12_14 [symbolic = constants.%Self.1] // CHECK:STDOUT: %.loc12_14.2: type = converted %Self.ref.loc12_14, %.loc12_14.1 [symbolic = constants.%Self.1] @@ -129,7 +129,7 @@ impl D as SelfNested { // CHECK:STDOUT: %.loc12_32.2: type = converted %Self.ref.loc12_32, %.loc12_32.1 [symbolic = constants.%Self.1] // CHECK:STDOUT: %return.var: ref Self = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12_36: = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12_36: in UseSelf> = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -139,7 +139,7 @@ impl D as SelfNested { // CHECK:STDOUT: // CHECK:STDOUT: interface @SelfNested { // CHECK:STDOUT: %Self: SelfNested = bind_symbolic_name Self 0 [symbolic = constants.%Self.2] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.4 [template = constants.%struct.6] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.4 [template = constants.%F.4] { // CHECK:STDOUT: %Self.ref.loc28_12: SelfNested = name_ref Self, %Self [symbolic = constants.%Self.2] // CHECK:STDOUT: %.loc28_16.1: type = facet_type_access %Self.ref.loc28_12 [symbolic = constants.%Self.2] // CHECK:STDOUT: %.loc28_16.2: type = converted %Self.ref.loc28_12, %.loc28_16.1 [symbolic = constants.%Self.2] @@ -155,7 +155,7 @@ impl D as SelfNested { // CHECK:STDOUT: %x.loc28_8.1: (Self*, {.x: Self, .y: ()}) = param x // CHECK:STDOUT: %x.loc28_8.2: (Self*, {.x: Self, .y: ()}) = bind_name x, %x.loc28_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc28_39: = assoc_entity element0, %F.decl [template = constants.%.15] +// CHECK:STDOUT: %.loc28_39: in SelfNested> = assoc_entity element0, %F.decl [template = constants.%.15] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -164,7 +164,7 @@ impl D as SelfNested { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: C as UseSelf { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.2] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %C.ref.loc20_14: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.loc20_8.1: C = param self // CHECK:STDOUT: %self.loc20_8.2: C = bind_name self, %self.loc20_8.1 @@ -182,7 +182,7 @@ impl D as SelfNested { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: D as UseSelf { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.3 [template = constants.%struct.4] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.3 [template = constants.%F.3] { // CHECK:STDOUT: %Self.ref.loc24_14: type = name_ref Self, constants.%D [template = constants.%D] // CHECK:STDOUT: %self.loc24_8.1: D = param self // CHECK:STDOUT: %self.loc24_8.2: D = bind_name self, %self.loc24_8.1 @@ -200,7 +200,7 @@ impl D as SelfNested { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.3: C as SelfNested { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.5 [template = constants.%struct.7] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.5 [template = constants.%F.5] { // CHECK:STDOUT: %C.ref.loc32_12: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc32_13: type = ptr_type C [template = constants.%.16] // CHECK:STDOUT: %C.ref.loc32_21: type = name_ref C, file.%C.decl [template = constants.%C] @@ -220,7 +220,7 @@ impl D as SelfNested { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.4: D as SelfNested { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.6 [template = constants.%struct.8] { +// CHECK:STDOUT: %F.decl: = fn_decl @F.6 [template = constants.%F.6] { // CHECK:STDOUT: %Self.ref.loc36_12: type = name_ref Self, constants.%D [template = constants.%D] // CHECK:STDOUT: %.loc36_16: type = ptr_type D [template = constants.%.20] // CHECK:STDOUT: %Self.ref.loc36_24: type = name_ref Self, constants.%D [template = constants.%D] @@ -254,16 +254,16 @@ impl D as SelfNested { // CHECK:STDOUT: fn @F.2[@impl.1.%self.loc20_8.2: C](@impl.1.%x.loc20_17.2: C) -> @impl.1.%return.var: C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc20_38.1: {} = struct_literal () -// CHECK:STDOUT: %.loc20_38.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc20_39: init C = converted %.loc20_38.1, %.loc20_38.2 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc20_38.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct.1] +// CHECK:STDOUT: %.loc20_39: init C = converted %.loc20_38.1, %.loc20_38.2 [template = constants.%struct.1] // CHECK:STDOUT: return %.loc20_39 to @impl.1.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.3[@impl.2.%self.loc24_8.2: D](@impl.2.%x.loc24_20.2: D) -> @impl.2.%return.var: D { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc24_47.1: {} = struct_literal () -// CHECK:STDOUT: %.loc24_47.2: init D = class_init (), @impl.2.%return.var [template = constants.%struct.5] -// CHECK:STDOUT: %.loc24_48: init D = converted %.loc24_47.1, %.loc24_47.2 [template = constants.%struct.5] +// CHECK:STDOUT: %.loc24_47.2: init D = class_init (), @impl.2.%return.var [template = constants.%struct.2] +// CHECK:STDOUT: %.loc24_48: init D = converted %.loc24_47.1, %.loc24_47.2 [template = constants.%struct.2] // CHECK:STDOUT: return %.loc24_48 to @impl.2.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/redeclaration.carbon b/toolchain/check/testdata/impl/redeclaration.carbon index 9a29a6315b8c..50346a3d092f 100644 --- a/toolchain/check/testdata/impl/redeclaration.carbon +++ b/toolchain/check/testdata/impl/redeclaration.carbon @@ -23,9 +23,9 @@ impl i32 as I {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %X: type = class_type @X [template] // CHECK:STDOUT: %.3: type = struct_type {} [template] // CHECK:STDOUT: %.4: = interface_witness () [template] @@ -39,18 +39,18 @@ impl i32 as I {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: impl_decl @impl { -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_6.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_6.2: type = converted %int.make_type_32.loc13, %.loc13_6.1 [template = i32] // CHECK:STDOUT: %I.ref.loc13: type = name_ref I, %I.decl [template = constants.%.1] // CHECK:STDOUT: } // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: impl_decl @impl { -// CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_6.1: type = value_of_initializer %int.make_type_32.loc19 [template = i32] // CHECK:STDOUT: %.loc19_6.2: type = converted %int.make_type_32.loc19, %.loc19_6.1 [template = i32] // CHECK:STDOUT: %I.ref.loc19: type = name_ref I, %I.decl [template = constants.%.1] @@ -74,7 +74,7 @@ impl i32 as I {} // CHECK:STDOUT: // CHECK:STDOUT: class @X { // CHECK:STDOUT: impl_decl @impl { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_8.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc16_8.2: type = converted %int.make_type_32, %.loc16_8.1 [template = i32] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%.1] diff --git a/toolchain/check/testdata/index/array_element_access.carbon b/toolchain/check/testdata/index/array_element_access.carbon index e5a9795142fb..aa3bded178c4 100644 --- a/toolchain/check/testdata/index/array_element_access.carbon +++ b/toolchain/check/testdata/index/array_element_access.carbon @@ -16,9 +16,9 @@ var d: i32 = a[b]; // CHECK:STDOUT: --- array_element_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 2 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] // CHECK:STDOUT: %.4: type = ptr_type [i32; 2] [template] @@ -39,28 +39,28 @@ var d: i32 = a[b]; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14: i32 = int_literal 2 [template = constants.%.2] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32.loc11, %.loc11_9.1 [template = i32] // CHECK:STDOUT: %.loc11_15: type = array_type %.loc11_14, i32 [template = constants.%.3] // CHECK:STDOUT: %a.var: ref [i32; 2] = var a // CHECK:STDOUT: %a: ref [i32; 2] = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_32.loc12, %.loc12_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_8.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_8.2: type = converted %int.make_type_32.loc13, %.loc13_8.1 [template = i32] // CHECK:STDOUT: %c.var: ref i32 = var c // CHECK:STDOUT: %c: ref i32 = bind_name c, %c.var -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_8.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] // CHECK:STDOUT: %.loc14_8.2: type = converted %int.make_type_32.loc14, %.loc14_8.1 [template = i32] // CHECK:STDOUT: %d.var: ref i32 = var d diff --git a/toolchain/check/testdata/index/expr_category.carbon b/toolchain/check/testdata/index/expr_category.carbon index defb852f18f2..dde290d146bc 100644 --- a/toolchain/check/testdata/index/expr_category.carbon +++ b/toolchain/check/testdata/index/expr_category.carbon @@ -31,15 +31,15 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: --- expr_category.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.4: type = ptr_type [i32; 3] [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] @@ -48,8 +48,8 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %array: [i32; 3] = tuple_value (%.5, %.6, %.2) [template] // CHECK:STDOUT: %.9: type = ptr_type i32 [template] // CHECK:STDOUT: %.10: i32 = int_literal 4 [template] -// CHECK:STDOUT: %ValueBinding: type = fn_type @ValueBinding [template] -// CHECK:STDOUT: %struct.4: ValueBinding = struct_value () [template] +// CHECK:STDOUT: %ValueBinding.type: type = fn_type @ValueBinding [template] +// CHECK:STDOUT: %ValueBinding: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -60,18 +60,18 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: .ValueBinding = %ValueBinding.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_17: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc11_12.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_12.2: type = converted %int.make_type_32.loc11, %.loc11_12.1 [template = i32] // CHECK:STDOUT: %.loc11_18: type = array_type %.loc11_17, i32 [template = constants.%.3] // CHECK:STDOUT: @F.%return: ref [i32; 3] = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_15: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] @@ -79,11 +79,11 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %b.loc13_6.1: [i32; 3] = param b // CHECK:STDOUT: @G.%b: [i32; 3] = bind_name b, %b.loc13_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %ValueBinding.decl: ValueBinding = fn_decl @ValueBinding [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %ValueBinding.decl: = fn_decl @ValueBinding [template = constants.%ValueBinding] { +// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_26: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc21_21.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_21.2: type = converted %int.make_type_32.loc21, %.loc21_21.1 [template = i32] @@ -91,7 +91,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %b.loc21_17.1: [i32; 3] = param b // CHECK:STDOUT: @ValueBinding.%b: [i32; 3] = bind_name b, %b.loc21_17.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -100,7 +100,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: // CHECK:STDOUT: fn @G(%b: [i32; 3]) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_16: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc14_11.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] // CHECK:STDOUT: %.loc14_11.2: type = converted %int.make_type_32.loc14, %.loc14_11.1 [template = i32] @@ -123,7 +123,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %.loc14_29.11: init [i32; 3] = array_init (%.loc14_29.4, %.loc14_29.7, %.loc14_29.10) to %a.var [template = constants.%array] // CHECK:STDOUT: %.loc14_30: init [i32; 3] = converted %.loc14_29.1, %.loc14_29.11 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc14_30 -// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_14.1: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_14.2: type = converted %int.make_type_32.loc17, %.loc17_14.1 [template = i32] // CHECK:STDOUT: %.loc17_14.3: type = ptr_type i32 [template = constants.%.9] @@ -144,7 +144,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: // CHECK:STDOUT: fn @ValueBinding(%b: [i32; 3]) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_16: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc22_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc22_11.2: type = converted %int.make_type_32, %.loc22_11.1 [template = i32] @@ -175,7 +175,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %.loc27_6.1: ref [i32; 3] = value_as_ref %b.ref // CHECK:STDOUT: %.loc27_6.2: ref i32 = array_index %.loc27_6.1, %.loc27_5 // CHECK:STDOUT: %.loc27_6.3: i32 = bind_value %.loc27_6.2 -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc28_4.1: ref [i32; 3] = temporary_storage // CHECK:STDOUT: %F.call: init [i32; 3] = call %F.ref() to %.loc28_4.1 // CHECK:STDOUT: %.loc28_7: i32 = int_literal 0 [template = constants.%.8] diff --git a/toolchain/check/testdata/index/fail_array_large_index.carbon b/toolchain/check/testdata/index/fail_array_large_index.carbon index b02bbe496bde..27da21c08f2a 100644 --- a/toolchain/check/testdata/index/fail_array_large_index.carbon +++ b/toolchain/check/testdata/index/fail_array_large_index.carbon @@ -24,9 +24,9 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: --- fail_array_large_index.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] // CHECK:STDOUT: %.4: type = ptr_type [i32; 1] [template] @@ -45,22 +45,22 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32.loc11, %.loc11_9.1 [template = i32] // CHECK:STDOUT: %.loc11_15: type = array_type %.loc11_14, i32 [template = constants.%.3] // CHECK:STDOUT: %a.var: ref [i32; 1] = var a // CHECK:STDOUT: %a: ref [i32; 1] = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_8.1: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_8.2: type = converted %int.make_type_32.loc17, %.loc17_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_8.1: type = value_of_initializer %int.make_type_32.loc22 [template = i32] // CHECK:STDOUT: %.loc22_8.2: type = converted %int.make_type_32.loc22, %.loc22_8.1 [template = i32] // CHECK:STDOUT: %c.var: ref i32 = var c diff --git a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon index 1a7996e4ea63..be84189772fd 100644 --- a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon +++ b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon @@ -17,9 +17,9 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: --- fail_array_non_int_indexing.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] // CHECK:STDOUT: %.4: type = ptr_type [i32; 1] [template] @@ -37,16 +37,16 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32.loc11, %.loc11_9.1 [template = i32] // CHECK:STDOUT: %.loc11_15: type = array_type %.loc11_14, i32 [template = constants.%.3] // CHECK:STDOUT: %a.var: ref [i32; 1] = var a // CHECK:STDOUT: %a: ref [i32; 1] = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_32.loc15, %.loc15_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b diff --git a/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon b/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon index 8c2cee2d6809..de8b94c4d306 100644 --- a/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon +++ b/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon @@ -17,9 +17,9 @@ var b: i32 = a[1]; // CHECK:STDOUT: --- fail_array_out_of_bound_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] // CHECK:STDOUT: %.4: type = ptr_type [i32; 1] [template] @@ -36,16 +36,16 @@ var b: i32 = a[1]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32.loc11, %.loc11_9.1 [template = i32] // CHECK:STDOUT: %.loc11_15: type = array_type %.loc11_14, i32 [template = constants.%.3] // CHECK:STDOUT: %a.var: ref [i32; 1] = var a // CHECK:STDOUT: %a: ref [i32; 1] = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_32.loc15, %.loc15_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b diff --git a/toolchain/check/testdata/index/fail_empty_tuple_access.carbon b/toolchain/check/testdata/index/fail_empty_tuple_access.carbon index 8f853fda6df5..e4e01e69427c 100644 --- a/toolchain/check/testdata/index/fail_empty_tuple_access.carbon +++ b/toolchain/check/testdata/index/fail_empty_tuple_access.carbon @@ -20,11 +20,11 @@ fn Run() { // CHECK:STDOUT: --- fail_empty_tuple_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %Run: type = fn_type @Run [template] -// CHECK:STDOUT: %struct.2: Run = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %Run.type: type = fn_type @Run [template] +// CHECK:STDOUT: %Run: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -35,8 +35,8 @@ fn Run() { // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] {} -// CHECK:STDOUT: %Run.decl: Run = fn_decl @Run [template = constants.%struct.2] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -46,7 +46,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%F.decl [template = constants.%struct.1] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init () = call %F.ref() // CHECK:STDOUT: %.loc17_7: i32 = int_literal 0 [template = constants.%.2] // CHECK:STDOUT: %.loc17_4.1: ref () = temporary_storage diff --git a/toolchain/check/testdata/index/fail_expr_category.carbon b/toolchain/check/testdata/index/fail_expr_category.carbon index a67cec35f849..788caedf8ccf 100644 --- a/toolchain/check/testdata/index/fail_expr_category.carbon +++ b/toolchain/check/testdata/index/fail_expr_category.carbon @@ -39,15 +39,15 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: --- fail_expr_category.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: type = array_type %.2, i32 [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.4: type = ptr_type [i32; 3] [template] // CHECK:STDOUT: %.5: type = ptr_type i32 [template] // CHECK:STDOUT: %.6: i32 = int_literal 0 [template] @@ -61,18 +61,18 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_17: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc11_12.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_12.2: type = converted %int.make_type_32.loc11, %.loc11_12.1 [template = i32] // CHECK:STDOUT: %.loc11_18: type = array_type %.loc11_17, i32 [template = constants.%.3] // CHECK:STDOUT: @F.%return: ref [i32; 3] = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_15: i32 = int_literal 3 [template = constants.%.2] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] @@ -80,8 +80,8 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: %b.loc13_6.1: [i32; 3] = param b // CHECK:STDOUT: @G.%b: [i32; 3] = bind_name b, %b.loc13_6.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -90,7 +90,7 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: // CHECK:STDOUT: fn @G(%b: [i32; 3]) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_14.1: type = value_of_initializer %int.make_type_32.loc19 [template = i32] // CHECK:STDOUT: %.loc19_14.2: type = converted %int.make_type_32.loc19, %.loc19_14.1 [template = i32] // CHECK:STDOUT: %.loc19_14.3: type = ptr_type i32 [template = constants.%.5] @@ -110,13 +110,13 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: %.loc24_6.3: i32 = bind_value %.loc24_6.2 // CHECK:STDOUT: %.loc24_10: i32 = int_literal 4 [template = constants.%.7] // CHECK:STDOUT: assign %.loc24_6.3, %.loc24_10 -// CHECK:STDOUT: %int.make_type_32.loc32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc32_14.1: type = value_of_initializer %int.make_type_32.loc32 [template = i32] // CHECK:STDOUT: %.loc32_14.2: type = converted %int.make_type_32.loc32, %.loc32_14.1 [template = i32] // CHECK:STDOUT: %.loc32_14.3: type = ptr_type i32 [template = constants.%.5] // CHECK:STDOUT: %pf.var: ref i32* = var pf // CHECK:STDOUT: %pf: ref i32* = bind_name pf, %pf.var -// CHECK:STDOUT: %F.ref.loc32: F = name_ref F, file.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref.loc32: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc32_20.1: ref [i32; 3] = temporary_storage // CHECK:STDOUT: %F.call.loc32: init [i32; 3] = call %F.ref.loc32() to %.loc32_20.1 // CHECK:STDOUT: %.loc32_23: i32 = int_literal 0 [template = constants.%.6] @@ -125,7 +125,7 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: %.loc32_24.2: i32 = bind_value %.loc32_24.1 // CHECK:STDOUT: %.loc32_18: i32* = addr_of [template = ] // CHECK:STDOUT: assign %pf.var, %.loc32_18 -// CHECK:STDOUT: %F.ref.loc36: F = name_ref F, file.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref.loc36: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc36_4.1: ref [i32; 3] = temporary_storage // CHECK:STDOUT: %F.call.loc36: init [i32; 3] = call %F.ref.loc36() to %.loc36_4.1 // CHECK:STDOUT: %.loc36_7: i32 = int_literal 0 [template = constants.%.6] diff --git a/toolchain/check/testdata/index/fail_invalid_base.carbon b/toolchain/check/testdata/index/fail_invalid_base.carbon index 301130408f02..ca61bbb3c97e 100644 --- a/toolchain/check/testdata/index/fail_invalid_base.carbon +++ b/toolchain/check/testdata/index/fail_invalid_base.carbon @@ -36,17 +36,17 @@ var d: i32 = {.a: i32, .b: i32}[0]; // CHECK:STDOUT: --- fail_invalid_base.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] // CHECK:STDOUT: %.4: i32 = int_literal 2 [template] // CHECK:STDOUT: %.5: type = struct_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %.6: type = ptr_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %struct.3: {.a: i32, .b: i32} = struct_value (%.3, %.4) [template] +// CHECK:STDOUT: %struct: {.a: i32, .b: i32} = struct_value (%.3, %.4) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -61,33 +61,33 @@ var d: i32 = {.a: i32, .b: i32}[0]; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %N: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_8.1: type = value_of_initializer %int.make_type_32.loc16 [template = i32] // CHECK:STDOUT: %.loc16_8.2: type = converted %int.make_type_32.loc16, %.loc16_8.1 [template = i32] // CHECK:STDOUT: %a.var: ref i32 = var a // CHECK:STDOUT: %a: ref i32 = bind_name a, %a.var -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] {} -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc23: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_8.1: type = value_of_initializer %int.make_type_32.loc23 [template = i32] // CHECK:STDOUT: %.loc23_8.2: type = converted %int.make_type_32.loc23, %.loc23_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc29: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc29: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc29_8.1: type = value_of_initializer %int.make_type_32.loc29 [template = i32] // CHECK:STDOUT: %.loc29_8.2: type = converted %int.make_type_32.loc29, %.loc29_8.1 [template = i32] // CHECK:STDOUT: %c.var: ref i32 = var c // CHECK:STDOUT: %c: ref i32 = bind_name c, %c.var -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc34: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc34_8.1: type = value_of_initializer %int.make_type_32.loc34 [template = i32] // CHECK:STDOUT: %.loc34_8.2: type = converted %int.make_type_32.loc34, %.loc34_8.1 [template = i32] // CHECK:STDOUT: %d.var: ref i32 = var d // CHECK:STDOUT: %d: ref i32 = bind_name d, %d.var -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -99,20 +99,20 @@ var d: i32 = {.a: i32, .b: i32}[0]; // CHECK:STDOUT: %N.ref: = name_ref N, file.%N [template = file.%N] // CHECK:STDOUT: %.loc16: i32 = int_literal 0 [template = constants.%.2] // CHECK:STDOUT: assign file.%a.var, -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc23: i32 = int_literal 1 [template = constants.%.3] // CHECK:STDOUT: assign file.%b.var, // CHECK:STDOUT: %.loc29_20: i32 = int_literal 1 [template = constants.%.3] // CHECK:STDOUT: %.loc29_28: i32 = int_literal 2 [template = constants.%.4] // CHECK:STDOUT: %.loc29_29.1: {.a: i32, .b: i32} = struct_literal (%.loc29_20, %.loc29_28) // CHECK:STDOUT: %.loc29_31: i32 = int_literal 0 [template = constants.%.2] -// CHECK:STDOUT: %struct: {.a: i32, .b: i32} = struct_value (%.loc29_20, %.loc29_28) [template = constants.%struct.3] -// CHECK:STDOUT: %.loc29_29.2: {.a: i32, .b: i32} = converted %.loc29_29.1, %struct [template = constants.%struct.3] +// CHECK:STDOUT: %struct: {.a: i32, .b: i32} = struct_value (%.loc29_20, %.loc29_28) [template = constants.%struct] +// CHECK:STDOUT: %.loc29_29.2: {.a: i32, .b: i32} = converted %.loc29_29.1, %struct [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, -// CHECK:STDOUT: %int.make_type_32.loc34_19: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc34_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc34_19.1: type = value_of_initializer %int.make_type_32.loc34_19 [template = i32] // CHECK:STDOUT: %.loc34_19.2: type = converted %int.make_type_32.loc34_19, %.loc34_19.1 [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc34_28: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc34_28: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc34_28.1: type = value_of_initializer %int.make_type_32.loc34_28 [template = i32] // CHECK:STDOUT: %.loc34_28.2: type = converted %int.make_type_32.loc34_28, %.loc34_28.1 [template = i32] // CHECK:STDOUT: %.loc34_31: type = struct_type {.a: i32, .b: i32} [template = constants.%.5] diff --git a/toolchain/check/testdata/index/fail_name_not_found.carbon b/toolchain/check/testdata/index/fail_name_not_found.carbon index d853dcf23e4a..2169ab51317a 100644 --- a/toolchain/check/testdata/index/fail_name_not_found.carbon +++ b/toolchain/check/testdata/index/fail_name_not_found.carbon @@ -18,11 +18,11 @@ fn Main() { // CHECK:STDOUT: --- fail_name_not_found.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Main: type = fn_type @Main [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Main = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] +// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -32,13 +32,13 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc15_10.2: type = converted %int.make_type_32, %.loc15_10.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b diff --git a/toolchain/check/testdata/index/fail_negative_indexing.carbon b/toolchain/check/testdata/index/fail_negative_indexing.carbon index 6c0a08afccb4..0706ae028b7c 100644 --- a/toolchain/check/testdata/index/fail_negative_indexing.carbon +++ b/toolchain/check/testdata/index/fail_negative_indexing.carbon @@ -17,9 +17,9 @@ var b: i32 = a[-10]; // CHECK:STDOUT: --- fail_negative_indexing.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %.4: type = ptr_type (i32, i32) [template] @@ -29,10 +29,10 @@ var b: i32 = a[-10]; // CHECK:STDOUT: %.7: i32 = int_literal 10 [template] // CHECK:STDOUT: %.8: type = interface_type @Negate [template] // CHECK:STDOUT: %Self: Negate = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Op: type = fn_type @Op [template] -// CHECK:STDOUT: %struct.2: Op = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type @Negate, Op [template] -// CHECK:STDOUT: %.10: = assoc_entity element0, file.%import_ref.8 [template] +// CHECK:STDOUT: %Op.type: type = fn_type @Op [template] +// CHECK:STDOUT: %Op: = struct_value () [template] +// CHECK:STDOUT: %.9: type = assoc_entity_type @Negate, [template] +// CHECK:STDOUT: %.10: in Negate> = assoc_entity element0, file.%import_ref.8 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -42,10 +42,10 @@ var b: i32 = a[-10]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_17.1: (type, type) = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) // CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_32.loc11_9, %.loc11_17.2 [template = i32] @@ -54,15 +54,15 @@ var b: i32 = a[-10]; // CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %a.var: ref (i32, i32) = var a // CHECK:STDOUT: %a: ref (i32, i32) = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_32.loc15, %.loc15_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var // CHECK:STDOUT: %import_ref.4: type = import_ref ir4, inst+67, loaded [template = constants.%.8] // CHECK:STDOUT: %import_ref.5 = import_ref ir4, inst+69, unloaded -// CHECK:STDOUT: %import_ref.6: = import_ref ir4, inst+84, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.6: in Negate> = import_ref ir4, inst+84, loaded [template = constants.%.10] // CHECK:STDOUT: %import_ref.7 = import_ref ir4, inst+80, unloaded // CHECK:STDOUT: %import_ref.8 = import_ref ir4, inst+80, unloaded // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/index/fail_non_deterministic_type.carbon b/toolchain/check/testdata/index/fail_non_deterministic_type.carbon index 0384cbb6d9c4..aeed7401d8d4 100644 --- a/toolchain/check/testdata/index/fail_non_deterministic_type.carbon +++ b/toolchain/check/testdata/index/fail_non_deterministic_type.carbon @@ -18,9 +18,9 @@ var c: i32 = a[b]; // CHECK:STDOUT: --- fail_non_deterministic_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %.4: type = ptr_type (i32, i32) [template] @@ -38,10 +38,10 @@ var c: i32 = a[b]; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%struct() [template = i32] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_17.1: (type, type) = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) // CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_32.loc11_9, %.loc11_17.2 [template = i32] @@ -50,14 +50,14 @@ var c: i32 = a[b]; // CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %a.var: ref (i32, i32) = var a // CHECK:STDOUT: %a: ref (i32, i32) = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_32.loc12, %.loc12_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_8.1: type = value_of_initializer %int.make_type_32.loc16 [template = i32] // CHECK:STDOUT: %.loc16_8.2: type = converted %int.make_type_32.loc16, %.loc16_8.1 [template = i32] // CHECK:STDOUT: %c.var: ref i32 = var c diff --git a/toolchain/check/testdata/index/fail_non_tuple_access.carbon b/toolchain/check/testdata/index/fail_non_tuple_access.carbon index 923db4b1299c..09c09adb663d 100644 --- a/toolchain/check/testdata/index/fail_non_tuple_access.carbon +++ b/toolchain/check/testdata/index/fail_non_tuple_access.carbon @@ -18,9 +18,9 @@ fn Main() { // CHECK:STDOUT: --- fail_non_tuple_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Main: type = fn_type @Main [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Main = struct_value () [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] // CHECK:STDOUT: } @@ -31,7 +31,7 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { diff --git a/toolchain/check/testdata/index/fail_out_of_bound_not_literal.carbon b/toolchain/check/testdata/index/fail_out_of_bound_not_literal.carbon index 8edc1d14240a..a702fa9c5654 100644 --- a/toolchain/check/testdata/index/fail_out_of_bound_not_literal.carbon +++ b/toolchain/check/testdata/index/fail_out_of_bound_not_literal.carbon @@ -17,9 +17,9 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: --- fail_out_of_bound_not_literal.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %.4: type = ptr_type (i32, i32) [template] @@ -28,7 +28,7 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: %tuple: (i32, i32) = tuple_value (%.5, %.6) [template] // CHECK:STDOUT: %.7: i32 = int_literal 2 [template] // CHECK:STDOUT: %.8: type = struct_type {.index: i32} [template] -// CHECK:STDOUT: %struct.2: {.index: i32} = struct_value (%.7) [template] +// CHECK:STDOUT: %struct: {.index: i32} = struct_value (%.7) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -38,10 +38,10 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_17.1: (type, type) = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) // CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_32.loc11_9, %.loc11_17.2 [template = i32] @@ -50,8 +50,8 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %a.var: ref (i32, i32) = var a // CHECK:STDOUT: %a: ref (i32, i32) = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_32.loc15, %.loc15_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b @@ -75,8 +75,8 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: %a.ref: ref (i32, i32) = name_ref a, file.%a // CHECK:STDOUT: %.loc15_26: i32 = int_literal 2 [template = constants.%.7] // CHECK:STDOUT: %.loc15_27.1: {.index: i32} = struct_literal (%.loc15_26) -// CHECK:STDOUT: %struct: {.index: i32} = struct_value (%.loc15_26) [template = constants.%struct.2] -// CHECK:STDOUT: %.loc15_27.2: {.index: i32} = converted %.loc15_27.1, %struct [template = constants.%struct.2] +// CHECK:STDOUT: %struct: {.index: i32} = struct_value (%.loc15_26) [template = constants.%struct] +// CHECK:STDOUT: %.loc15_27.2: {.index: i32} = converted %.loc15_27.1, %struct [template = constants.%struct] // CHECK:STDOUT: %.loc15_28: i32 = struct_access %.loc15_27.2, element0 [template = constants.%.7] // CHECK:STDOUT: %.loc15_34: ref = tuple_index %a.ref, // CHECK:STDOUT: assign file.%b.var, diff --git a/toolchain/check/testdata/index/fail_tuple_index_error.carbon b/toolchain/check/testdata/index/fail_tuple_index_error.carbon index 19c54283c2bf..7bfff555803e 100644 --- a/toolchain/check/testdata/index/fail_tuple_index_error.carbon +++ b/toolchain/check/testdata/index/fail_tuple_index_error.carbon @@ -17,9 +17,9 @@ var b: i32 = a[oops]; // CHECK:STDOUT: --- fail_tuple_index_error.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %.4: type = ptr_type (i32, i32) [template] @@ -35,10 +35,10 @@ var b: i32 = a[oops]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%struct() [template = i32] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_17.1: (type, type) = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) // CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_32.loc11_9, %.loc11_17.2 [template = i32] @@ -47,8 +47,8 @@ var b: i32 = a[oops]; // CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %a.var: ref (i32, i32) = var a // CHECK:STDOUT: %a: ref (i32, i32) = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_32.loc15, %.loc15_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b diff --git a/toolchain/check/testdata/index/fail_tuple_large_index.carbon b/toolchain/check/testdata/index/fail_tuple_large_index.carbon index d7662989370f..3cf186d9bd5b 100644 --- a/toolchain/check/testdata/index/fail_tuple_large_index.carbon +++ b/toolchain/check/testdata/index/fail_tuple_large_index.carbon @@ -23,9 +23,9 @@ var d: i32 = b[0x7FFF_FFFF]; // CHECK:STDOUT: --- fail_tuple_large_index.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32) [template] // CHECK:STDOUT: %.4: i32 = int_literal 12 [template] @@ -43,30 +43,30 @@ var d: i32 = b[0x7FFF_FFFF]; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_13.1: (type,) = tuple_literal (%int.make_type_32.loc11) // CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_13.3: type = converted %int.make_type_32.loc11, %.loc11_13.2 [template = i32] // CHECK:STDOUT: %.loc11_13.4: type = converted %.loc11_13.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %a.var: ref (i32,) = var a // CHECK:STDOUT: %a: ref (i32,) = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_13.1: (type,) = tuple_literal (%int.make_type_32.loc12) // CHECK:STDOUT: %.loc12_13.2: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_13.3: type = converted %int.make_type_32.loc12, %.loc12_13.2 [template = i32] // CHECK:STDOUT: %.loc12_13.4: type = converted %.loc12_13.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %b.var: ref (i32,) = var b // CHECK:STDOUT: %b: ref (i32,) = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_8.1: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_8.2: type = converted %int.make_type_32.loc17, %.loc17_8.1 [template = i32] // CHECK:STDOUT: %c.var: ref i32 = var c // CHECK:STDOUT: %c: ref i32 = bind_name c, %c.var -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_8.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_8.2: type = converted %int.make_type_32.loc21, %.loc21_8.1 [template = i32] // CHECK:STDOUT: %d.var: ref i32 = var d diff --git a/toolchain/check/testdata/index/fail_tuple_non_int_indexing.carbon b/toolchain/check/testdata/index/fail_tuple_non_int_indexing.carbon index 2a7901e55cfd..88312e57c306 100644 --- a/toolchain/check/testdata/index/fail_tuple_non_int_indexing.carbon +++ b/toolchain/check/testdata/index/fail_tuple_non_int_indexing.carbon @@ -17,9 +17,9 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: --- fail_tuple_non_int_indexing.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %.4: type = ptr_type (i32, i32) [template] @@ -36,10 +36,10 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%struct() [template = i32] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_17.1: (type, type) = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) // CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_32.loc11_9, %.loc11_17.2 [template = i32] @@ -48,8 +48,8 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %a.var: ref (i32, i32) = var a // CHECK:STDOUT: %a: ref (i32, i32) = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_32.loc15, %.loc15_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b diff --git a/toolchain/check/testdata/index/fail_tuple_out_of_bound_access.carbon b/toolchain/check/testdata/index/fail_tuple_out_of_bound_access.carbon index c3cdc9bece6d..2b921149c9f2 100644 --- a/toolchain/check/testdata/index/fail_tuple_out_of_bound_access.carbon +++ b/toolchain/check/testdata/index/fail_tuple_out_of_bound_access.carbon @@ -17,9 +17,9 @@ var b: i32 = a[2]; // CHECK:STDOUT: --- fail_tuple_out_of_bound_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %.4: type = ptr_type (i32, i32) [template] @@ -36,10 +36,10 @@ var b: i32 = a[2]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%struct() [template = i32] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_17.1: (type, type) = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) // CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_32.loc11_9, %.loc11_17.2 [template = i32] @@ -48,8 +48,8 @@ var b: i32 = a[2]; // CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %a.var: ref (i32, i32) = var a // CHECK:STDOUT: %a: ref (i32, i32) = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_32.loc15, %.loc15_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b diff --git a/toolchain/check/testdata/index/index_not_literal.carbon b/toolchain/check/testdata/index/index_not_literal.carbon index 801a38033325..1d8daf9b91f1 100644 --- a/toolchain/check/testdata/index/index_not_literal.carbon +++ b/toolchain/check/testdata/index/index_not_literal.carbon @@ -14,9 +14,9 @@ var b: i32 = a[{.index = 1}.index]; // CHECK:STDOUT: --- index_not_literal.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %.4: type = ptr_type (i32, i32) [template] @@ -25,7 +25,7 @@ var b: i32 = a[{.index = 1}.index]; // CHECK:STDOUT: %tuple: (i32, i32) = tuple_value (%.5, %.6) [template] // CHECK:STDOUT: %.7: i32 = int_literal 1 [template] // CHECK:STDOUT: %.8: type = struct_type {.index: i32} [template] -// CHECK:STDOUT: %struct.2: {.index: i32} = struct_value (%.7) [template] +// CHECK:STDOUT: %struct: {.index: i32} = struct_value (%.7) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -35,10 +35,10 @@ var b: i32 = a[{.index = 1}.index]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_17.1: (type, type) = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) // CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_32.loc11_9, %.loc11_17.2 [template = i32] @@ -47,8 +47,8 @@ var b: i32 = a[{.index = 1}.index]; // CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %a.var: ref (i32, i32) = var a // CHECK:STDOUT: %a: ref (i32, i32) = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_32.loc12, %.loc12_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b @@ -72,8 +72,8 @@ var b: i32 = a[{.index = 1}.index]; // CHECK:STDOUT: %a.ref: ref (i32, i32) = name_ref a, file.%a // CHECK:STDOUT: %.loc12_26: i32 = int_literal 1 [template = constants.%.7] // CHECK:STDOUT: %.loc12_27.1: {.index: i32} = struct_literal (%.loc12_26) -// CHECK:STDOUT: %struct: {.index: i32} = struct_value (%.loc12_26) [template = constants.%struct.2] -// CHECK:STDOUT: %.loc12_27.2: {.index: i32} = converted %.loc12_27.1, %struct [template = constants.%struct.2] +// CHECK:STDOUT: %struct: {.index: i32} = struct_value (%.loc12_26) [template = constants.%struct] +// CHECK:STDOUT: %.loc12_27.2: {.index: i32} = converted %.loc12_27.1, %struct [template = constants.%struct] // CHECK:STDOUT: %.loc12_28: i32 = struct_access %.loc12_27.2, element0 [template = constants.%.7] // CHECK:STDOUT: %.loc12_34.1: ref i32 = tuple_index %a.ref, %.loc12_28 // CHECK:STDOUT: %.loc12_34.2: i32 = bind_value %.loc12_34.1 diff --git a/toolchain/check/testdata/index/tuple_element_access.carbon b/toolchain/check/testdata/index/tuple_element_access.carbon index 4b90d387b988..97263cc6b52a 100644 --- a/toolchain/check/testdata/index/tuple_element_access.carbon +++ b/toolchain/check/testdata/index/tuple_element_access.carbon @@ -15,9 +15,9 @@ var c: i32 = b[0]; // CHECK:STDOUT: --- tuple_element_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32) [template] // CHECK:STDOUT: %.4: i32 = int_literal 12 [template] @@ -33,24 +33,24 @@ var c: i32 = b[0]; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_13.1: (type,) = tuple_literal (%int.make_type_32.loc11) // CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_13.3: type = converted %int.make_type_32.loc11, %.loc11_13.2 [template = i32] // CHECK:STDOUT: %.loc11_13.4: type = converted %.loc11_13.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %a.var: ref (i32,) = var a // CHECK:STDOUT: %a: ref (i32,) = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_13.1: (type,) = tuple_literal (%int.make_type_32.loc12) // CHECK:STDOUT: %.loc12_13.2: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_13.3: type = converted %int.make_type_32.loc12, %.loc12_13.2 [template = i32] // CHECK:STDOUT: %.loc12_13.4: type = converted %.loc12_13.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %b.var: ref (i32,) = var b // CHECK:STDOUT: %b: ref (i32,) = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_8.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_8.2: type = converted %int.make_type_32.loc13, %.loc13_8.1 [template = i32] // CHECK:STDOUT: %c.var: ref i32 = var c diff --git a/toolchain/check/testdata/index/tuple_return_value_access.carbon b/toolchain/check/testdata/index/tuple_return_value_access.carbon index fdf32fd36313..ec94ec66ab43 100644 --- a/toolchain/check/testdata/index/tuple_return_value_access.carbon +++ b/toolchain/check/testdata/index/tuple_return_value_access.carbon @@ -17,17 +17,17 @@ fn Run() -> i32 { // CHECK:STDOUT: --- tuple_return_value_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32) [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.4: i32 = int_literal 0 [template] // CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.4) [template] -// CHECK:STDOUT: %Run: type = fn_type @Run [template] -// CHECK:STDOUT: %struct.3: Run = struct_value () [template] +// CHECK:STDOUT: %Run.type: type = fn_type @Run [template] +// CHECK:STDOUT: %Run: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -37,18 +37,18 @@ fn Run() -> i32 { // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_16.1: (type,) = tuple_literal (%int.make_type_32.loc11) // CHECK:STDOUT: %.loc11_16.2: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_16.3: type = converted %int.make_type_32.loc11, %.loc11_16.2 [template = i32] // CHECK:STDOUT: %.loc11_16.4: type = converted %.loc11_16.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: @F.%return: ref (i32,) = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Run.decl: Run = fn_decl @Run [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] { +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_13.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_13.2: type = converted %int.make_type_32.loc13, %.loc13_13.1 [template = i32] // CHECK:STDOUT: @Run.%return: ref i32 = var @@ -68,7 +68,7 @@ fn Run() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init (i32,) = call %F.ref() // CHECK:STDOUT: %.loc14_14: i32 = int_literal 0 [template = constants.%.4] // CHECK:STDOUT: %.loc14_11.1: ref (i32,) = temporary_storage diff --git a/toolchain/check/testdata/interface/assoc_const.carbon b/toolchain/check/testdata/interface/assoc_const.carbon index f521cc1037f8..3c16798ea28d 100644 --- a/toolchain/check/testdata/interface/assoc_const.carbon +++ b/toolchain/check/testdata/interface/assoc_const.carbon @@ -20,9 +20,9 @@ interface I { // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.2: type = assoc_entity_type @I, type [template] // CHECK:STDOUT: %.3: = assoc_entity element0, @I.%T [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.4: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.5: type = assoc_entity_type @I, i32 [template] // CHECK:STDOUT: %.6: = assoc_entity element1, @I.%N [template] // CHECK:STDOUT: } @@ -34,14 +34,14 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] // CHECK:STDOUT: %.loc12: = assoc_entity element0, %T [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc13_11.2: type = converted %int.make_type_32, %.loc13_11.1 [template = i32] // CHECK:STDOUT: %N: i32 = assoc_const_decl N [template] diff --git a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon index 561348ed2d08..047e1a171dc6 100644 --- a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon +++ b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon @@ -25,9 +25,9 @@ interface I { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.3: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.4: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %.5: type = assoc_entity_type @I, type [template] @@ -44,15 +44,15 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %int.make_type_32.loc16_27: init type = call constants.%struct() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc16_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc16_27: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc16_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_35: (type, type) = tuple_literal (%int.make_type_32.loc16_27, %int.make_type_32.loc16_32) // CHECK:STDOUT: %.loc16_36.1: type = value_of_initializer %int.make_type_32.loc16_27 [template = i32] // CHECK:STDOUT: %.loc16_36.2: type = converted %int.make_type_32.loc16_27, %.loc16_36.1 [template = i32] @@ -61,7 +61,7 @@ interface I { // CHECK:STDOUT: %.loc16_36.5: type = converted %.loc16_35, constants.%.4 [template = constants.%.4] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] // CHECK:STDOUT: %.loc16_36.6: = assoc_entity element0, %T [template = constants.%.6] -// CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc20_19.1: type = value_of_initializer %int.make_type_32.loc20 [template = i32] // CHECK:STDOUT: %.loc20_19.2: type = converted %int.make_type_32.loc20, %.loc20_19.1 [template = i32] // CHECK:STDOUT: %.loc20_25: i32 = int_literal 42 [template = constants.%.7] diff --git a/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon b/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon index 41c97d396afd..b18290b0017b 100644 --- a/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon +++ b/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon @@ -26,17 +26,17 @@ interface Interface { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Interface [template] // CHECK:STDOUT: %Self: Interface = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Interface, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @Interface.%F.decl [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @Interface, G [template] -// CHECK:STDOUT: %.6: = assoc_entity element1, @Interface.%G.decl [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Interface, [template] +// CHECK:STDOUT: %.4: in Interface> = assoc_entity element0, @Interface.%F.decl [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @Interface, [template] +// CHECK:STDOUT: %.6: in Interface> = assoc_entity element1, @Interface.%G.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -46,32 +46,32 @@ interface Interface { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { // CHECK:STDOUT: %Self: Interface = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] {} -// CHECK:STDOUT: %.loc16: = assoc_entity element0, %F.decl [template = constants.%.4] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc21_19: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %.loc16: in Interface> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %int.make_type_32.loc21_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_19.1: type = value_of_initializer %int.make_type_32.loc21_19 [template = i32] // CHECK:STDOUT: %.loc21_19.2: type = converted %int.make_type_32.loc21_19, %.loc21_19.1 [template = i32] // CHECK:STDOUT: %a.loc21_16.1: i32 = param a // CHECK:STDOUT: %a.loc21_16.2: i32 = bind_name a, %a.loc21_16.1 -// CHECK:STDOUT: %int.make_type_32.loc21_27: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc21_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_27.1: type = value_of_initializer %int.make_type_32.loc21_27 [template = i32] // CHECK:STDOUT: %.loc21_27.2: type = converted %int.make_type_32.loc21_27, %.loc21_27.1 [template = i32] // CHECK:STDOUT: %b.loc21_24.1: i32 = param b // CHECK:STDOUT: %b.loc21_24.2: i32 = bind_name b, %b.loc21_24.1 -// CHECK:STDOUT: %int.make_type_32.loc21_35: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc21_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_35.1: type = value_of_initializer %int.make_type_32.loc21_35 [template = i32] // CHECK:STDOUT: %.loc21_35.2: type = converted %int.make_type_32.loc21_35, %.loc21_35.1 [template = i32] // CHECK:STDOUT: %return.var: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc21_39: = assoc_entity element1, %G.decl [template = constants.%.6] +// CHECK:STDOUT: %.loc21_39: in Interface> = assoc_entity element1, %G.decl [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon index 93d9570d2967..14b000de2774 100644 --- a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon +++ b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon @@ -44,21 +44,21 @@ fn Interface.G(a: i32, b: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Interface [template] // CHECK:STDOUT: %Self: Interface = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Interface, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @Interface.%F.decl [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @Interface, G [template] -// CHECK:STDOUT: %.6: = assoc_entity element1, @Interface.%G.decl [template] -// CHECK:STDOUT: %.7: type = fn_type @.1 [template] -// CHECK:STDOUT: %struct.4: = struct_value () [template] -// CHECK:STDOUT: %.8: type = fn_type @.2 [template] -// CHECK:STDOUT: %struct.5: = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Interface, [template] +// CHECK:STDOUT: %.4: in Interface> = assoc_entity element0, @Interface.%F.decl [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @Interface, [template] +// CHECK:STDOUT: %.6: in Interface> = assoc_entity element1, @Interface.%G.decl [template] +// CHECK:STDOUT: %.type.1: type = fn_type @.1 [template] +// CHECK:STDOUT: %.7: > = struct_value () [template] +// CHECK:STDOUT: %.type.2: type = fn_type @.2 [template] +// CHECK:STDOUT: %.8: > = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -68,25 +68,25 @@ fn Interface.G(a: i32, b: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %.decl.loc32: = fn_decl @.1 [template = constants.%struct.4] {} -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %.decl.loc40: = fn_decl @.2 [template = constants.%struct.5] { -// CHECK:STDOUT: %int.make_type_32.loc40_19: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %.decl.loc32: > = fn_decl @.1 [template = constants.%.7] {} +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %.decl.loc40: > = fn_decl @.2 [template = constants.%.8] { +// CHECK:STDOUT: %int.make_type_32.loc40_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc40_19.1: type = value_of_initializer %int.make_type_32.loc40_19 [template = i32] // CHECK:STDOUT: %.loc40_19.2: type = converted %int.make_type_32.loc40_19, %.loc40_19.1 [template = i32] // CHECK:STDOUT: %a.loc40_16.1: i32 = param a // CHECK:STDOUT: @.2.%a: i32 = bind_name a, %a.loc40_16.1 -// CHECK:STDOUT: %int.make_type_32.loc40_27: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc40_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc40_27.1: type = value_of_initializer %int.make_type_32.loc40_27 [template = i32] // CHECK:STDOUT: %.loc40_27.2: type = converted %int.make_type_32.loc40_27, %.loc40_27.1 [template = i32] // CHECK:STDOUT: %b.loc40_24.1: i32 = param b // CHECK:STDOUT: @.2.%b: i32 = bind_name b, %b.loc40_24.1 -// CHECK:STDOUT: %int.make_type_32.loc40_35: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc40_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc40_35.1: type = value_of_initializer %int.make_type_32.loc40_35 [template = i32] // CHECK:STDOUT: %.loc40_35.2: type = converted %int.make_type_32.loc40_35, %.loc40_35.1 [template = i32] // CHECK:STDOUT: @.2.%return: ref i32 = var @@ -95,25 +95,25 @@ fn Interface.G(a: i32, b: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { // CHECK:STDOUT: %Self: Interface = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] {} -// CHECK:STDOUT: %.loc16: = assoc_entity element0, %F.decl [template = constants.%.4] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc22_19: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %.loc16: in Interface> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %int.make_type_32.loc22_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_19.1: type = value_of_initializer %int.make_type_32.loc22_19 [template = i32] // CHECK:STDOUT: %.loc22_19.2: type = converted %int.make_type_32.loc22_19, %.loc22_19.1 [template = i32] // CHECK:STDOUT: %a.loc22_16.1: i32 = param a // CHECK:STDOUT: %a.loc22_16.2: i32 = bind_name a, %a.loc22_16.1 -// CHECK:STDOUT: %int.make_type_32.loc22_27: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc22_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_27.1: type = value_of_initializer %int.make_type_32.loc22_27 [template = i32] // CHECK:STDOUT: %.loc22_27.2: type = converted %int.make_type_32.loc22_27, %.loc22_27.1 [template = i32] // CHECK:STDOUT: %b.loc22_24.1: i32 = param b // CHECK:STDOUT: %b.loc22_24.2: i32 = bind_name b, %b.loc22_24.1 -// CHECK:STDOUT: %int.make_type_32.loc22_35: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc22_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_35.1: type = value_of_initializer %int.make_type_32.loc22_35 [template = i32] // CHECK:STDOUT: %.loc22_35.2: type = converted %int.make_type_32.loc22_35, %.loc22_35.1 [template = i32] // CHECK:STDOUT: %return.var: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22_38: = assoc_entity element1, %G.decl [template = constants.%.6] +// CHECK:STDOUT: %.loc22_38: in Interface> = assoc_entity element1, %G.decl [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/as_type.carbon b/toolchain/check/testdata/interface/no_prelude/as_type.carbon index d231c363b4e3..fb500d746d2b 100644 --- a/toolchain/check/testdata/interface/no_prelude/as_type.carbon +++ b/toolchain/check/testdata/interface/no_prelude/as_type.carbon @@ -17,9 +17,9 @@ fn F(e: Empty) {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Empty [template] // CHECK:STDOUT: %Self: Empty = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -28,7 +28,7 @@ fn F(e: Empty) {} // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%.1] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, %Empty.decl [template = constants.%.1] // CHECK:STDOUT: %e.loc13_6.1: Empty = param e // CHECK:STDOUT: @F.%e: Empty = bind_name e, %e.loc13_6.1 diff --git a/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon b/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon index a3102a231f50..e669f1a86c9d 100644 --- a/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon +++ b/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon @@ -20,9 +20,9 @@ fn F(T:! Empty) { // CHECK:STDOUT: %.1: type = interface_type @Empty [template] // CHECK:STDOUT: %Self: Empty = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %T: Empty = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -31,7 +31,7 @@ fn F(T:! Empty) { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%.1] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, %Empty.decl [template = constants.%.1] // CHECK:STDOUT: %T.loc13_6.1: Empty = param T // CHECK:STDOUT: @F.%T: Empty = bind_symbolic_name T 0, %T.loc13_6.1 [symbolic = constants.%T] diff --git a/toolchain/check/testdata/interface/no_prelude/basic.carbon b/toolchain/check/testdata/interface/no_prelude/basic.carbon index 607e48ee1e8a..ed5645caf52b 100644 --- a/toolchain/check/testdata/interface/no_prelude/basic.carbon +++ b/toolchain/check/testdata/interface/no_prelude/basic.carbon @@ -24,11 +24,11 @@ interface ForwardDeclared { // CHECK:STDOUT: %Self.1: Empty = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.2: type = interface_type @ForwardDeclared [template] // CHECK:STDOUT: %Self.2: ForwardDeclared = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type @ForwardDeclared, F [template] -// CHECK:STDOUT: %.5: = assoc_entity element0, @ForwardDeclared.%F.decl [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type @ForwardDeclared, [template] +// CHECK:STDOUT: %.5: in ForwardDeclared> = assoc_entity element0, @ForwardDeclared.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -51,8 +51,8 @@ interface ForwardDeclared { // CHECK:STDOUT: // CHECK:STDOUT: interface @ForwardDeclared { // CHECK:STDOUT: %Self: ForwardDeclared = bind_symbolic_name Self 0 [symbolic = constants.%Self.2] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] {} -// CHECK:STDOUT: %.loc17: = assoc_entity element0, %F.decl [template = constants.%.5] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %.loc17: in ForwardDeclared> = assoc_entity element0, %F.decl [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/default_fn.carbon b/toolchain/check/testdata/interface/no_prelude/default_fn.carbon index 0d672be06db2..ac372a2e5caf 100644 --- a/toolchain/check/testdata/interface/no_prelude/default_fn.carbon +++ b/toolchain/check/testdata/interface/no_prelude/default_fn.carbon @@ -29,17 +29,17 @@ class C { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = interface_type @I [template] // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @I, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @I.%F.decl [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%struct.2) [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @I, [template] +// CHECK:STDOUT: %.4: in I> = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] // CHECK:STDOUT: %.6: type = struct_type {} [template] // CHECK:STDOUT: %.7: type = ptr_type {} [template] -// CHECK:STDOUT: %struct.3: C = struct_value () [template] +// CHECK:STDOUT: %struct: C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -51,8 +51,8 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] {} -// CHECK:STDOUT: %.loc14: = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc14: in I> = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -61,7 +61,7 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: C as I { -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.2] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} // CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -87,13 +87,13 @@ class C { // CHECK:STDOUT: %c.var: ref C = var c // CHECK:STDOUT: %c: ref C = bind_name c, %c.var // CHECK:STDOUT: %.loc16_19.1: {} = struct_literal () -// CHECK:STDOUT: %.loc16_19.2: init C = class_init (), %c.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc16_20: init C = converted %.loc16_19.1, %.loc16_19.2 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc16_19.2: init C = class_init (), %c.var [template = constants.%struct] +// CHECK:STDOUT: %.loc16_20: init C = converted %.loc16_19.1, %.loc16_19.2 [template = constants.%struct] // CHECK:STDOUT: assign %c.var, %.loc16_20 // CHECK:STDOUT: %c.ref: ref C = name_ref c, %c // CHECK:STDOUT: %I.ref: type = name_ref I, @C.%I.decl [template = constants.%.1] -// CHECK:STDOUT: %F.ref: = name_ref F, @I.%.loc14 [template = constants.%.4] -// CHECK:STDOUT: %.1: F = interface_witness_access @impl.%.1, element0 [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: in I> = name_ref F, @I.%.loc14 [template = constants.%.4] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] // CHECK:STDOUT: %F.call: init () = call %.1() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/export_name.carbon b/toolchain/check/testdata/interface/no_prelude/export_name.carbon index f45bfc2e8177..532a1ba81bf0 100644 --- a/toolchain/check/testdata/interface/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/interface/no_prelude/export_name.carbon @@ -87,9 +87,9 @@ fn UseEmpty(i: I) {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %UseEmpty: type = fn_type @UseEmpty [template] +// CHECK:STDOUT: %UseEmpty.type: type = fn_type @UseEmpty [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: UseEmpty = struct_value () [template] +// CHECK:STDOUT: %UseEmpty: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -99,7 +99,7 @@ fn UseEmpty(i: I) {} // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref ir1, inst+7, loaded [template = constants.%.1] // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+6, unloaded -// CHECK:STDOUT: %UseEmpty.decl: UseEmpty = fn_decl @UseEmpty [template = constants.%struct] { +// CHECK:STDOUT: %UseEmpty.decl: = fn_decl @UseEmpty [template = constants.%UseEmpty] { // CHECK:STDOUT: %I.ref: type = name_ref I, %import_ref.1 [template = constants.%.1] // CHECK:STDOUT: %i.loc6_13.1: I = param i // CHECK:STDOUT: @UseEmpty.%i: I = bind_name i, %i.loc6_13.1 diff --git a/toolchain/check/testdata/interface/no_prelude/fail_add_member_outside_definition.carbon b/toolchain/check/testdata/interface/no_prelude/fail_add_member_outside_definition.carbon index 1d7eef16b91d..ca333f943d9f 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_add_member_outside_definition.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_add_member_outside_definition.carbon @@ -36,17 +36,17 @@ interface Outer { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Interface [template] // CHECK:STDOUT: %Self.1: Interface = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] // CHECK:STDOUT: %.3: type = interface_type @Outer [template] // CHECK:STDOUT: %Self.2: Outer = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.4: type = interface_type @Inner [template] // CHECK:STDOUT: %Self.3: Inner = bind_symbolic_name Self 1 [symbolic] -// CHECK:STDOUT: %.5: type = fn_type @.1 [template] -// CHECK:STDOUT: %struct.2: = struct_value () [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.3: F = struct_value () [template] +// CHECK:STDOUT: %.type: type = fn_type @.1 [template] +// CHECK:STDOUT: %.5: > = struct_value () [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -55,7 +55,7 @@ interface Outer { // CHECK:STDOUT: .Outer = %Outer.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%.1] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} // CHECK:STDOUT: %Outer.decl: type = interface_decl @Outer [template = constants.%.3] {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -71,7 +71,7 @@ interface Outer { // CHECK:STDOUT: interface @Outer { // CHECK:STDOUT: %Self: Outer = bind_symbolic_name Self 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %Inner.decl: type = interface_decl @Inner [template = constants.%.4] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.3] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -81,7 +81,7 @@ interface Outer { // CHECK:STDOUT: // CHECK:STDOUT: interface @Inner { // CHECK:STDOUT: %Self: Inner = bind_symbolic_name Self 1 [symbolic = constants.%Self.3] -// CHECK:STDOUT: %.decl: = fn_decl @.1 [template = constants.%struct.2] {} +// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.5] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon b/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon index 8e927323402d..6fa021ef2bb9 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon @@ -47,11 +47,11 @@ interface Class { } // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Interface [template] // CHECK:STDOUT: %Self.1: Interface = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %Function: type = fn_type @Function [template] -// CHECK:STDOUT: %struct.2: Function = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %Function.type: type = fn_type @Function [template] +// CHECK:STDOUT: %Function: = struct_value () [template] // CHECK:STDOUT: %.3: type = interface_type @.1 [template] // CHECK:STDOUT: %Class: type = class_type @Class [template] // CHECK:STDOUT: %.4: type = interface_type @.2 [template] @@ -66,14 +66,14 @@ interface Class { } // CHECK:STDOUT: } // CHECK:STDOUT: %Interface.decl.loc11: type = interface_decl @Interface [template = constants.%.1] {} // CHECK:STDOUT: %Interface.decl.loc20: type = interface_decl @Interface [template = constants.%.1] {} -// CHECK:STDOUT: %Function.decl: Function = fn_decl @Function [template = constants.%struct.2] {} +// CHECK:STDOUT: %Function.decl: = fn_decl @Function [template = constants.%Function] {} // CHECK:STDOUT: %.decl.loc33: type = interface_decl @.1 [template = constants.%.3] {} // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} // CHECK:STDOUT: %.decl.loc43: type = interface_decl @.2 [template = constants.%.4] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = diff --git a/toolchain/check/testdata/interface/no_prelude/fail_lookup_undefined.carbon b/toolchain/check/testdata/interface/no_prelude/fail_lookup_undefined.carbon index 678c2480afa6..ddc9d5e5b564 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_lookup_undefined.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_lookup_undefined.carbon @@ -53,19 +53,19 @@ interface BeingDefined { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Undefined [template] -// CHECK:STDOUT: %.2: type = fn_type @.1 [template] -// CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: = struct_value () [template] -// CHECK:STDOUT: %Test: type = fn_type @Test [template] -// CHECK:STDOUT: %struct.2: Test = struct_value () [template] +// CHECK:STDOUT: %.type.1: type = fn_type @.1 [template] +// CHECK:STDOUT: %.2: type = tuple_type () [template] +// CHECK:STDOUT: %.3: > = struct_value () [template] +// CHECK:STDOUT: %Test.type: type = fn_type @Test [template] +// CHECK:STDOUT: %Test: = struct_value () [template] // CHECK:STDOUT: %.4: type = interface_type @BeingDefined [template] // CHECK:STDOUT: %Self: BeingDefined = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %H: type = fn_type @H [template] -// CHECK:STDOUT: %struct.3: H = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @BeingDefined, H [template] -// CHECK:STDOUT: %.6: = assoc_entity element0, @BeingDefined.%H.decl [template] -// CHECK:STDOUT: %.7: type = fn_type @.2 [template] -// CHECK:STDOUT: %struct.4: = struct_value () [template] +// CHECK:STDOUT: %H.type: type = fn_type @H [template] +// CHECK:STDOUT: %H: = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @BeingDefined, [template] +// CHECK:STDOUT: %.6: in BeingDefined> = assoc_entity element0, @BeingDefined.%H.decl [template] +// CHECK:STDOUT: %.type.2: type = fn_type @.2 [template] +// CHECK:STDOUT: %.7: > = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -75,8 +75,8 @@ interface BeingDefined { // CHECK:STDOUT: .BeingDefined = %BeingDefined.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Undefined.decl: type = interface_decl @Undefined [template = constants.%.1] {} -// CHECK:STDOUT: %.decl: = fn_decl @.1 [template = constants.%struct.1] {} -// CHECK:STDOUT: %Test.decl: Test = fn_decl @Test [template = constants.%struct.2] {} +// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.3] {} +// CHECK:STDOUT: %Test.decl: = fn_decl @Test [template = constants.%Test] {} // CHECK:STDOUT: %BeingDefined.decl: type = interface_decl @BeingDefined [template = constants.%.4] {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -84,13 +84,13 @@ interface BeingDefined { // CHECK:STDOUT: // CHECK:STDOUT: interface @BeingDefined { // CHECK:STDOUT: %Self: BeingDefined = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %H.decl: H = fn_decl @H [template = constants.%struct.3] { +// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] { // CHECK:STDOUT: %BeingDefined.ref: type = name_ref BeingDefined, file.%BeingDefined.decl [template = constants.%.4] // CHECK:STDOUT: %T.ref: = name_ref T, [template = ] // CHECK:STDOUT: %return.var: ref = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc45: = assoc_entity element0, %H.decl [template = constants.%.6] -// CHECK:STDOUT: %.decl: = fn_decl @.2 [template = constants.%struct.4] {} +// CHECK:STDOUT: %.loc45: in BeingDefined> = assoc_entity element0, %H.decl [template = constants.%.6] +// CHECK:STDOUT: %.decl: > = fn_decl @.2 [template = constants.%.7] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon b/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon index 0dca3d767417..9229ec03f237 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon @@ -15,7 +15,7 @@ interface Interface { } fn F() { - // CHECK:STDERR: fail_member_lookup.carbon:[[@LINE+4]]:3: ERROR: Value of type `` is not callable. + // CHECK:STDERR: fail_member_lookup.carbon:[[@LINE+4]]:3: ERROR: Value of type ` in Interface>` is not callable. // CHECK:STDERR: Interface.F(); // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: @@ -32,15 +32,15 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Interface [template] // CHECK:STDOUT: %Self: Interface = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Interface, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @Interface.%F.decl [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Interface, [template] +// CHECK:STDOUT: %.4: in Interface> = assoc_entity element0, @Interface.%F.decl [template] // CHECK:STDOUT: %.5: type = assoc_entity_type @Interface, type [template] // CHECK:STDOUT: %.6: = assoc_entity element1, @Interface.%T [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -49,13 +49,13 @@ fn F() { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%.1] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.2] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { // CHECK:STDOUT: %Self: Interface = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] {} -// CHECK:STDOUT: %.loc12: = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc12: in Interface> = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] // CHECK:STDOUT: %.loc14: = assoc_entity element1, %T [template = constants.%.6] // CHECK:STDOUT: @@ -71,7 +71,7 @@ fn F() { // CHECK:STDOUT: fn @F.2() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Interface.ref.loc22: type = name_ref Interface, file.%Interface.decl [template = constants.%.1] -// CHECK:STDOUT: %F.ref: = name_ref F, @Interface.%.loc12 [template = constants.%.4] +// CHECK:STDOUT: %F.ref: in Interface> = name_ref F, @Interface.%.loc12 [template = constants.%.4] // CHECK:STDOUT: %Interface.ref.loc27: type = name_ref Interface, file.%Interface.decl [template = constants.%.1] // CHECK:STDOUT: %T.ref: = name_ref T, @Interface.%.loc14 [template = constants.%.6] // CHECK:STDOUT: %v.var: ref = var v diff --git a/toolchain/check/testdata/interface/no_prelude/fail_redeclare_member.carbon b/toolchain/check/testdata/interface/no_prelude/fail_redeclare_member.carbon index 30e224b04d35..ae79278552fc 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_redeclare_member.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_redeclare_member.carbon @@ -24,13 +24,13 @@ interface Interface { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Interface [template] // CHECK:STDOUT: %Self: Interface = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Interface, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @Interface.%F.decl [template] -// CHECK:STDOUT: %.5: type = fn_type @.1 [template] -// CHECK:STDOUT: %struct.2: = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Interface, [template] +// CHECK:STDOUT: %.4: in Interface> = assoc_entity element0, @Interface.%F.decl [template] +// CHECK:STDOUT: %.type: type = fn_type @.1 [template] +// CHECK:STDOUT: %.5: > = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -42,9 +42,9 @@ interface Interface { // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { // CHECK:STDOUT: %Self: Interface = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] {} -// CHECK:STDOUT: %.loc12: = assoc_entity element0, %F.decl [template = constants.%.4] -// CHECK:STDOUT: %.decl: = fn_decl @.1 [template = constants.%struct.2] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %.loc12: in Interface> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.5] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon b/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon index 51a35edc85ef..49cc0f9d5a21 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon @@ -11,7 +11,7 @@ interface Interface { fn F(); } fn CallStatic(T:! Interface) { - // CHECK:STDERR: fail_todo_facet_lookup.carbon:[[@LINE+4]]:3: ERROR: Value of type `` is not callable. + // CHECK:STDERR: fail_todo_facet_lookup.carbon:[[@LINE+4]]:3: ERROR: Value of type ` in Interface>` is not callable. // CHECK:STDERR: T.F(); // CHECK:STDERR: ^~~~ // CHECK:STDERR: @@ -30,16 +30,16 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Interface [template] // CHECK:STDOUT: %Self: Interface = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Interface, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @Interface.%F.decl [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Interface, [template] +// CHECK:STDOUT: %.4: in Interface> = assoc_entity element0, @Interface.%F.decl [template] // CHECK:STDOUT: %T: Interface = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %CallStatic: type = fn_type @CallStatic [template] -// CHECK:STDOUT: %struct.2: CallStatic = struct_value () [template] -// CHECK:STDOUT: %CallFacet: type = fn_type @CallFacet [template] -// CHECK:STDOUT: %struct.3: CallFacet = struct_value () [template] +// CHECK:STDOUT: %CallStatic.type: type = fn_type @CallStatic [template] +// CHECK:STDOUT: %CallStatic: = struct_value () [template] +// CHECK:STDOUT: %CallFacet.type: type = fn_type @CallFacet [template] +// CHECK:STDOUT: %CallFacet: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -49,12 +49,12 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: .CallFacet = %CallFacet.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%.1] {} -// CHECK:STDOUT: %CallStatic.decl: CallStatic = fn_decl @CallStatic [template = constants.%struct.2] { +// CHECK:STDOUT: %CallStatic.decl: = fn_decl @CallStatic [template = constants.%CallStatic] { // CHECK:STDOUT: %Interface.ref.loc13: type = name_ref Interface, %Interface.decl [template = constants.%.1] // CHECK:STDOUT: %T.loc13_15.1: Interface = param T // CHECK:STDOUT: @CallStatic.%T: Interface = bind_symbolic_name T 0, %T.loc13_15.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %CallFacet.decl: CallFacet = fn_decl @CallFacet [template = constants.%struct.3] { +// CHECK:STDOUT: %CallFacet.decl: = fn_decl @CallFacet [template = constants.%CallFacet] { // CHECK:STDOUT: %Interface.ref.loc21: type = name_ref Interface, %Interface.decl [template = constants.%.1] // CHECK:STDOUT: %T.loc21_14.1: Interface = param T // CHECK:STDOUT: @CallFacet.%T: Interface = bind_symbolic_name T 0, %T.loc21_14.1 [symbolic = constants.%T] @@ -68,8 +68,8 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { // CHECK:STDOUT: %Self: Interface = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] {} -// CHECK:STDOUT: %.loc11: = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %.loc11: in Interface> = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -82,7 +82,7 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: fn @CallStatic(%T: Interface) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %T.ref: Interface = name_ref T, %T [symbolic = constants.%T] -// CHECK:STDOUT: %F.ref: = name_ref F, @Interface.%.loc11 [template = constants.%.4] +// CHECK:STDOUT: %F.ref: in Interface> = name_ref F, @Interface.%.loc11 [template = constants.%.4] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon b/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon index b59e97b60e70..ac42da109028 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon @@ -27,13 +27,13 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %.1: type = interface_type @I [template] // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 1 [symbolic] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @I, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @I.%F.decl [template] -// CHECK:STDOUT: %.5: type = fn_type @.1 [template] -// CHECK:STDOUT: %struct.2: = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @I, [template] +// CHECK:STDOUT: %.4: in I> = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %.type: type = fn_type @.1 [template] +// CHECK:STDOUT: %.5: > = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -44,7 +44,7 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %T.loc11_13.1: type = param T // CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: = fn_decl @.1 [template = constants.%struct.2] { +// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.5] { // CHECK:STDOUT: %T.loc22_6.1: type = param T // CHECK:STDOUT: %T.loc22_6.2: type = bind_symbolic_name T 0, %T.loc22_6.1 [symbolic = constants.%T] // CHECK:STDOUT: %Self.ref.loc22_24: I = name_ref Self, @I.%Self [symbolic = constants.%Self] @@ -61,7 +61,7 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 1 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc13_14: I = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc13_14.1: type = facet_type_access %Self.ref.loc13_14 [symbolic = constants.%Self] // CHECK:STDOUT: %.loc13_14.2: type = converted %Self.ref.loc13_14, %.loc13_14.1 [symbolic = constants.%Self] @@ -72,7 +72,7 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %.loc13_25.2: type = converted %Self.ref.loc13_25, %.loc13_25.1 [symbolic = constants.%Self] // CHECK:STDOUT: %return.var: ref Self = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13_29: = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc13_29: in I> = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/fail_todo_modifiers.carbon b/toolchain/check/testdata/interface/no_prelude/fail_todo_modifiers.carbon index 872ff04019a2..10b41a6650af 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_todo_modifiers.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_todo_modifiers.carbon @@ -25,15 +25,15 @@ interface Modifiers { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Modifiers [template] // CHECK:STDOUT: %Self: Modifiers = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Final: type = fn_type @Final [template] +// CHECK:STDOUT: %Final.type: type = fn_type @Final [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Final = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @Modifiers, Final [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @Modifiers.%Final.decl [template] -// CHECK:STDOUT: %Default: type = fn_type @Default [template] -// CHECK:STDOUT: %struct.2: Default = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @Modifiers, Default [template] -// CHECK:STDOUT: %.6: = assoc_entity element1, @Modifiers.%Default.decl [template] +// CHECK:STDOUT: %Final: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @Modifiers, [template] +// CHECK:STDOUT: %.4: in Modifiers> = assoc_entity element0, @Modifiers.%Final.decl [template] +// CHECK:STDOUT: %Default.type: type = fn_type @Default [template] +// CHECK:STDOUT: %Default: = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @Modifiers, [template] +// CHECK:STDOUT: %.6: in Modifiers> = assoc_entity element1, @Modifiers.%Default.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -45,10 +45,10 @@ interface Modifiers { // CHECK:STDOUT: // CHECK:STDOUT: interface @Modifiers { // CHECK:STDOUT: %Self: Modifiers = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %Final.decl: Final = fn_decl @Final [template = constants.%struct.1] {} -// CHECK:STDOUT: %.loc16: = assoc_entity element0, %Final.decl [template = constants.%.4] -// CHECK:STDOUT: %Default.decl: Default = fn_decl @Default [template = constants.%struct.2] {} -// CHECK:STDOUT: %.loc20: = assoc_entity element1, %Default.decl [template = constants.%.6] +// CHECK:STDOUT: %Final.decl: = fn_decl @Final [template = constants.%Final] {} +// CHECK:STDOUT: %.loc16: in Modifiers> = assoc_entity element0, %Final.decl [template = constants.%.4] +// CHECK:STDOUT: %Default.decl: = fn_decl @Default [template = constants.%Default] {} +// CHECK:STDOUT: %.loc20: in Modifiers> = assoc_entity element1, %Default.decl [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/generic_binding_after_assoc_const.carbon b/toolchain/check/testdata/interface/no_prelude/generic_binding_after_assoc_const.carbon index 55ecab73d6ee..d77fb2d56590 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic_binding_after_assoc_const.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic_binding_after_assoc_const.carbon @@ -22,17 +22,17 @@ interface I { // CHECK:STDOUT: %.1: type = interface_type @I [template] // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %T: type = bind_symbolic_name T 1 [symbolic] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @I, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @I, [template] +// CHECK:STDOUT: %.4: in I> = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %.5: type = assoc_entity_type @I, type [template] // CHECK:STDOUT: %.6: = assoc_entity element1, @I.%U [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.2: G = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type @I, G [template] -// CHECK:STDOUT: %.8: = assoc_entity element2, @I.%G.decl [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type @I, [template] +// CHECK:STDOUT: %.8: in I> = assoc_entity element2, @I.%G.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -44,18 +44,18 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.loc12_8.1: type = param T // CHECK:STDOUT: %T.loc12_8.2: type = bind_symbolic_name T 1, %T.loc12_8.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12: in I> = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: %U: type = assoc_const_decl U [template] // CHECK:STDOUT: %.loc13: = assoc_entity element1, %U [template = constants.%.6] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.2] { +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %T.loc16_8.1: type = param T // CHECK:STDOUT: %T.loc16_8.2: type = bind_symbolic_name T 1, %T.loc16_8.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16: = assoc_entity element2, %G.decl [template = constants.%.8] +// CHECK:STDOUT: %.loc16: in I> = assoc_entity element2, %G.decl [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/import.carbon b/toolchain/check/testdata/interface/no_prelude/import.carbon index ccd09688d945..ade12d20ee99 100644 --- a/toolchain/check/testdata/interface/no_prelude/import.carbon +++ b/toolchain/check/testdata/interface/no_prelude/import.carbon @@ -57,19 +57,19 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %Self.2: Basic = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.3: type = assoc_entity_type @Basic, type [template] // CHECK:STDOUT: %.4: = assoc_entity element0, @Basic.%T [template] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %.5: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type @Basic, F [template] -// CHECK:STDOUT: %.7: = assoc_entity element1, @Basic.%F.decl [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type @Basic, [template] +// CHECK:STDOUT: %.7: in Basic> = assoc_entity element1, @Basic.%F.decl [template] // CHECK:STDOUT: %.8: type = interface_type @ForwardDeclared [template] // CHECK:STDOUT: %Self.3: ForwardDeclared = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.9: type = assoc_entity_type @ForwardDeclared, type [template] // CHECK:STDOUT: %.10: = assoc_entity element0, @ForwardDeclared.%T [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type @ForwardDeclared, F [template] -// CHECK:STDOUT: %.12: = assoc_entity element1, @ForwardDeclared.%F.decl [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type @ForwardDeclared, [template] +// CHECK:STDOUT: %.12: in ForwardDeclared> = assoc_entity element1, @ForwardDeclared.%F.decl [template] // CHECK:STDOUT: %.13: type = struct_type {.f: ForwardDeclared} [template] // CHECK:STDOUT: %.14: type = struct_type {.f: ()} [template] // CHECK:STDOUT: } @@ -102,8 +102,8 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %Self: Basic = bind_symbolic_name Self 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] // CHECK:STDOUT: %.loc8: = assoc_entity element0, %T [template = constants.%.4] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.1 [template = constants.%struct.1] {} -// CHECK:STDOUT: %.loc9: = assoc_entity element1, %F.decl [template = constants.%.7] +// CHECK:STDOUT: %F.decl: = fn_decl @F.1 [template = constants.%F.1] {} +// CHECK:STDOUT: %.loc9: in Basic> = assoc_entity element1, %F.decl [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -116,8 +116,8 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %Self: ForwardDeclared = bind_symbolic_name Self 0 [symbolic = constants.%Self.3] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] // CHECK:STDOUT: %.loc16: = assoc_entity element0, %T [template = constants.%.10] -// CHECK:STDOUT: %F.decl: F = fn_decl @F.2 [template = constants.%struct.2] {} -// CHECK:STDOUT: %.loc17: = assoc_entity element1, %F.decl [template = constants.%.12] +// CHECK:STDOUT: %F.decl: = fn_decl @F.2 [template = constants.%F.2] {} +// CHECK:STDOUT: %.loc17: in ForwardDeclared> = assoc_entity element1, %F.decl [template = constants.%.12] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -135,29 +135,29 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @Empty [template] // CHECK:STDOUT: %Self.1: Empty = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %UseEmpty: type = fn_type @UseEmpty [template] +// CHECK:STDOUT: %UseEmpty.type: type = fn_type @UseEmpty [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: UseEmpty = struct_value () [template] +// CHECK:STDOUT: %UseEmpty: = struct_value () [template] // CHECK:STDOUT: %.3: type = interface_type @Basic [template] // CHECK:STDOUT: %Self.2: Basic = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %UseBasic: type = fn_type @UseBasic [template] -// CHECK:STDOUT: %struct.2: UseBasic = struct_value () [template] +// CHECK:STDOUT: %UseBasic.type: type = fn_type @UseBasic [template] +// CHECK:STDOUT: %UseBasic: = struct_value () [template] // CHECK:STDOUT: %.4: type = interface_type @ForwardDeclared [template] // CHECK:STDOUT: %Self.3: ForwardDeclared = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %UseForwardDeclared: type = fn_type @UseForwardDeclared [template] -// CHECK:STDOUT: %struct.3: UseForwardDeclared = struct_value () [template] +// CHECK:STDOUT: %UseForwardDeclared.type: type = fn_type @UseForwardDeclared [template] +// CHECK:STDOUT: %UseForwardDeclared: = struct_value () [template] // CHECK:STDOUT: %.5: type = assoc_entity_type @Basic, type [template] // CHECK:STDOUT: %.6: = assoc_entity element0, file.%import_ref.16 [template] -// CHECK:STDOUT: %F.1: type = fn_type @F.1 [template] -// CHECK:STDOUT: %struct.4: F = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type @Basic, F [template] -// CHECK:STDOUT: %.8: = assoc_entity element1, file.%import_ref.17 [template] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.1: = struct_value () [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type @Basic, [template] +// CHECK:STDOUT: %.8: in Basic> = assoc_entity element1, file.%import_ref.17 [template] // CHECK:STDOUT: %.9: type = assoc_entity_type @ForwardDeclared, type [template] // CHECK:STDOUT: %.10: = assoc_entity element0, file.%import_ref.18 [template] -// CHECK:STDOUT: %F.2: type = fn_type @F.2 [template] -// CHECK:STDOUT: %struct.5: F = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type @ForwardDeclared, F [template] -// CHECK:STDOUT: %.12: = assoc_entity element1, file.%import_ref.19 [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: = struct_value () [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type @ForwardDeclared, [template] +// CHECK:STDOUT: %.12: in ForwardDeclared> = assoc_entity element1, file.%import_ref.19 [template] // CHECK:STDOUT: %.13: type = ptr_type ForwardDeclared [template] // CHECK:STDOUT: %.14: type = struct_type {.f: ForwardDeclared} [template] // CHECK:STDOUT: %.15: type = struct_type {.f: ()} [template] @@ -183,27 +183,27 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %import_ref.3: type = import_ref ir1, inst+20, loaded [template = constants.%.4] // CHECK:STDOUT: %import_ref.4: ref {.f: ForwardDeclared} = import_ref ir1, inst+42, loaded // CHECK:STDOUT: %import_ref.5 = import_ref ir1, inst+3, unloaded -// CHECK:STDOUT: %UseEmpty.decl: UseEmpty = fn_decl @UseEmpty [template = constants.%struct.1] { +// CHECK:STDOUT: %UseEmpty.decl: = fn_decl @UseEmpty [template = constants.%UseEmpty] { // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, %import_ref.1 [template = constants.%.1] // CHECK:STDOUT: %e.loc6_13.1: Empty = param e // CHECK:STDOUT: @UseEmpty.%e: Empty = bind_name e, %e.loc6_13.1 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.6 = import_ref ir1, inst+7, unloaded -// CHECK:STDOUT: %import_ref.7: = import_ref ir1, inst+18, loaded [template = constants.%.8] +// CHECK:STDOUT: %import_ref.7: in Basic> = import_ref ir1, inst+18, loaded [template = constants.%.8] // CHECK:STDOUT: %import_ref.8: = import_ref ir1, inst+11, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.9 = import_ref ir1, inst+9, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref ir1, inst+13, unloaded -// CHECK:STDOUT: %UseBasic.decl: UseBasic = fn_decl @UseBasic [template = constants.%struct.2] { +// CHECK:STDOUT: %UseBasic.decl: = fn_decl @UseBasic [template = constants.%UseBasic] { // CHECK:STDOUT: %Basic.ref.loc7: type = name_ref Basic, %import_ref.2 [template = constants.%.3] // CHECK:STDOUT: %e.loc7_13.1: Basic = param e // CHECK:STDOUT: @UseBasic.%e: Basic = bind_name e, %e.loc7_13.1 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.11 = import_ref ir1, inst+22, unloaded -// CHECK:STDOUT: %import_ref.12: = import_ref ir1, inst+32, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.12: in ForwardDeclared> = import_ref ir1, inst+32, loaded [template = constants.%.12] // CHECK:STDOUT: %import_ref.13: = import_ref ir1, inst+26, loaded [template = constants.%.10] // CHECK:STDOUT: %import_ref.14 = import_ref ir1, inst+24, unloaded // CHECK:STDOUT: %import_ref.15 = import_ref ir1, inst+28, unloaded -// CHECK:STDOUT: %UseForwardDeclared.decl: UseForwardDeclared = fn_decl @UseForwardDeclared [template = constants.%struct.3] { +// CHECK:STDOUT: %UseForwardDeclared.decl: = fn_decl @UseForwardDeclared [template = constants.%UseForwardDeclared] { // CHECK:STDOUT: %ForwardDeclared.ref.loc8: type = name_ref ForwardDeclared, %import_ref.3 [template = constants.%.4] // CHECK:STDOUT: %f.loc8_23.1: ForwardDeclared = param f // CHECK:STDOUT: @UseForwardDeclared.%f: ForwardDeclared = bind_name f, %f.loc8_23.1 @@ -214,16 +214,16 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %UseBasicT: = bind_alias UseBasicT, %import_ref.8 [template = constants.%.6] // CHECK:STDOUT: %Basic.ref.loc11: type = name_ref Basic, %import_ref.2 [template = constants.%.3] // CHECK:STDOUT: %import_ref.17 = import_ref ir1, inst+13, unloaded -// CHECK:STDOUT: %F.ref.loc11: = name_ref F, %import_ref.7 [template = constants.%.8] -// CHECK:STDOUT: %UseBasicF: = bind_alias UseBasicF, %import_ref.7 [template = constants.%.8] +// CHECK:STDOUT: %F.ref.loc11: in Basic> = name_ref F, %import_ref.7 [template = constants.%.8] +// CHECK:STDOUT: %UseBasicF: in Basic> = bind_alias UseBasicF, %import_ref.7 [template = constants.%.8] // CHECK:STDOUT: %ForwardDeclared.ref.loc13: type = name_ref ForwardDeclared, %import_ref.3 [template = constants.%.4] // CHECK:STDOUT: %import_ref.18 = import_ref ir1, inst+24, unloaded // CHECK:STDOUT: %T.ref.loc13: = name_ref T, %import_ref.13 [template = constants.%.10] // CHECK:STDOUT: %UseForwardDeclaredT: = bind_alias UseForwardDeclaredT, %import_ref.13 [template = constants.%.10] // CHECK:STDOUT: %ForwardDeclared.ref.loc14: type = name_ref ForwardDeclared, %import_ref.3 [template = constants.%.4] // CHECK:STDOUT: %import_ref.19 = import_ref ir1, inst+28, unloaded -// CHECK:STDOUT: %F.ref.loc14: = name_ref F, %import_ref.12 [template = constants.%.12] -// CHECK:STDOUT: %UseForwardDeclaredF: = bind_alias UseForwardDeclaredF, %import_ref.12 [template = constants.%.12] +// CHECK:STDOUT: %F.ref.loc14: in ForwardDeclared> = name_ref F, %import_ref.12 [template = constants.%.12] +// CHECK:STDOUT: %UseForwardDeclaredF: in ForwardDeclared> = bind_alias UseForwardDeclaredF, %import_ref.12 [template = constants.%.12] // CHECK:STDOUT: %ForwardDeclared.ref.loc16: type = name_ref ForwardDeclared, %import_ref.3 [template = constants.%.4] // CHECK:STDOUT: %.loc16: type = ptr_type ForwardDeclared [template = constants.%.13] // CHECK:STDOUT: %f.var: ref ForwardDeclared* = var f diff --git a/toolchain/check/testdata/interface/no_prelude/import_access.carbon b/toolchain/check/testdata/interface/no_prelude/import_access.carbon index 03673ddcd810..a5a5392a6130 100644 --- a/toolchain/check/testdata/interface/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/interface/no_prelude/import_access.carbon @@ -202,16 +202,16 @@ private interface Redecl {} // CHECK:STDOUT: --- fail_todo_def.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Def.ref: = name_ref Def, [template = ] // CHECK:STDOUT: %i.loc8_6.1: = param i // CHECK:STDOUT: @F.%i: = bind_name i, %i.loc8_6.1 @@ -226,16 +226,16 @@ private interface Redecl {} // CHECK:STDOUT: --- fail_local_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Def.ref: = name_ref Def, [template = ] // CHECK:STDOUT: %i.loc10_6.1: = param i // CHECK:STDOUT: @F.%i: = bind_name i, %i.loc10_6.1 @@ -250,9 +250,9 @@ private interface Redecl {} // CHECK:STDOUT: --- fail_other_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -261,7 +261,7 @@ private interface Redecl {} // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Test: = namespace [template] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Test.ref: = name_ref Test, %Test [template = %Test] // CHECK:STDOUT: %Def.ref: = name_ref Def, [template = ] // CHECK:STDOUT: %i.loc10_6.1: = param i @@ -277,16 +277,16 @@ private interface Redecl {} // CHECK:STDOUT: --- fail_todo_forward_with_def.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %ForwardWithDef.ref: = name_ref ForwardWithDef, [template = ] // CHECK:STDOUT: %i.loc8_6.1: = param i // CHECK:STDOUT: @F.%i: = bind_name i, %i.loc8_6.1 @@ -301,16 +301,16 @@ private interface Redecl {} // CHECK:STDOUT: --- fail_local_forward_with_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %ForwardWithDef.ref: = name_ref ForwardWithDef, [template = ] // CHECK:STDOUT: %i.loc10_6.1: = param i // CHECK:STDOUT: @F.%i: = bind_name i, %i.loc10_6.1 @@ -325,9 +325,9 @@ private interface Redecl {} // CHECK:STDOUT: --- fail_other_forward_with_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -336,7 +336,7 @@ private interface Redecl {} // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Test: = namespace [template] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Test.ref: = name_ref Test, %Test [template = %Test] // CHECK:STDOUT: %ForwardWithDef.ref: = name_ref ForwardWithDef, [template = ] // CHECK:STDOUT: %i.loc10_6.1: = param i @@ -352,9 +352,9 @@ private interface Redecl {} // CHECK:STDOUT: --- fail_todo_forward.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: type = interface_type @Forward [template] // CHECK:STDOUT: %Self: Forward = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: } @@ -364,7 +364,7 @@ private interface Redecl {} // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .Forward = %Forward.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] // CHECK:STDOUT: %.loc8: type = ptr_type [template = ] // CHECK:STDOUT: %i.loc8_6.1: = param i @@ -389,16 +389,16 @@ private interface Redecl {} // CHECK:STDOUT: --- fail_local_forward.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] // CHECK:STDOUT: %.loc10: type = ptr_type [template = ] // CHECK:STDOUT: %i.loc10_6.1: = param i @@ -414,9 +414,9 @@ private interface Redecl {} // CHECK:STDOUT: --- fail_other_forward.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -425,7 +425,7 @@ private interface Redecl {} // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Test: = namespace [template] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] // CHECK:STDOUT: %.loc9: type = ptr_type [template = ] // CHECK:STDOUT: %i.loc9_6.1: = param i diff --git a/toolchain/check/testdata/interface/no_prelude/self.carbon b/toolchain/check/testdata/interface/no_prelude/self.carbon index 9469209469b0..42666d2171c8 100644 --- a/toolchain/check/testdata/interface/no_prelude/self.carbon +++ b/toolchain/check/testdata/interface/no_prelude/self.carbon @@ -17,11 +17,11 @@ interface UseSelf { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @UseSelf [template] // CHECK:STDOUT: %Self: UseSelf = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @UseSelf, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @UseSelf.%F.decl [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @UseSelf, [template] +// CHECK:STDOUT: %.4: in UseSelf> = assoc_entity element0, @UseSelf.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -33,7 +33,7 @@ interface UseSelf { // CHECK:STDOUT: // CHECK:STDOUT: interface @UseSelf { // CHECK:STDOUT: %Self: UseSelf = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc12_14: UseSelf = name_ref Self, %Self [symbolic = constants.%Self] // CHECK:STDOUT: %.loc12_14.1: type = facet_type_access %Self.ref.loc12_14 [symbolic = constants.%Self] // CHECK:STDOUT: %.loc12_14.2: type = converted %Self.ref.loc12_14, %.loc12_14.1 [symbolic = constants.%Self] @@ -44,7 +44,7 @@ interface UseSelf { // CHECK:STDOUT: %.loc12_25.2: type = converted %Self.ref.loc12_25, %.loc12_25.1 [symbolic = constants.%Self] // CHECK:STDOUT: %return.var: ref Self = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12_29: = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc12_29: in UseSelf> = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/todo_define_not_default.carbon b/toolchain/check/testdata/interface/todo_define_not_default.carbon index f46ea268ff65..5d71cce144d2 100644 --- a/toolchain/check/testdata/interface/todo_define_not_default.carbon +++ b/toolchain/check/testdata/interface/todo_define_not_default.carbon @@ -24,17 +24,17 @@ interface I { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = interface_type @I [template] // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type @I, F [template] -// CHECK:STDOUT: %.4: = assoc_entity element0, @I.%F.decl [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @I, G [template] -// CHECK:STDOUT: %.6: = assoc_entity element1, @I.%G.decl [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type @I, [template] +// CHECK:STDOUT: %.4: in I> = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @I, [template] +// CHECK:STDOUT: %.6: in I> = assoc_entity element1, @I.%G.decl [template] // CHECK:STDOUT: %.7: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.8: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %.9: type = assoc_entity_type @I, type [template] @@ -51,37 +51,37 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] {} -// CHECK:STDOUT: %.loc13: = assoc_entity element0, %F.decl [template = constants.%.4] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc14_11: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %.loc13: in I> = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %int.make_type_32.loc14_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_11.1: type = value_of_initializer %int.make_type_32.loc14_11 [template = i32] // CHECK:STDOUT: %.loc14_11.2: type = converted %int.make_type_32.loc14_11, %.loc14_11.1 [template = i32] // CHECK:STDOUT: %a.loc14_8.1: i32 = param a // CHECK:STDOUT: %a.loc14_8.2: i32 = bind_name a, %a.loc14_8.1 -// CHECK:STDOUT: %int.make_type_32.loc14_19: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_19.1: type = value_of_initializer %int.make_type_32.loc14_19 [template = i32] // CHECK:STDOUT: %.loc14_19.2: type = converted %int.make_type_32.loc14_19, %.loc14_19.1 [template = i32] // CHECK:STDOUT: %b.loc14_16.1: i32 = param b // CHECK:STDOUT: %b.loc14_16.2: i32 = bind_name b, %b.loc14_16.1 -// CHECK:STDOUT: %int.make_type_32.loc14_27: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_27.1: type = value_of_initializer %int.make_type_32.loc14_27 [template = i32] // CHECK:STDOUT: %.loc14_27.2: type = converted %int.make_type_32.loc14_27, %.loc14_27.1 [template = i32] // CHECK:STDOUT: %return.var: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14_31: = assoc_entity element1, %G.decl [template = constants.%.6] -// CHECK:STDOUT: %int.make_type_32.loc18_19: init type = call constants.%struct.2() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc18_24: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %.loc14_31: in I> = assoc_entity element1, %G.decl [template = constants.%.6] +// CHECK:STDOUT: %int.make_type_32.loc18_19: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc18_24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_27: (type, type) = tuple_literal (%int.make_type_32.loc18_19, %int.make_type_32.loc18_24) // CHECK:STDOUT: %.loc18_28.1: type = value_of_initializer %int.make_type_32.loc18_19 [template = i32] // CHECK:STDOUT: %.loc18_28.2: type = converted %int.make_type_32.loc18_19, %.loc18_28.1 [template = i32] @@ -90,7 +90,7 @@ interface I { // CHECK:STDOUT: %.loc18_28.5: type = converted %.loc18_27, constants.%.8 [template = constants.%.8] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] // CHECK:STDOUT: %.loc18_28.6: = assoc_entity element2, %T [template = constants.%.10] -// CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_11.1: type = value_of_initializer %int.make_type_32.loc19 [template = i32] // CHECK:STDOUT: %.loc19_11.2: type = converted %int.make_type_32.loc19, %.loc19_11.1 [template = i32] // CHECK:STDOUT: %.loc19_17: i32 = int_literal 42 [template = constants.%.11] diff --git a/toolchain/check/testdata/ir/duplicate_name_same_line.carbon b/toolchain/check/testdata/ir/duplicate_name_same_line.carbon index 8ac08c2edffe..46b11c0518ef 100644 --- a/toolchain/check/testdata/ir/duplicate_name_same_line.carbon +++ b/toolchain/check/testdata/ir/duplicate_name_same_line.carbon @@ -13,12 +13,12 @@ fn A() { if (true) { var n: i32 = 1; } if (true) { var n: i32 = 2; } } // CHECK:STDOUT: --- duplicate_name_same_line.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal true [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] // CHECK:STDOUT: %.4: i32 = int_literal 2 [template] // CHECK:STDOUT: } @@ -29,9 +29,9 @@ fn A() { if (true) { var n: i32 = 1; } if (true) { var n: i32 = 2; } } // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -40,7 +40,7 @@ fn A() { if (true) { var n: i32 = 1; } if (true) { var n: i32 = 2; } } // CHECK:STDOUT: if %.loc11_14 br !if.then.loc11_18 else br !if.else.loc11_18 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc11_18: -// CHECK:STDOUT: %int.make_type_32.loc11_29: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_29: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_29.1: type = value_of_initializer %int.make_type_32.loc11_29 [template = i32] // CHECK:STDOUT: %.loc11_29.2: type = converted %int.make_type_32.loc11_29, %.loc11_29.1 [template = i32] // CHECK:STDOUT: %n.var.loc11_26: ref i32 = var n @@ -54,7 +54,7 @@ fn A() { if (true) { var n: i32 = 1; } if (true) { var n: i32 = 2; } } // CHECK:STDOUT: if %.loc11_44 br !if.then.loc11_48 else br !if.else.loc11_48 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc11_48: -// CHECK:STDOUT: %int.make_type_32.loc11_59: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_59: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_59.1: type = value_of_initializer %int.make_type_32.loc11_59 [template = i32] // CHECK:STDOUT: %.loc11_59.2: type = converted %int.make_type_32.loc11_59, %.loc11_59.1 [template = i32] // CHECK:STDOUT: %n.var.loc11_56: ref i32 = var n diff --git a/toolchain/check/testdata/let/convert.carbon b/toolchain/check/testdata/let/convert.carbon index a6c6ed20370a..f2615f34a6a5 100644 --- a/toolchain/check/testdata/let/convert.carbon +++ b/toolchain/check/testdata/let/convert.carbon @@ -18,11 +18,11 @@ fn F() -> i32 { // CHECK:STDOUT: --- convert.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type, type, type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32, i32, i32) [template] // CHECK:STDOUT: %.4: type = ptr_type (i32, i32, i32) [template] @@ -38,28 +38,28 @@ fn F() -> i32 { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32.loc12_11: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc12_16: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc12_21: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12_11: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12_16: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12_21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_24.1: (type, type, type) = tuple_literal (%int.make_type_32.loc12_11, %int.make_type_32.loc12_16, %int.make_type_32.loc12_21) // CHECK:STDOUT: %.loc12_24.2: type = value_of_initializer %int.make_type_32.loc12_11 [template = i32] // CHECK:STDOUT: %.loc12_24.3: type = converted %int.make_type_32.loc12_11, %.loc12_24.2 [template = i32] @@ -83,9 +83,9 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc12_36.8: init (i32, i32, i32) = tuple_init (%.loc12_36.3, %.loc12_36.5, %.loc12_36.7) to %v.var [template = constants.%tuple] // CHECK:STDOUT: %.loc12_37: init (i32, i32, i32) = converted %.loc12_36.1, %.loc12_36.8 [template = constants.%tuple] // CHECK:STDOUT: assign %v.var, %.loc12_37 -// CHECK:STDOUT: %int.make_type_32.loc14_11: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc14_16: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc14_21: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_11: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_16: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_24.1: (type, type, type) = tuple_literal (%int.make_type_32.loc14_11, %int.make_type_32.loc14_16, %int.make_type_32.loc14_21) // CHECK:STDOUT: %.loc14_24.2: type = value_of_initializer %int.make_type_32.loc14_11 [template = i32] // CHECK:STDOUT: %.loc14_24.3: type = converted %int.make_type_32.loc14_11, %.loc14_24.2 [template = i32] diff --git a/toolchain/check/testdata/let/fail_duplicate_decl.carbon b/toolchain/check/testdata/let/fail_duplicate_decl.carbon index 6ff683f090de..bbd1777bca13 100644 --- a/toolchain/check/testdata/let/fail_duplicate_decl.carbon +++ b/toolchain/check/testdata/let/fail_duplicate_decl.carbon @@ -22,11 +22,11 @@ fn F() { // CHECK:STDOUT: --- fail_duplicate_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: } @@ -37,19 +37,19 @@ fn F() { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %.loc12_16: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %a.loc12: i32 = bind_name a, %.loc12_16 -// CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_10.1: type = value_of_initializer %int.make_type_32.loc19 [template = i32] // CHECK:STDOUT: %.loc19_10.2: type = converted %int.make_type_32.loc19, %.loc19_10.1 [template = i32] // CHECK:STDOUT: %.loc19_16: i32 = int_literal 2 [template = constants.%.3] diff --git a/toolchain/check/testdata/let/fail_generic.carbon b/toolchain/check/testdata/let/fail_generic.carbon index 4d6069243425..f6ab924b972f 100644 --- a/toolchain/check/testdata/let/fail_generic.carbon +++ b/toolchain/check/testdata/let/fail_generic.carbon @@ -25,11 +25,11 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: --- fail_generic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %.2: i32 = int_literal 5 [template] // CHECK:STDOUT: } @@ -40,27 +40,27 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc12_9: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc12_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_9.1: type = value_of_initializer %int.make_type_32.loc12_9 [template = i32] // CHECK:STDOUT: %.loc12_9.2: type = converted %int.make_type_32.loc12_9, %.loc12_9.1 [template = i32] // CHECK:STDOUT: %a.loc12_6.1: i32 = param a // CHECK:STDOUT: @F.%a: i32 = bind_name a, %a.loc12_6.1 -// CHECK:STDOUT: %int.make_type_32.loc12_17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_17.1: type = value_of_initializer %int.make_type_32.loc12_17 [template = i32] // CHECK:STDOUT: %.loc12_17.2: type = converted %int.make_type_32.loc12_17, %.loc12_17.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%a: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_21.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc13_21.2: type = converted %int.make_type_32, %.loc13_21.1 [template = i32] // CHECK:STDOUT: %T: type = bind_symbolic_name T 0, %.loc13_21.2 [symbolic = constants.%T] diff --git a/toolchain/check/testdata/let/fail_generic_import.carbon b/toolchain/check/testdata/let/fail_generic_import.carbon index 120c479e7b16..e9de7810e54f 100644 --- a/toolchain/check/testdata/let/fail_generic_import.carbon +++ b/toolchain/check/testdata/let/fail_generic_import.carbon @@ -27,9 +27,9 @@ let a: T = 0; // CHECK:STDOUT: --- implicit.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -38,8 +38,8 @@ let a: T = 0; // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32, %.loc4_19.1 [template = i32] // CHECK:STDOUT: %T: type = bind_symbolic_name T 0, %.loc4_19.2 [symbolic = constants.%T] diff --git a/toolchain/check/testdata/let/fail_missing_value.carbon b/toolchain/check/testdata/let/fail_missing_value.carbon index 284cd124a815..5d945916fe52 100644 --- a/toolchain/check/testdata/let/fail_missing_value.carbon +++ b/toolchain/check/testdata/let/fail_missing_value.carbon @@ -24,11 +24,11 @@ fn F() { // CHECK:STDOUT: --- fail_missing_value.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -37,20 +37,20 @@ fn F() { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_32, %.loc15_8.1 [template = i32] // CHECK:STDOUT: %n: i32 = bind_name n, -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] {} -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc21_10.2: type = converted %int.make_type_32, %.loc21_10.1 [template = i32] // CHECK:STDOUT: %n: i32 = bind_name n, diff --git a/toolchain/check/testdata/let/fail_modifiers.carbon b/toolchain/check/testdata/let/fail_modifiers.carbon index 339d2ba83e21..2e744cfc6637 100644 --- a/toolchain/check/testdata/let/fail_modifiers.carbon +++ b/toolchain/check/testdata/let/fail_modifiers.carbon @@ -86,9 +86,9 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: --- fail_modifiers.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -97,50 +97,50 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_18.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_18.2: type = converted %int.make_type_32.loc15, %.loc15_18.1 [template = i32] // CHECK:STDOUT: %.loc15_24: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %b: i32 = bind_name b, %.loc15_24 -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_16.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_16.2: type = converted %int.make_type_32.loc21, %.loc21_16.1 [template = i32] // CHECK:STDOUT: %.loc21_22: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %c: i32 = bind_name c, %.loc21_22 -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc27: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc27_14.1: type = value_of_initializer %int.make_type_32.loc27 [template = i32] // CHECK:STDOUT: %.loc27_14.2: type = converted %int.make_type_32.loc27, %.loc27_14.1 [template = i32] // CHECK:STDOUT: %.loc27_20: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %d: i32 = bind_name d, %.loc27_20 -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc33: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc33_16.1: type = value_of_initializer %int.make_type_32.loc33 [template = i32] // CHECK:STDOUT: %.loc33_16.2: type = converted %int.make_type_32.loc33, %.loc33_16.1 [template = i32] // CHECK:STDOUT: %.loc33_22: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %e: i32 = bind_name e, %.loc33_22 -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc46: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc46: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc46_22.1: type = value_of_initializer %int.make_type_32.loc46 [template = i32] // CHECK:STDOUT: %.loc46_22.2: type = converted %int.make_type_32.loc46, %.loc46_22.1 [template = i32] // CHECK:STDOUT: %.loc46_28: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %f: i32 = bind_name f, %.loc46_28 -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc59: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc59: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc59_24.1: type = value_of_initializer %int.make_type_32.loc59 [template = i32] // CHECK:STDOUT: %.loc59_24.2: type = converted %int.make_type_32.loc59, %.loc59_24.1 [template = i32] // CHECK:STDOUT: %.loc59_30: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %g: i32 = bind_name g, %.loc59_30 -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc72: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc72: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc72_26.1: type = value_of_initializer %int.make_type_32.loc72 [template = i32] // CHECK:STDOUT: %.loc72_26.2: type = converted %int.make_type_32.loc72, %.loc72_26.1 [template = i32] // CHECK:STDOUT: %.loc72_32: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %h: i32 = bind_name h, %.loc72_32 -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc84: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc84: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc84_28.1: type = value_of_initializer %int.make_type_32.loc84 [template = i32] // CHECK:STDOUT: %.loc84_28.2: type = converted %int.make_type_32.loc84, %.loc84_28.1 [template = i32] // CHECK:STDOUT: %.loc84_34: i32 = int_literal 1 [template = constants.%.2] diff --git a/toolchain/check/testdata/let/fail_use_in_init.carbon b/toolchain/check/testdata/let/fail_use_in_init.carbon index 15a16744bf57..a525fbd5946b 100644 --- a/toolchain/check/testdata/let/fail_use_in_init.carbon +++ b/toolchain/check/testdata/let/fail_use_in_init.carbon @@ -18,11 +18,11 @@ fn F() { // CHECK:STDOUT: --- fail_use_in_init.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -31,13 +31,13 @@ fn F() { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc15_10.2: type = converted %int.make_type_32, %.loc15_10.1 [template = i32] // CHECK:STDOUT: %a.ref: = name_ref a, [template = ] diff --git a/toolchain/check/testdata/let/generic.carbon b/toolchain/check/testdata/let/generic.carbon index 1d5a8c1b5901..75bad6794f32 100644 --- a/toolchain/check/testdata/let/generic.carbon +++ b/toolchain/check/testdata/let/generic.carbon @@ -17,11 +17,11 @@ fn F() { // CHECK:STDOUT: --- generic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: %.2: type = ptr_type T [symbolic] // CHECK:STDOUT: } @@ -32,13 +32,13 @@ fn F() { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_21.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_21.2: type = converted %int.make_type_32, %.loc12_21.1 [template = i32] // CHECK:STDOUT: %T: type = bind_symbolic_name T 0, %.loc12_21.2 [symbolic = constants.%T] diff --git a/toolchain/check/testdata/let/generic_import.carbon b/toolchain/check/testdata/let/generic_import.carbon index 73f8b1dd9865..538918a1c86f 100644 --- a/toolchain/check/testdata/let/generic_import.carbon +++ b/toolchain/check/testdata/let/generic_import.carbon @@ -24,9 +24,9 @@ var b: T = *a; // CHECK:STDOUT: --- implicit.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -35,8 +35,8 @@ var b: T = *a; // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32, %.loc4_19.1 [template = i32] // CHECK:STDOUT: %T: type = bind_symbolic_name T 0, %.loc4_19.2 [symbolic = constants.%T] diff --git a/toolchain/check/testdata/let/global.carbon b/toolchain/check/testdata/let/global.carbon index af0a7d0340c4..683ff81e750f 100644 --- a/toolchain/check/testdata/let/global.carbon +++ b/toolchain/check/testdata/let/global.carbon @@ -15,12 +15,12 @@ fn F() -> i32 { return n; } // CHECK:STDOUT: --- global.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -29,15 +29,15 @@ fn F() -> i32 { return n; } // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_8.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_8.2: type = converted %int.make_type_32.loc11, %.loc11_8.1 [template = i32] // CHECK:STDOUT: %.loc11_14: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %n: i32 = bind_name n, %.loc11_14 -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_11.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_11.2: type = converted %int.make_type_32.loc13, %.loc13_11.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var diff --git a/toolchain/check/testdata/let/import.carbon b/toolchain/check/testdata/let/import.carbon index b9ab0dba1361..8bffeafbe6b3 100644 --- a/toolchain/check/testdata/let/import.carbon +++ b/toolchain/check/testdata/let/import.carbon @@ -23,9 +23,9 @@ let b:! bool = a; // CHECK:STDOUT: --- implicit.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Bool = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal true [template] // CHECK:STDOUT: %a: bool = bind_symbolic_name a 0 [symbolic] // CHECK:STDOUT: } @@ -35,8 +35,8 @@ let b:! bool = a; // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct] -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct() [template = bool] +// CHECK:STDOUT: %import_ref: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc4_9.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc4_9.2: type = converted %bool.make_type, %.loc4_9.1 [template = bool] // CHECK:STDOUT: %.loc4_16: bool = bool_literal true [template = constants.%.2] @@ -48,9 +48,9 @@ let b:! bool = a; // CHECK:STDOUT: --- implicit.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Bool = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] // CHECK:STDOUT: %a: bool = bind_symbolic_name a 0 [symbolic] // CHECK:STDOUT: %b: bool = bind_symbolic_name b 0 [symbolic] // CHECK:STDOUT: } @@ -62,8 +62,8 @@ let b:! bool = a; // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: bool = import_ref ir0, inst+11, loaded [symbolic = constants.%a] // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.2: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct] -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct() [template = bool] +// CHECK:STDOUT: %import_ref.2: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc4_9.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc4_9.2: type = converted %bool.make_type, %.loc4_9.1 [template = bool] // CHECK:STDOUT: %a.ref: bool = name_ref a, %import_ref.1 [symbolic = constants.%a] diff --git a/toolchain/check/testdata/let/local.carbon b/toolchain/check/testdata/let/local.carbon index 6f3cddb62fff..a23d060f4dea 100644 --- a/toolchain/check/testdata/let/local.carbon +++ b/toolchain/check/testdata/let/local.carbon @@ -16,11 +16,11 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: --- local.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -29,27 +29,27 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32.loc11_9, %.loc11_9.1 [template = i32] // CHECK:STDOUT: %a.loc11_6.1: i32 = param a // CHECK:STDOUT: @F.%a: i32 = bind_name a, %a.loc11_6.1 -// CHECK:STDOUT: %int.make_type_32.loc11_17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_17.1: type = value_of_initializer %int.make_type_32.loc11_17 [template = i32] // CHECK:STDOUT: %.loc11_17.2: type = converted %int.make_type_32.loc11_17, %.loc11_17.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%a: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a diff --git a/toolchain/check/testdata/let/shadowed_decl.carbon b/toolchain/check/testdata/let/shadowed_decl.carbon index 18a609e84bbe..288f65ba4e12 100644 --- a/toolchain/check/testdata/let/shadowed_decl.carbon +++ b/toolchain/check/testdata/let/shadowed_decl.carbon @@ -17,11 +17,11 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: --- shadowed_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -31,27 +31,27 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32.loc11_9, %.loc11_9.1 [template = i32] // CHECK:STDOUT: %a.loc11_6.1: i32 = param a // CHECK:STDOUT: @F.%a.loc11: i32 = bind_name a, %a.loc11_6.1 -// CHECK:STDOUT: %int.make_type_32.loc11_17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_17.1: type = value_of_initializer %int.make_type_32.loc11_17 [template = i32] // CHECK:STDOUT: %.loc11_17.2: type = converted %int.make_type_32.loc11_17, %.loc11_17.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%a.loc11: i32) -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %.loc12_16: i32 = int_literal 1 [template = constants.%.2] diff --git a/toolchain/check/testdata/namespace/add_to_import.carbon b/toolchain/check/testdata/namespace/add_to_import.carbon index f38afadd9f2b..4df0057e44df 100644 --- a/toolchain/check/testdata/namespace/add_to_import.carbon +++ b/toolchain/check/testdata/namespace/add_to_import.carbon @@ -36,11 +36,11 @@ var a: i32 = NS.A(); // CHECK:STDOUT: --- implicit.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %A: type = fn_type @A [template] -// CHECK:STDOUT: %struct.2: A = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -55,15 +55,15 @@ var a: i32 = NS.A(); // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] { +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_14.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_14.2: type = converted %int.make_type_32.loc4, %.loc4_14.1 [template = i32] // CHECK:STDOUT: @A.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_32.loc6, %.loc6_8.1 [template = i32] // CHECK:STDOUT: %a.var: ref i32 = var a @@ -81,7 +81,7 @@ var a: i32 = NS.A(); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %NS.ref: = name_ref NS, file.%NS [template = file.%NS] -// CHECK:STDOUT: %A.ref: A = name_ref A, file.%A.decl [template = constants.%struct.2] +// CHECK:STDOUT: %A.ref: = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %A.call: init i32 = call %A.ref() // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/namespace/alias.carbon b/toolchain/check/testdata/namespace/alias.carbon index 3ee7c4143fef..84ac86ffc62b 100644 --- a/toolchain/check/testdata/namespace/alias.carbon +++ b/toolchain/check/testdata/namespace/alias.carbon @@ -23,16 +23,16 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: --- alias.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %A: type = fn_type @A [template] -// CHECK:STDOUT: %struct.2: A = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] -// CHECK:STDOUT: %B: type = fn_type @B [template] -// CHECK:STDOUT: %struct.3: B = struct_value () [template] -// CHECK:STDOUT: %D: type = fn_type @D [template] -// CHECK:STDOUT: %struct.4: D = struct_value () [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] +// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %D.type: type = fn_type @D [template] +// CHECK:STDOUT: %D: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -50,26 +50,26 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: } // CHECK:STDOUT: %NS.ref.loc13: = name_ref NS, %NS [template = %NS] // CHECK:STDOUT: %ns: = bind_alias ns, %NS [template = %NS] -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] { +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_14.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_14.2: type = converted %int.make_type_32.loc15, %.loc15_14.1 [template = i32] // CHECK:STDOUT: @A.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %B.decl: B = fn_decl @B [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_11.1: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_11.2: type = converted %int.make_type_32.loc17, %.loc17_11.1 [template = i32] // CHECK:STDOUT: @B.%return: ref i32 = var // CHECK:STDOUT: } // CHECK:STDOUT: %NS.ref.loc19: = name_ref NS, %NS [template = %NS] -// CHECK:STDOUT: %A.ref: A = name_ref A, %A.decl [template = constants.%struct.2] -// CHECK:STDOUT: %C: A = bind_alias C, %A.decl [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %D.decl: D = fn_decl @D [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %A.ref: = name_ref A, %A.decl [template = constants.%A] +// CHECK:STDOUT: %C: = bind_alias C, %A.decl [template = constants.%A] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %D.decl: = fn_decl @D [template = constants.%D] { +// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_11.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_11.2: type = converted %int.make_type_32.loc21, %.loc21_11.1 [template = i32] // CHECK:STDOUT: @D.%return: ref i32 = var @@ -87,7 +87,7 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: fn @B() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ns.ref: = name_ref ns, file.%ns [template = file.%NS] -// CHECK:STDOUT: %A.ref: A = name_ref A, file.%A.decl [template = constants.%struct.2] +// CHECK:STDOUT: %A.ref: = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %A.call: init i32 = call %A.ref() // CHECK:STDOUT: %.loc17_30.1: i32 = value_of_initializer %A.call // CHECK:STDOUT: %.loc17_30.2: i32 = converted %A.call, %.loc17_30.1 @@ -96,7 +96,7 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: // CHECK:STDOUT: fn @D() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %C.ref: A = name_ref C, file.%C [template = constants.%struct.2] +// CHECK:STDOUT: %C.ref: = name_ref C, file.%C [template = constants.%A] // CHECK:STDOUT: %A.call: init i32 = call %C.ref() // CHECK:STDOUT: %.loc21_27.1: i32 = value_of_initializer %A.call // CHECK:STDOUT: %.loc21_27.2: i32 = converted %A.call, %.loc21_27.1 diff --git a/toolchain/check/testdata/namespace/fail_conflict_after_merge.carbon b/toolchain/check/testdata/namespace/fail_conflict_after_merge.carbon index a101caa45a15..b863e5ced816 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_after_merge.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_after_merge.carbon @@ -59,11 +59,11 @@ fn NS(); // CHECK:STDOUT: --- fail_conflict.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = fn_type @.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: = struct_value () [template] -// CHECK:STDOUT: %.3: type = fn_type @.2 [template] -// CHECK:STDOUT: %struct.2: = struct_value () [template] +// CHECK:STDOUT: %.type.1: type = fn_type @.1 [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %.2: > = struct_value () [template] +// CHECK:STDOUT: %.type.2: type = fn_type @.2 [template] +// CHECK:STDOUT: %.3: > = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -75,9 +75,9 @@ fn NS(); // CHECK:STDOUT: %NS: = namespace %import_ref, [template] {} // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %.loc8: = namespace [template] {} -// CHECK:STDOUT: %.decl.loc17: = fn_decl @.1 [template = constants.%struct.1] {} +// CHECK:STDOUT: %.decl.loc17: > = fn_decl @.1 [template = constants.%.2] {} // CHECK:STDOUT: %.loc21: = namespace [template] {} -// CHECK:STDOUT: %.decl.loc29: = fn_decl @.2 [template = constants.%struct.2] {} +// CHECK:STDOUT: %.decl.loc29: > = fn_decl @.2 [template = constants.%.3] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @.1(); diff --git a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_first.carbon b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_first.carbon index 0bc2a8989cfd..7ca932303493 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_first.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_first.carbon @@ -47,11 +47,11 @@ fn NS.Foo(); // CHECK:STDOUT: --- fail_conflict.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = fn_type @.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: = struct_value () [template] -// CHECK:STDOUT: %Foo: type = fn_type @Foo [template] -// CHECK:STDOUT: %struct.2: Foo = struct_value () [template] +// CHECK:STDOUT: %.type: type = fn_type @.1 [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %.2: > = struct_value () [template] +// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] +// CHECK:STDOUT: %Foo: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -64,8 +64,8 @@ fn NS.Foo(); // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.decl: = fn_decl @.1 [template = constants.%struct.1] {} -// CHECK:STDOUT: %Foo.decl: Foo = fn_decl @Foo [template = constants.%struct.2] {} +// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.2] {} +// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @.1(); diff --git a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_second.carbon b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_second.carbon index 68a7569bb358..7acc63d5025e 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_second.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_second.carbon @@ -46,9 +46,9 @@ fn NS.Foo(); // CHECK:STDOUT: --- fn.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %NS: type = fn_type @NS [template] +// CHECK:STDOUT: %NS.type: type = fn_type @NS [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: NS = struct_value () [template] +// CHECK:STDOUT: %NS: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -57,7 +57,7 @@ fn NS.Foo(); // CHECK:STDOUT: .NS = %NS.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %NS.decl: NS = fn_decl @NS [template = constants.%struct] {} +// CHECK:STDOUT: %NS.decl: = fn_decl @NS [template = constants.%NS] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @NS(); @@ -65,11 +65,11 @@ fn NS.Foo(); // CHECK:STDOUT: --- fail_conflict.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %NS: type = fn_type @NS [template] +// CHECK:STDOUT: %NS.type: type = fn_type @NS [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: NS = struct_value () [template] -// CHECK:STDOUT: %.2: type = fn_type @.1 [template] -// CHECK:STDOUT: %struct.2: = struct_value () [template] +// CHECK:STDOUT: %NS: = struct_value () [template] +// CHECK:STDOUT: %.type: type = fn_type @.1 [template] +// CHECK:STDOUT: %.2: > = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -77,10 +77,10 @@ fn NS.Foo(); // CHECK:STDOUT: .NS = %import_ref // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: NS = import_ref ir1, inst+2, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref: = import_ref ir1, inst+2, loaded [template = constants.%NS] // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %.loc16: = namespace [template] {} -// CHECK:STDOUT: %.decl: = fn_decl @.1 [template = constants.%struct.2] {} +// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.2] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @NS(); diff --git a/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_first.carbon b/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_first.carbon index 16a189b845f6..bee2885e48e1 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_first.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_first.carbon @@ -45,9 +45,9 @@ fn NS.Bar() {} // CHECK:STDOUT: --- namespace.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Foo: type = fn_type @Foo [template] +// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Foo = struct_value () [template] +// CHECK:STDOUT: %Foo: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -59,7 +59,7 @@ fn NS.Bar() {} // CHECK:STDOUT: %NS: = namespace [template] { // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl: Foo = fn_decl @Foo [template = constants.%struct] {} +// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo() { @@ -70,9 +70,9 @@ fn NS.Bar() {} // CHECK:STDOUT: --- fn.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %NS: type = fn_type @NS [template] +// CHECK:STDOUT: %NS.type: type = fn_type @NS [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: NS = struct_value () [template] +// CHECK:STDOUT: %NS: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -81,7 +81,7 @@ fn NS.Bar() {} // CHECK:STDOUT: .NS = %NS.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %NS.decl: NS = fn_decl @NS [template = constants.%struct] {} +// CHECK:STDOUT: %NS.decl: = fn_decl @NS [template = constants.%NS] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @NS() { @@ -92,9 +92,9 @@ fn NS.Bar() {} // CHECK:STDOUT: --- fail_conflict.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Bar: type = fn_type @Bar [template] +// CHECK:STDOUT: %Bar.type: type = fn_type @Bar [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Bar = struct_value () [template] +// CHECK:STDOUT: %Bar: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -110,7 +110,7 @@ fn NS.Bar() {} // CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+3, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref ir2, inst+2, unloaded // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Bar.decl: Bar = fn_decl @Bar [template = constants.%struct] {} +// CHECK:STDOUT: %Bar.decl: = fn_decl @Bar [template = constants.%Bar] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bar() { diff --git a/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_second.carbon b/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_second.carbon index 1ed5d2d36551..008a72a816ee 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_second.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_second.carbon @@ -45,9 +45,9 @@ fn NS.Bar() {} // CHECK:STDOUT: --- fn.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %NS: type = fn_type @NS [template] +// CHECK:STDOUT: %NS.type: type = fn_type @NS [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: NS = struct_value () [template] +// CHECK:STDOUT: %NS: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -56,7 +56,7 @@ fn NS.Bar() {} // CHECK:STDOUT: .NS = %NS.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %NS.decl: NS = fn_decl @NS [template = constants.%struct] {} +// CHECK:STDOUT: %NS.decl: = fn_decl @NS [template = constants.%NS] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @NS() { @@ -67,9 +67,9 @@ fn NS.Bar() {} // CHECK:STDOUT: --- namespace.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Foo: type = fn_type @Foo [template] +// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Foo = struct_value () [template] +// CHECK:STDOUT: %Foo: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -81,7 +81,7 @@ fn NS.Bar() {} // CHECK:STDOUT: %NS: = namespace [template] { // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl: Foo = fn_decl @Foo [template = constants.%struct] {} +// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo() { @@ -92,9 +92,9 @@ fn NS.Bar() {} // CHECK:STDOUT: --- fail_conflict.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Bar: type = fn_type @Bar [template] +// CHECK:STDOUT: %Bar.type: type = fn_type @Bar [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Bar = struct_value () [template] +// CHECK:STDOUT: %Bar: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -110,7 +110,7 @@ fn NS.Bar() {} // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.3 = import_ref ir2, inst+3, unloaded // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Bar.decl: Bar = fn_decl @Bar [template = constants.%struct] {} +// CHECK:STDOUT: %Bar.decl: = fn_decl @Bar [template = constants.%Bar] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bar() { diff --git a/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon b/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon index c0fdcd8fef81..bb52e8ddfe21 100644 --- a/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon +++ b/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon @@ -24,11 +24,11 @@ fn ns.A() -> i32 { return 0; } // CHECK:STDOUT: --- fail_decl_in_alias.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %.2: type = fn_type @.1 [template] -// CHECK:STDOUT: %struct.2: = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %.type: type = fn_type @.1 [template] +// CHECK:STDOUT: %.2: > = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -42,9 +42,9 @@ fn ns.A() -> i32 { return 0; } // CHECK:STDOUT: %NS: = namespace [template] {} // CHECK:STDOUT: %NS.ref: = name_ref NS, %NS [template = %NS] // CHECK:STDOUT: %ns: = bind_alias ns, %NS [template = %NS] -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %.decl: = fn_decl @.1 [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.2] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc22_14.2: type = converted %int.make_type_32, %.loc22_14.1 [template = i32] // CHECK:STDOUT: @.1.%return: ref i32 = var diff --git a/toolchain/check/testdata/namespace/fail_duplicate.carbon b/toolchain/check/testdata/namespace/fail_duplicate.carbon index 45741ef48e88..a981fcc7204c 100644 --- a/toolchain/check/testdata/namespace/fail_duplicate.carbon +++ b/toolchain/check/testdata/namespace/fail_duplicate.carbon @@ -25,9 +25,9 @@ fn Foo.Baz() { // CHECK:STDOUT: --- fail_duplicate.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Baz: type = fn_type @Baz [template] +// CHECK:STDOUT: %Baz.type: type = fn_type @Baz [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Baz = struct_value () [template] +// CHECK:STDOUT: %Baz: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -39,8 +39,8 @@ fn Foo.Baz() { // CHECK:STDOUT: %Foo: = namespace [template] { // CHECK:STDOUT: .Baz = %Baz.decl.loc13 // CHECK:STDOUT: } -// CHECK:STDOUT: %Baz.decl.loc13: Baz = fn_decl @Baz [template = constants.%struct] {} -// CHECK:STDOUT: %Baz.decl.loc22: Baz = fn_decl @Baz [template = constants.%struct] {} +// CHECK:STDOUT: %Baz.decl.loc13: = fn_decl @Baz [template = constants.%Baz] {} +// CHECK:STDOUT: %Baz.decl.loc22: = fn_decl @Baz [template = constants.%Baz] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Baz() { diff --git a/toolchain/check/testdata/namespace/fail_params.carbon b/toolchain/check/testdata/namespace/fail_params.carbon index 1b36a4e3ba29..1071c157fca6 100644 --- a/toolchain/check/testdata/namespace/fail_params.carbon +++ b/toolchain/check/testdata/namespace/fail_params.carbon @@ -41,14 +41,14 @@ fn D(T:! type).F() {} // CHECK:STDOUT: --- fail_params.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %.2: type = fn_type @.1 [template] -// CHECK:STDOUT: %struct.3: = struct_value () [template] +// CHECK:STDOUT: %.type: type = fn_type @.1 [template] +// CHECK:STDOUT: %.2: > = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -63,9 +63,9 @@ fn D(T:! type).F() {} // CHECK:STDOUT: %A: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc24_16.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc24_16.2: type = converted %int.make_type_32, %.loc24_16.1 [template = i32] // CHECK:STDOUT: %n.loc24_13.1: i32 = param n @@ -78,7 +78,7 @@ fn D(T:! type).F() {} // CHECK:STDOUT: %x.loc30_23.2: T = bind_name x, %x.loc30_23.1 // CHECK:STDOUT: %C: = namespace [template] {} // CHECK:STDOUT: %D: = namespace [template] {} -// CHECK:STDOUT: %.decl: = fn_decl @.1 [template = constants.%struct.3] { +// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.2] { // CHECK:STDOUT: %T.loc39_6.1: type = param T // CHECK:STDOUT: %T.loc39_6.2: type = bind_symbolic_name T 0, %T.loc39_6.1 [symbolic = constants.%T] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/namespace/fail_unresolved_scope.carbon b/toolchain/check/testdata/namespace/fail_unresolved_scope.carbon index 727a0151a52d..73528e616ee7 100644 --- a/toolchain/check/testdata/namespace/fail_unresolved_scope.carbon +++ b/toolchain/check/testdata/namespace/fail_unresolved_scope.carbon @@ -17,9 +17,9 @@ fn Foo.Baz() { // CHECK:STDOUT: --- fail_unresolved_scope.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: type = fn_type @.1 [template] -// CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: = struct_value () [template] +// CHECK:STDOUT: %.type: type = fn_type @.1 [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %.2: > = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -27,7 +27,7 @@ fn Foo.Baz() { // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %.decl: = fn_decl @.1 [template = constants.%struct] {} +// CHECK:STDOUT: %.decl: > = fn_decl @.1 [template = constants.%.2] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @.1() { diff --git a/toolchain/check/testdata/namespace/function.carbon b/toolchain/check/testdata/namespace/function.carbon index 346c013c86f4..2961b209b772 100644 --- a/toolchain/check/testdata/namespace/function.carbon +++ b/toolchain/check/testdata/namespace/function.carbon @@ -24,13 +24,13 @@ fn Bar() { // CHECK:STDOUT: --- function.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Baz.1: type = fn_type @Baz.1 [template] +// CHECK:STDOUT: %Baz.type.1: type = fn_type @Baz.1 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Baz = struct_value () [template] -// CHECK:STDOUT: %Baz.2: type = fn_type @Baz.2 [template] -// CHECK:STDOUT: %struct.2: Baz = struct_value () [template] -// CHECK:STDOUT: %Bar: type = fn_type @Bar [template] -// CHECK:STDOUT: %struct.3: Bar = struct_value () [template] +// CHECK:STDOUT: %Baz.1: = struct_value () [template] +// CHECK:STDOUT: %Baz.type.2: type = fn_type @Baz.2 [template] +// CHECK:STDOUT: %Baz.2: = struct_value () [template] +// CHECK:STDOUT: %Bar.type: type = fn_type @Bar [template] +// CHECK:STDOUT: %Bar: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -44,9 +44,9 @@ fn Bar() { // CHECK:STDOUT: %Foo: = namespace [template] { // CHECK:STDOUT: .Baz = %Baz.decl.loc17 // CHECK:STDOUT: } -// CHECK:STDOUT: %Baz.decl.loc14: Baz = fn_decl @Baz.1 [template = constants.%struct.1] {} -// CHECK:STDOUT: %Baz.decl.loc17: Baz = fn_decl @Baz.2 [template = constants.%struct.2] {} -// CHECK:STDOUT: %Bar.decl: Bar = fn_decl @Bar [template = constants.%struct.3] {} +// CHECK:STDOUT: %Baz.decl.loc14: = fn_decl @Baz.1 [template = constants.%Baz.1] {} +// CHECK:STDOUT: %Baz.decl.loc17: = fn_decl @Baz.2 [template = constants.%Baz.2] {} +// CHECK:STDOUT: %Bar.decl: = fn_decl @Bar [template = constants.%Bar] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Baz.1() { @@ -62,7 +62,7 @@ fn Bar() { // CHECK:STDOUT: fn @Bar() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Foo.ref: = name_ref Foo, file.%Foo [template = file.%Foo] -// CHECK:STDOUT: %Baz.ref: Baz = name_ref Baz, file.%Baz.decl.loc17 [template = constants.%struct.2] +// CHECK:STDOUT: %Baz.ref: = name_ref Baz, file.%Baz.decl.loc17 [template = constants.%Baz.2] // CHECK:STDOUT: %Baz.call: init () = call %Baz.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/namespace/imported.carbon b/toolchain/check/testdata/namespace/imported.carbon index 955754e22bc4..b2223a2060e7 100644 --- a/toolchain/check/testdata/namespace/imported.carbon +++ b/toolchain/check/testdata/namespace/imported.carbon @@ -31,11 +31,11 @@ var package_b: () = package.NS.ChildNS.B(); // CHECK:STDOUT: --- implicit.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: A = struct_value () [template] -// CHECK:STDOUT: %B: type = fn_type @B [template] -// CHECK:STDOUT: %struct.2: B = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] +// CHECK:STDOUT: %B: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -51,8 +51,8 @@ var package_b: () = package.NS.ChildNS.B(); // CHECK:STDOUT: %ChildNS: = namespace [template] { // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct.1] {} -// CHECK:STDOUT: %B.decl: B = fn_decl @B [template = constants.%struct.2] {} +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -63,10 +63,10 @@ var package_b: () = package.NS.ChildNS.B(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: type = fn_type @A [template] -// CHECK:STDOUT: %struct.1: A = struct_value () [template] -// CHECK:STDOUT: %B: type = fn_type @B [template] -// CHECK:STDOUT: %struct.2: B = struct_value () [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] +// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] +// CHECK:STDOUT: %B: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -87,8 +87,8 @@ var package_b: () = package.NS.ChildNS.B(); // CHECK:STDOUT: %ChildNS: = namespace %import_ref.2, [template] { // CHECK:STDOUT: .B = %import_ref.4 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: A = import_ref ir0, inst+4, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: B = import_ref ir0, inst+8, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.3: = import_ref ir0, inst+4, loaded [template = constants.%A] +// CHECK:STDOUT: %import_ref.4: = import_ref ir0, inst+8, loaded [template = constants.%B] // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %.loc4_9.1: () = tuple_literal () // CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%.1 [template = constants.%.1] @@ -115,23 +115,23 @@ var package_b: () = package.NS.ChildNS.B(); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %NS.ref.loc4: = name_ref NS, file.%NS [template = file.%NS] -// CHECK:STDOUT: %A.ref.loc4: A = name_ref A, file.%import_ref.3 [template = constants.%struct.1] +// CHECK:STDOUT: %A.ref.loc4: = name_ref A, file.%import_ref.3 [template = constants.%A] // CHECK:STDOUT: %A.call.loc4: init () = call %A.ref.loc4() // CHECK:STDOUT: assign file.%a.var, %A.call.loc4 // CHECK:STDOUT: %NS.ref.loc5: = name_ref NS, file.%NS [template = file.%NS] // CHECK:STDOUT: %ChildNS.ref.loc5: = name_ref ChildNS, file.%ChildNS [template = file.%ChildNS] -// CHECK:STDOUT: %B.ref.loc5: B = name_ref B, file.%import_ref.4 [template = constants.%struct.2] +// CHECK:STDOUT: %B.ref.loc5: = name_ref B, file.%import_ref.4 [template = constants.%B] // CHECK:STDOUT: %B.call.loc5: init () = call %B.ref.loc5() // CHECK:STDOUT: assign file.%b.var, %B.call.loc5 // CHECK:STDOUT: %package.ref.loc7: = name_ref package, package [template = package] // CHECK:STDOUT: %NS.ref.loc7: = name_ref NS, file.%NS [template = file.%NS] -// CHECK:STDOUT: %A.ref.loc7: A = name_ref A, file.%import_ref.3 [template = constants.%struct.1] +// CHECK:STDOUT: %A.ref.loc7: = name_ref A, file.%import_ref.3 [template = constants.%A] // CHECK:STDOUT: %A.call.loc7: init () = call %A.ref.loc7() // CHECK:STDOUT: assign file.%package_a.var, %A.call.loc7 // CHECK:STDOUT: %package.ref.loc8: = name_ref package, package [template = package] // CHECK:STDOUT: %NS.ref.loc8: = name_ref NS, file.%NS [template = file.%NS] // CHECK:STDOUT: %ChildNS.ref.loc8: = name_ref ChildNS, file.%ChildNS [template = file.%ChildNS] -// CHECK:STDOUT: %B.ref.loc8: B = name_ref B, file.%import_ref.4 [template = constants.%struct.2] +// CHECK:STDOUT: %B.ref.loc8: = name_ref B, file.%import_ref.4 [template = constants.%B] // CHECK:STDOUT: %B.call.loc8: init () = call %B.ref.loc8() // CHECK:STDOUT: assign file.%package_b.var, %B.call.loc8 // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/namespace/imported_indirect.carbon b/toolchain/check/testdata/namespace/imported_indirect.carbon index d885b01d5839..7fba822b0ded 100644 --- a/toolchain/check/testdata/namespace/imported_indirect.carbon +++ b/toolchain/check/testdata/namespace/imported_indirect.carbon @@ -90,9 +90,9 @@ var e: () = A.B.C.D(); // CHECK:STDOUT: --- d.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %D: type = fn_type @D [template] +// CHECK:STDOUT: %D.type: type = fn_type @D [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: D = struct_value () [template] +// CHECK:STDOUT: %D: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -113,7 +113,7 @@ var e: () = A.B.C.D(); // CHECK:STDOUT: .D = %D.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %D.decl: D = fn_decl @D [template = constants.%struct] {} +// CHECK:STDOUT: %D.decl: = fn_decl @D [template = constants.%D] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @D() { @@ -125,8 +125,8 @@ var e: () = A.B.C.D(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %D: type = fn_type @D [template] -// CHECK:STDOUT: %struct: D = struct_value () [template] +// CHECK:STDOUT: %D.type: type = fn_type @D [template] +// CHECK:STDOUT: %D: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -147,7 +147,7 @@ var e: () = A.B.C.D(); // CHECK:STDOUT: %C: = namespace %import_ref.3, [template] { // CHECK:STDOUT: .D = %import_ref.4 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: D = import_ref ir1, inst+8, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref.4: = import_ref ir1, inst+8, loaded [template = constants.%D] // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %.loc5_9.1: () = tuple_literal () // CHECK:STDOUT: %.loc5_9.2: type = converted %.loc5_9.1, constants.%.1 [template = constants.%.1] @@ -162,7 +162,7 @@ var e: () = A.B.C.D(); // CHECK:STDOUT: %A.ref: = name_ref A, file.%A [template = file.%A] // CHECK:STDOUT: %B.ref: = name_ref B, file.%B [template = file.%B] // CHECK:STDOUT: %C.ref: = name_ref C, file.%C [template = file.%C] -// CHECK:STDOUT: %D.ref: D = name_ref D, file.%import_ref.4 [template = constants.%struct] +// CHECK:STDOUT: %D.ref: = name_ref D, file.%import_ref.4 [template = constants.%D] // CHECK:STDOUT: %D.call: init () = call %D.ref() // CHECK:STDOUT: assign file.%e.var, %D.call // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/namespace/merging.carbon b/toolchain/check/testdata/namespace/merging.carbon index 21b5ef5090fb..264f19498574 100644 --- a/toolchain/check/testdata/namespace/merging.carbon +++ b/toolchain/check/testdata/namespace/merging.carbon @@ -49,9 +49,9 @@ fn Run() { // CHECK:STDOUT: --- a.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -63,7 +63,7 @@ fn Run() { // CHECK:STDOUT: %NS: = namespace [template] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -74,11 +74,11 @@ fn Run() { // CHECK:STDOUT: --- b.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %B1: type = fn_type @B1 [template] +// CHECK:STDOUT: %B1.type: type = fn_type @B1 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: B1 = struct_value () [template] -// CHECK:STDOUT: %B2: type = fn_type @B2 [template] -// CHECK:STDOUT: %struct.2: B2 = struct_value () [template] +// CHECK:STDOUT: %B1: = struct_value () [template] +// CHECK:STDOUT: %B2.type: type = fn_type @B2 [template] +// CHECK:STDOUT: %B2: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -91,9 +91,9 @@ fn Run() { // CHECK:STDOUT: .B1 = %B1.decl // CHECK:STDOUT: .B2 = %B2.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %B1.decl: B1 = fn_decl @B1 [template = constants.%struct.1] {} +// CHECK:STDOUT: %B1.decl: = fn_decl @B1 [template = constants.%B1] {} // CHECK:STDOUT: %.loc8: = namespace [template] {} -// CHECK:STDOUT: %B2.decl: B2 = fn_decl @B2 [template = constants.%struct.2] {} +// CHECK:STDOUT: %B2.decl: = fn_decl @B2 [template = constants.%B2] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @B1() { @@ -109,17 +109,17 @@ fn Run() { // CHECK:STDOUT: --- c.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %C: type = fn_type @C [template] +// CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: C = struct_value () [template] -// CHECK:STDOUT: %Run: type = fn_type @Run [template] -// CHECK:STDOUT: %struct.2: Run = struct_value () [template] -// CHECK:STDOUT: %A: type = fn_type @A [template] -// CHECK:STDOUT: %struct.3: A = struct_value () [template] -// CHECK:STDOUT: %B1: type = fn_type @B1 [template] -// CHECK:STDOUT: %struct.4: B1 = struct_value () [template] -// CHECK:STDOUT: %B2: type = fn_type @B2 [template] -// CHECK:STDOUT: %struct.5: B2 = struct_value () [template] +// CHECK:STDOUT: %C: = struct_value () [template] +// CHECK:STDOUT: %Run.type: type = fn_type @Run [template] +// CHECK:STDOUT: %Run: = struct_value () [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] +// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %B1.type: type = fn_type @B1 [template] +// CHECK:STDOUT: %B1: = struct_value () [template] +// CHECK:STDOUT: %B2.type: type = fn_type @B2 [template] +// CHECK:STDOUT: %B2: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -135,13 +135,13 @@ fn Run() { // CHECK:STDOUT: .B2 = %import_ref.4 // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: A = import_ref ir1, inst+3, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %import_ref.3: B1 = import_ref ir2, inst+3, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %import_ref.4: B2 = import_ref ir2, inst+9, loaded [template = constants.%struct.5] +// CHECK:STDOUT: %import_ref.2: = import_ref ir1, inst+3, loaded [template = constants.%A] +// CHECK:STDOUT: %import_ref.3: = import_ref ir2, inst+3, loaded [template = constants.%B1] +// CHECK:STDOUT: %import_ref.4: = import_ref ir2, inst+9, loaded [template = constants.%B2] // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %.loc7: = namespace [template] {} -// CHECK:STDOUT: %C.decl: C = fn_decl @C [template = constants.%struct.1] {} -// CHECK:STDOUT: %Run.decl: Run = fn_decl @Run [template = constants.%struct.2] {} +// CHECK:STDOUT: %C.decl: = fn_decl @C [template = constants.%C] {} +// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @C() { @@ -152,16 +152,16 @@ fn Run() { // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %NS.ref.loc12: = name_ref NS, file.%NS [template = file.%NS] -// CHECK:STDOUT: %A.ref: A = name_ref A, file.%import_ref.2 [template = constants.%struct.3] +// CHECK:STDOUT: %A.ref: = name_ref A, file.%import_ref.2 [template = constants.%A] // CHECK:STDOUT: %A.call: init () = call %A.ref() // CHECK:STDOUT: %NS.ref.loc13: = name_ref NS, file.%NS [template = file.%NS] -// CHECK:STDOUT: %B1.ref: B1 = name_ref B1, file.%import_ref.3 [template = constants.%struct.4] +// CHECK:STDOUT: %B1.ref: = name_ref B1, file.%import_ref.3 [template = constants.%B1] // CHECK:STDOUT: %B1.call: init () = call %B1.ref() // CHECK:STDOUT: %NS.ref.loc14: = name_ref NS, file.%NS [template = file.%NS] -// CHECK:STDOUT: %B2.ref: B2 = name_ref B2, file.%import_ref.4 [template = constants.%struct.5] +// CHECK:STDOUT: %B2.ref: = name_ref B2, file.%import_ref.4 [template = constants.%B2] // CHECK:STDOUT: %B2.call: init () = call %B2.ref() // CHECK:STDOUT: %NS.ref.loc15: = name_ref NS, file.%NS [template = file.%NS] -// CHECK:STDOUT: %C.ref: C = name_ref C, file.%C.decl [template = constants.%struct.1] +// CHECK:STDOUT: %C.ref: = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.call: init () = call %C.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/namespace/nested.carbon b/toolchain/check/testdata/namespace/nested.carbon index 7a8631f75dc9..354d0e526ef4 100644 --- a/toolchain/check/testdata/namespace/nested.carbon +++ b/toolchain/check/testdata/namespace/nested.carbon @@ -21,11 +21,11 @@ fn Foo.Bar.Baz() { // CHECK:STDOUT: --- nested.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Wiz: type = fn_type @Wiz [template] +// CHECK:STDOUT: %Wiz.type: type = fn_type @Wiz [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Wiz = struct_value () [template] -// CHECK:STDOUT: %Baz: type = fn_type @Baz [template] -// CHECK:STDOUT: %struct.2: Baz = struct_value () [template] +// CHECK:STDOUT: %Wiz: = struct_value () [template] +// CHECK:STDOUT: %Baz.type: type = fn_type @Baz [template] +// CHECK:STDOUT: %Baz: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -41,8 +41,8 @@ fn Foo.Bar.Baz() { // CHECK:STDOUT: .Wiz = %Wiz.decl // CHECK:STDOUT: .Baz = %Baz.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Wiz.decl: Wiz = fn_decl @Wiz [template = constants.%struct.1] {} -// CHECK:STDOUT: %Baz.decl: Baz = fn_decl @Baz [template = constants.%struct.2] {} +// CHECK:STDOUT: %Wiz.decl: = fn_decl @Wiz [template = constants.%Wiz] {} +// CHECK:STDOUT: %Baz.decl: = fn_decl @Baz [template = constants.%Baz] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Wiz() { @@ -54,7 +54,7 @@ fn Foo.Bar.Baz() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Foo.ref: = name_ref Foo, file.%Foo [template = file.%Foo] // CHECK:STDOUT: %Bar.ref: = name_ref Bar, file.%Bar [template = file.%Bar] -// CHECK:STDOUT: %Wiz.ref: Wiz = name_ref Wiz, file.%Wiz.decl [template = constants.%struct.1] +// CHECK:STDOUT: %Wiz.ref: = name_ref Wiz, file.%Wiz.decl [template = constants.%Wiz] // CHECK:STDOUT: %Wiz.call: init () = call %Wiz.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/namespace/shadow.carbon b/toolchain/check/testdata/namespace/shadow.carbon index bb990047d958..2351c89eddd4 100644 --- a/toolchain/check/testdata/namespace/shadow.carbon +++ b/toolchain/check/testdata/namespace/shadow.carbon @@ -30,15 +30,15 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: --- shadow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A.1: type = fn_type @A.1 [template] +// CHECK:STDOUT: %A.type.1: type = fn_type @A.1 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: A = struct_value () [template] -// CHECK:STDOUT: %A.2: type = fn_type @A.2 [template] -// CHECK:STDOUT: %struct.2: A = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.3: Int32 = struct_value () [template] -// CHECK:STDOUT: %B: type = fn_type @B [template] -// CHECK:STDOUT: %struct.4: B = struct_value () [template] +// CHECK:STDOUT: %A.1: = struct_value () [template] +// CHECK:STDOUT: %A.type.2: type = fn_type @A.2 [template] +// CHECK:STDOUT: %A.2: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] +// CHECK:STDOUT: %B: = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal true [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: } @@ -50,23 +50,23 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: .N = %N // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl.loc11: A = fn_decl @A.1 [template = constants.%struct.1] {} +// CHECK:STDOUT: %A.decl.loc11: = fn_decl @A.1 [template = constants.%A.1] {} // CHECK:STDOUT: %N: = namespace [template] { // CHECK:STDOUT: .A = %A.decl.loc14 // CHECK:STDOUT: .M = %M // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl.loc14: A = fn_decl @A.2 [template = constants.%struct.2] {} +// CHECK:STDOUT: %A.decl.loc14: = fn_decl @A.2 [template = constants.%A.2] {} // CHECK:STDOUT: %M: = namespace [template] { // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %B.decl: B = fn_decl @B [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.3() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_15.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc18_15.2: type = converted %int.make_type_32, %.loc18_15.1 [template = i32] // CHECK:STDOUT: @B.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A.1(); @@ -77,13 +77,13 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @B() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref.loc20: A = name_ref A, file.%A.decl.loc14 [template = constants.%struct.2] +// CHECK:STDOUT: %A.ref.loc20: = name_ref A, file.%A.decl.loc14 [template = constants.%A.2] // CHECK:STDOUT: %A.call: init () = call %A.ref.loc20() // CHECK:STDOUT: %.loc21: bool = bool_literal true [template = constants.%.2] // CHECK:STDOUT: if %.loc21 br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.3() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_12.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc22_12.2: type = converted %int.make_type_32, %.loc22_12.1 [template = i32] // CHECK:STDOUT: %A.var: ref i32 = var A diff --git a/toolchain/check/testdata/namespace/unqualified_lookup.carbon b/toolchain/check/testdata/namespace/unqualified_lookup.carbon index fd6e15993934..de79797e0fc4 100644 --- a/toolchain/check/testdata/namespace/unqualified_lookup.carbon +++ b/toolchain/check/testdata/namespace/unqualified_lookup.carbon @@ -33,19 +33,19 @@ fn OuterN.InnerN.CallABC() { // CHECK:STDOUT: --- unqualified_lookup.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: A = struct_value () [template] -// CHECK:STDOUT: %B: type = fn_type @B [template] -// CHECK:STDOUT: %struct.2: B = struct_value () [template] -// CHECK:STDOUT: %C: type = fn_type @C [template] -// CHECK:STDOUT: %struct.3: C = struct_value () [template] -// CHECK:STDOUT: %CallA: type = fn_type @CallA [template] -// CHECK:STDOUT: %struct.4: CallA = struct_value () [template] -// CHECK:STDOUT: %CallAB: type = fn_type @CallAB [template] -// CHECK:STDOUT: %struct.5: CallAB = struct_value () [template] -// CHECK:STDOUT: %CallABC: type = fn_type @CallABC [template] -// CHECK:STDOUT: %struct.6: CallABC = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] +// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %C.type: type = fn_type @C [template] +// CHECK:STDOUT: %C: = struct_value () [template] +// CHECK:STDOUT: %CallA.type: type = fn_type @CallA [template] +// CHECK:STDOUT: %CallA: = struct_value () [template] +// CHECK:STDOUT: %CallAB.type: type = fn_type @CallAB [template] +// CHECK:STDOUT: %CallAB: = struct_value () [template] +// CHECK:STDOUT: %CallABC.type: type = fn_type @CallABC [template] +// CHECK:STDOUT: %CallABC: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -65,12 +65,12 @@ fn OuterN.InnerN.CallABC() { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .CallABC = %CallABC.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct.1] {} -// CHECK:STDOUT: %B.decl: B = fn_decl @B [template = constants.%struct.2] {} -// CHECK:STDOUT: %C.decl: C = fn_decl @C [template = constants.%struct.3] {} -// CHECK:STDOUT: %CallA.decl: CallA = fn_decl @CallA [template = constants.%struct.4] {} -// CHECK:STDOUT: %CallAB.decl: CallAB = fn_decl @CallAB [template = constants.%struct.5] {} -// CHECK:STDOUT: %CallABC.decl: CallABC = fn_decl @CallABC [template = constants.%struct.6] {} +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} +// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] {} +// CHECK:STDOUT: %C.decl: = fn_decl @C [template = constants.%C] {} +// CHECK:STDOUT: %CallA.decl: = fn_decl @CallA [template = constants.%CallA] {} +// CHECK:STDOUT: %CallAB.decl: = fn_decl @CallAB [template = constants.%CallAB] {} +// CHECK:STDOUT: %CallABC.decl: = fn_decl @CallABC [template = constants.%CallABC] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -81,27 +81,27 @@ fn OuterN.InnerN.CallABC() { // CHECK:STDOUT: // CHECK:STDOUT: fn @CallA() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: A = name_ref A, file.%A.decl [template = constants.%struct.1] +// CHECK:STDOUT: %A.ref: = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %A.call: init () = call %A.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CallAB() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: A = name_ref A, file.%A.decl [template = constants.%struct.1] +// CHECK:STDOUT: %A.ref: = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %A.call: init () = call %A.ref() -// CHECK:STDOUT: %B.ref: B = name_ref B, file.%B.decl [template = constants.%struct.2] +// CHECK:STDOUT: %B.ref: = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %B.call: init () = call %B.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CallABC() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: A = name_ref A, file.%A.decl [template = constants.%struct.1] +// CHECK:STDOUT: %A.ref: = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %A.call: init () = call %A.ref() -// CHECK:STDOUT: %B.ref: B = name_ref B, file.%B.decl [template = constants.%struct.2] +// CHECK:STDOUT: %B.ref: = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %B.call: init () = call %B.ref() -// CHECK:STDOUT: %C.ref: C = name_ref C, file.%C.decl [template = constants.%struct.3] +// CHECK:STDOUT: %C.ref: = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.call: init () = call %C.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/builtin/and.carbon b/toolchain/check/testdata/operators/builtin/and.carbon index ce83690097c6..ce40e1e289cb 100644 --- a/toolchain/check/testdata/operators/builtin/and.carbon +++ b/toolchain/check/testdata/operators/builtin/and.carbon @@ -29,22 +29,22 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: --- and.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Bool = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal true [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] -// CHECK:STDOUT: %And: type = fn_type @And [template] -// CHECK:STDOUT: %struct.4: And = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %And.type: type = fn_type @And [template] +// CHECK:STDOUT: %And: = struct_value () [template] // CHECK:STDOUT: %.3: bool = bool_literal false [template] -// CHECK:STDOUT: %Constant: type = fn_type @Constant [template] -// CHECK:STDOUT: %struct.5: Constant = struct_value () [template] +// CHECK:STDOUT: %Constant.type: type = fn_type @Constant [template] +// CHECK:STDOUT: %Constant: = struct_value () [template] // CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %PartialConstant: type = fn_type @PartialConstant [template] -// CHECK:STDOUT: %struct.6: PartialConstant = struct_value () [template] +// CHECK:STDOUT: %PartialConstant.type: type = fn_type @PartialConstant [template] +// CHECK:STDOUT: %PartialConstant: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -57,41 +57,41 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: .PartialConstant = %PartialConstant.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %bool.make_type.loc11: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %bool.make_type.loc11: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %bool.make_type.loc11 [template = bool] // CHECK:STDOUT: %.loc11_11.2: type = converted %bool.make_type.loc11, %.loc11_11.1 [template = bool] // CHECK:STDOUT: @F.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { -// CHECK:STDOUT: %bool.make_type.loc12: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.2: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %bool.make_type.loc12: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_11.1: type = value_of_initializer %bool.make_type.loc12 [template = bool] // CHECK:STDOUT: %.loc12_11.2: type = converted %bool.make_type.loc12, %.loc12_11.1 [template = bool] // CHECK:STDOUT: @G.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %And.decl: And = fn_decl @And [template = constants.%struct.4] { -// CHECK:STDOUT: %bool.make_type.loc14: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %And.decl: = fn_decl @And [template = constants.%And] { +// CHECK:STDOUT: %bool.make_type.loc14: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %bool.make_type.loc14 [template = bool] // CHECK:STDOUT: %.loc14_13.2: type = converted %bool.make_type.loc14, %.loc14_13.1 [template = bool] // CHECK:STDOUT: @And.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Constant.decl: Constant = fn_decl @Constant [template = constants.%struct.5] {} -// CHECK:STDOUT: %import_ref.4: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %PartialConstant.decl: PartialConstant = fn_decl @PartialConstant [template = constants.%struct.6] { -// CHECK:STDOUT: %bool.make_type.loc25: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %Constant.decl: = fn_decl @Constant [template = constants.%Constant] {} +// CHECK:STDOUT: %import_ref.4: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.5: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.6: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.7: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %PartialConstant.decl: = fn_decl @PartialConstant [template = constants.%PartialConstant] { +// CHECK:STDOUT: %bool.make_type.loc25: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc25_23.1: type = value_of_initializer %bool.make_type.loc25 [template = bool] // CHECK:STDOUT: %.loc25_23.2: type = converted %bool.make_type.loc25, %.loc25_23.1 [template = bool] // CHECK:STDOUT: %x.loc25_20.1: bool = param x // CHECK:STDOUT: @PartialConstant.%x: bool = bind_name x, %x.loc25_20.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.9: = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; @@ -110,7 +110,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: fn @And() -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init bool = call %F.ref() // CHECK:STDOUT: %.loc15_14.1: bool = value_of_initializer %F.call // CHECK:STDOUT: %.loc15_14.2: bool = converted %F.call, %.loc15_14.1 @@ -118,7 +118,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: if %.loc15_14.2 br !and.rhs else br !and.result(%.loc15_14.3) // CHECK:STDOUT: // CHECK:STDOUT: !and.rhs: -// CHECK:STDOUT: %G.ref: G = name_ref G, file.%G.decl [template = constants.%struct.3] +// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %G.call: init bool = call %G.ref() // CHECK:STDOUT: %.loc15_14.4: bool = value_of_initializer %G.call // CHECK:STDOUT: %.loc15_14.5: bool = converted %G.call, %.loc15_14.4 @@ -144,7 +144,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: if %.loc19_18.2 br !if.expr.then.loc19 else br !if.expr.else.loc19 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc19: -// CHECK:STDOUT: %bool.make_type.loc19: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc19: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc19_32.1: type = value_of_initializer %bool.make_type.loc19 [template = bool] // CHECK:STDOUT: %.loc19_32.2: type = converted %bool.make_type.loc19, %.loc19_32.1 [template = bool] // CHECK:STDOUT: br !if.expr.result.loc19(%.loc19_32.2) @@ -173,7 +173,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: if %.loc20_18.2 br !if.expr.then.loc20 else br !if.expr.else.loc20 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc20: -// CHECK:STDOUT: %bool.make_type.loc20: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc20: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc20_33.1: type = value_of_initializer %bool.make_type.loc20 [template = bool] // CHECK:STDOUT: %.loc20_33.2: type = converted %bool.make_type.loc20, %.loc20_33.1 [template = bool] // CHECK:STDOUT: br !if.expr.result.loc20(%.loc20_33.2) @@ -204,7 +204,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: if %.loc21_19.2 br !if.expr.then.loc21 else br !if.expr.else.loc21 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc21: -// CHECK:STDOUT: %bool.make_type.loc21: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc21: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc21_33.1: type = value_of_initializer %bool.make_type.loc21 [template = bool] // CHECK:STDOUT: %.loc21_33.2: type = converted %bool.make_type.loc21, %.loc21_33.1 [template = bool] // CHECK:STDOUT: br !if.expr.result.loc21(%.loc21_33.2) @@ -235,7 +235,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: if %.loc22_19.2 br !if.expr.then.loc22 else br !if.expr.else.loc22 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc22: -// CHECK:STDOUT: %bool.make_type.loc22: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc22: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc22_34.1: type = value_of_initializer %bool.make_type.loc22 [template = bool] // CHECK:STDOUT: %.loc22_34.2: type = converted %bool.make_type.loc22, %.loc22_34.1 [template = bool] // CHECK:STDOUT: br !if.expr.result.loc22(%.loc22_34.2) @@ -271,7 +271,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: if %.loc26_19.2 br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc26_30.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc26_30.2: type = converted %bool.make_type, %.loc26_30.1 [template = bool] // CHECK:STDOUT: br !if.expr.result(%.loc26_30.2) diff --git a/toolchain/check/testdata/operators/builtin/assignment.carbon b/toolchain/check/testdata/operators/builtin/assignment.carbon index 29a623341a95..df0061c44f02 100644 --- a/toolchain/check/testdata/operators/builtin/assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/assignment.carbon @@ -29,11 +29,11 @@ fn Main() { // CHECK:STDOUT: --- assignment.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Main: type = fn_type @Main [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Main = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] +// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 12 [template] // CHECK:STDOUT: %.3: i32 = int_literal 9 [template] // CHECK:STDOUT: %.4: type = tuple_type (type, type) [template] @@ -47,7 +47,7 @@ fn Main() { // CHECK:STDOUT: %.11: i32 = int_literal 4 [template] // CHECK:STDOUT: %.12: type = struct_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %.13: type = ptr_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %struct.3: {.a: i32, .b: i32} = struct_value (%.7, %.8) [template] +// CHECK:STDOUT: %struct: {.a: i32, .b: i32} = struct_value (%.7, %.8) [template] // CHECK:STDOUT: %.14: type = ptr_type i32 [template] // CHECK:STDOUT: %.15: i32 = int_literal 5 [template] // CHECK:STDOUT: %.16: bool = bool_literal true [template] @@ -60,18 +60,18 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %a.var: ref i32 = var a @@ -81,8 +81,8 @@ fn Main() { // CHECK:STDOUT: %a.ref.loc13: ref i32 = name_ref a, %a // CHECK:STDOUT: %.loc13: i32 = int_literal 9 [template = constants.%.3] // CHECK:STDOUT: assign %a.ref.loc13, %.loc13 -// CHECK:STDOUT: %int.make_type_32.loc15_11: init type = call constants.%struct.2() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc15_16: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc15_11: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc15_16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_19.1: (type, type) = tuple_literal (%int.make_type_32.loc15_11, %int.make_type_32.loc15_16) // CHECK:STDOUT: %.loc15_19.2: type = value_of_initializer %int.make_type_32.loc15_11 [template = i32] // CHECK:STDOUT: %.loc15_19.3: type = converted %int.make_type_32.loc15_11, %.loc15_19.2 [template = i32] @@ -111,10 +111,10 @@ fn Main() { // CHECK:STDOUT: %.loc17_6: ref i32 = tuple_index %b.ref.loc17, %.loc17_5 // CHECK:STDOUT: %.loc17_10: i32 = int_literal 4 [template = constants.%.11] // CHECK:STDOUT: assign %.loc17_6, %.loc17_10 -// CHECK:STDOUT: %int.make_type_32.loc19_15: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc19_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_15.1: type = value_of_initializer %int.make_type_32.loc19_15 [template = i32] // CHECK:STDOUT: %.loc19_15.2: type = converted %int.make_type_32.loc19_15, %.loc19_15.1 [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc19_24: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc19_24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_24.1: type = value_of_initializer %int.make_type_32.loc19_24 [template = i32] // CHECK:STDOUT: %.loc19_24.2: type = converted %int.make_type_32.loc19_24, %.loc19_24.1 [template = i32] // CHECK:STDOUT: %.loc19_27: type = struct_type {.a: i32, .b: i32} [template = constants.%.12] @@ -127,8 +127,8 @@ fn Main() { // CHECK:STDOUT: %.loc19_46.3: init i32 = initialize_from %.loc19_37 to %.loc19_46.2 [template = constants.%.7] // CHECK:STDOUT: %.loc19_46.4: ref i32 = struct_access %c.var, element1 // CHECK:STDOUT: %.loc19_46.5: init i32 = initialize_from %.loc19_45 to %.loc19_46.4 [template = constants.%.8] -// CHECK:STDOUT: %.loc19_46.6: init {.a: i32, .b: i32} = struct_init (%.loc19_46.3, %.loc19_46.5) to %c.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc19_47: init {.a: i32, .b: i32} = converted %.loc19_46.1, %.loc19_46.6 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc19_46.6: init {.a: i32, .b: i32} = struct_init (%.loc19_46.3, %.loc19_46.5) to %c.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_47: init {.a: i32, .b: i32} = converted %.loc19_46.1, %.loc19_46.6 [template = constants.%struct] // CHECK:STDOUT: assign %c.var, %.loc19_47 // CHECK:STDOUT: %c.ref.loc20: ref {.a: i32, .b: i32} = name_ref c, %c // CHECK:STDOUT: %.loc20_4: ref i32 = struct_access %c.ref.loc20, element0 @@ -138,7 +138,7 @@ fn Main() { // CHECK:STDOUT: %.loc21_4: ref i32 = struct_access %c.ref.loc21, element1 // CHECK:STDOUT: %.loc21_9: i32 = int_literal 4 [template = constants.%.11] // CHECK:STDOUT: assign %.loc21_4, %.loc21_9 -// CHECK:STDOUT: %int.make_type_32.loc23: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_13.1: type = value_of_initializer %int.make_type_32.loc23 [template = i32] // CHECK:STDOUT: %.loc23_13.2: type = converted %int.make_type_32.loc23, %.loc23_13.1 [template = i32] // CHECK:STDOUT: %.loc23_13.3: type = ptr_type i32 [template = constants.%.14] diff --git a/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon b/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon index e2ce21bf786e..4a87965965c0 100644 --- a/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon @@ -44,16 +44,16 @@ var or_: F(true or true); // CHECK:STDOUT: --- fail_and_or_not_in_function.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Bool = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.3: Int32 = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] -// CHECK:STDOUT: %struct.4: Float = struct_value () [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] +// CHECK:STDOUT: %Float: = struct_value () [template] // CHECK:STDOUT: %.3: bool = bool_literal true [template] // CHECK:STDOUT: %.4: bool = bool_literal false [template] // CHECK:STDOUT: } @@ -75,14 +75,14 @@ var or_: F(true or true); // CHECK:STDOUT: if %b.ref br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.3() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_20.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc13_20.2: type = converted %int.make_type_32, %.loc13_20.1 [template = i32] // CHECK:STDOUT: br !if.expr.result(%.loc13_20.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: // CHECK:STDOUT: %.loc13_29: i32 = int_literal 64 [template = constants.%.2] -// CHECK:STDOUT: %float.make_type: init type = call constants.%struct.4(%.loc13_29) [template = f64] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc13_29) [template = f64] // CHECK:STDOUT: %.loc13_24.1: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc13_24.2: type = converted %float.make_type, %.loc13_24.1 [template = f64] // CHECK:STDOUT: br !if.expr.result(%.loc13_24.2) diff --git a/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon b/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon index 80eeb6a6617a..d22bed4b1f65 100644 --- a/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon @@ -46,11 +46,11 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: --- fail_non_constant_result.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Bool = struct_value () [template] -// CHECK:STDOUT: %PartialConstant: type = fn_type @PartialConstant [template] -// CHECK:STDOUT: %struct.2: PartialConstant = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %PartialConstant.type: type = fn_type @PartialConstant [template] +// CHECK:STDOUT: %PartialConstant: = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal true [template] // CHECK:STDOUT: %.3: bool = bool_literal false [template] // CHECK:STDOUT: } @@ -61,16 +61,16 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: .PartialConstant = %PartialConstant.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %PartialConstant.decl: PartialConstant = fn_decl @PartialConstant [template = constants.%struct.2] { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %PartialConstant.decl: = fn_decl @PartialConstant [template = constants.%PartialConstant] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc4_23.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc4_23.2: type = converted %bool.make_type, %.loc4_23.1 [template = bool] // CHECK:STDOUT: %x.loc4_20.1: bool = param x // CHECK:STDOUT: @PartialConstant.%x: bool = bind_name x, %x.loc4_20.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.2: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; @@ -90,7 +90,7 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: if %.loc9_18.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: -// CHECK:STDOUT: %bool.make_type.loc9: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc9: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc9_29.1: type = value_of_initializer %bool.make_type.loc9 [template = bool] // CHECK:STDOUT: %.loc9_29.2: type = converted %bool.make_type.loc9, %.loc9_29.1 [template = bool] // CHECK:STDOUT: br !if.expr.result.loc9(%.loc9_29.2) @@ -118,7 +118,7 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: if %.loc14_19.3 br !if.expr.then.loc14 else br !if.expr.else.loc14 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc14: -// CHECK:STDOUT: %bool.make_type.loc14: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc14: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc14_29.1: type = value_of_initializer %bool.make_type.loc14 [template = bool] // CHECK:STDOUT: %.loc14_29.2: type = converted %bool.make_type.loc14, %.loc14_29.1 [template = bool] // CHECK:STDOUT: br !if.expr.result.loc14(%.loc14_29.2) @@ -138,11 +138,11 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: --- fail_despite_known_result.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Bool = struct_value () [template] -// CHECK:STDOUT: %KnownValueButNonConstantCondition: type = fn_type @KnownValueButNonConstantCondition [template] -// CHECK:STDOUT: %struct.2: KnownValueButNonConstantCondition = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %KnownValueButNonConstantCondition.type: type = fn_type @KnownValueButNonConstantCondition [template] +// CHECK:STDOUT: %KnownValueButNonConstantCondition: = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal false [template] // CHECK:STDOUT: %.3: bool = bool_literal true [template] // CHECK:STDOUT: } @@ -153,16 +153,16 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: .KnownValueButNonConstantCondition = %KnownValueButNonConstantCondition.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %KnownValueButNonConstantCondition.decl: KnownValueButNonConstantCondition = fn_decl @KnownValueButNonConstantCondition [template = constants.%struct.2] { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %KnownValueButNonConstantCondition.decl: = fn_decl @KnownValueButNonConstantCondition [template = constants.%KnownValueButNonConstantCondition] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc4_41.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc4_41.2: type = converted %bool.make_type, %.loc4_41.1 [template = bool] // CHECK:STDOUT: %x.loc4_38.1: bool = param x // CHECK:STDOUT: @KnownValueButNonConstantCondition.%x: bool = bind_name x, %x.loc4_38.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.2: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; @@ -182,7 +182,7 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: if %.loc11_15.2 br !if.expr.then.loc11 else br !if.expr.else.loc11 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc11: -// CHECK:STDOUT: %bool.make_type.loc11: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc11: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_30.1: type = value_of_initializer %bool.make_type.loc11 [template = bool] // CHECK:STDOUT: %.loc11_30.2: type = converted %bool.make_type.loc11, %.loc11_30.1 [template = bool] // CHECK:STDOUT: br !if.expr.result.loc11(%.loc11_30.2) @@ -210,7 +210,7 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: if %.loc15_15.3 br !if.expr.then.loc15 else br !if.expr.else.loc15 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc15: -// CHECK:STDOUT: %bool.make_type.loc15: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc15: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc15_28.1: type = value_of_initializer %bool.make_type.loc15 [template = bool] // CHECK:STDOUT: %.loc15_28.2: type = converted %bool.make_type.loc15, %.loc15_28.1 [template = bool] // CHECK:STDOUT: br !if.expr.result.loc15(%.loc15_28.2) diff --git a/toolchain/check/testdata/operators/builtin/fail_assignment_to_error.carbon b/toolchain/check/testdata/operators/builtin/fail_assignment_to_error.carbon index 69b1b312fab5..5b6e69dc6a6e 100644 --- a/toolchain/check/testdata/operators/builtin/fail_assignment_to_error.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_assignment_to_error.carbon @@ -23,9 +23,9 @@ fn Main() { // CHECK:STDOUT: --- fail_assignment_to_error.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Main: type = fn_type @Main [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Main = struct_value () [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 42 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -35,7 +35,7 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { diff --git a/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon b/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon index fd27f0400a18..483d321f4978 100644 --- a/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon @@ -59,13 +59,13 @@ fn Main() { // CHECK:STDOUT: --- fail_assignment_to_non_assignable.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.3: Main = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: i32 = int_literal 2 [template] // CHECK:STDOUT: %.4: type = tuple_type (i32, i32) [template] @@ -78,8 +78,8 @@ fn Main() { // CHECK:STDOUT: %.9: type = ptr_type i32 [template] // CHECK:STDOUT: %.10: type = struct_type {.x: i32, .y: i32} [template] // CHECK:STDOUT: %.11: type = ptr_type {.x: i32, .y: i32} [template] -// CHECK:STDOUT: %struct.4: {.x: i32, .y: i32} = struct_value (%.5, %.6) [template] -// CHECK:STDOUT: %struct.5: {.x: i32, .y: i32} = struct_value (%.2, %.3) [template] +// CHECK:STDOUT: %struct.1: {.x: i32, .y: i32} = struct_value (%.5, %.6) [template] +// CHECK:STDOUT: %struct.2: {.x: i32, .y: i32} = struct_value (%.2, %.3) [template] // CHECK:STDOUT: %.12: bool = bool_literal true [template] // CHECK:STDOUT: %.13: i32 = int_literal 10 [template] // CHECK:STDOUT: } @@ -91,18 +91,18 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.3] {} -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -114,7 +114,7 @@ fn Main() { // CHECK:STDOUT: %.loc18_3: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc18_7: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: assign %.loc18_3, %.loc18_7 -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init i32 = call %F.ref() // CHECK:STDOUT: %.loc23: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: assign %F.call, %.loc23 @@ -133,7 +133,7 @@ fn Main() { // CHECK:STDOUT: assign %.loc28_8.1, %.loc28_10 // CHECK:STDOUT: %tuple.loc28: (i32, i32) = tuple_value (%.loc28_4, %.loc28_7) [template = constants.%tuple.2] // CHECK:STDOUT: %.loc28_8.2: (i32, i32) = converted %.loc28_8.1, %tuple.loc28 [template = constants.%tuple.2] -// CHECK:STDOUT: %int.make_type_32.loc29: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc29: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc29_10.1: type = value_of_initializer %int.make_type_32.loc29 [template = i32] // CHECK:STDOUT: %.loc29_10.2: type = converted %int.make_type_32.loc29, %.loc29_10.1 [template = i32] // CHECK:STDOUT: %n.var: ref i32 = var n @@ -157,8 +157,8 @@ fn Main() { // CHECK:STDOUT: %.loc34_7: i32 = bind_value %n.ref.loc34_7 // CHECK:STDOUT: %tuple.loc34: (i32, i32) = tuple_value (%.loc34_4, %.loc34_7) // CHECK:STDOUT: %.loc34_8.2: (i32, i32) = converted %.loc34_8.1, %tuple.loc34 -// CHECK:STDOUT: %int.make_type_32.loc39_3: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc39_9: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc39_3: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc39_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc39_12.1: type = value_of_initializer %int.make_type_32.loc39_9 [template = i32] // CHECK:STDOUT: %.loc39_12.2: type = converted %int.make_type_32.loc39_9, %.loc39_12.1 [template = i32] // CHECK:STDOUT: %.loc39_12.3: type = ptr_type i32 [template = constants.%.9] @@ -173,11 +173,11 @@ fn Main() { // CHECK:STDOUT: %.loc44_37.3: init i32 = initialize_from %.loc44_28 to %.loc44_37.2 [template = constants.%.5] // CHECK:STDOUT: %.loc44_37.4: i32 = struct_access %.loc44_18.1, element1 // CHECK:STDOUT: %.loc44_37.5: init i32 = initialize_from %.loc44_36 to %.loc44_37.4 [template = constants.%.6] -// CHECK:STDOUT: %.loc44_37.6: init {.x: i32, .y: i32} = struct_init (%.loc44_37.3, %.loc44_37.5) to %.loc44_18.1 [template = constants.%struct.4] -// CHECK:STDOUT: %.loc44_20: init {.x: i32, .y: i32} = converted %.loc44_37.1, %.loc44_37.6 [template = constants.%struct.4] +// CHECK:STDOUT: %.loc44_37.6: init {.x: i32, .y: i32} = struct_init (%.loc44_37.3, %.loc44_37.5) to %.loc44_18.1 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc44_20: init {.x: i32, .y: i32} = converted %.loc44_37.1, %.loc44_37.6 [template = constants.%struct.1] // CHECK:STDOUT: assign %.loc44_18.1, %.loc44_20 -// CHECK:STDOUT: %struct: {.x: i32, .y: i32} = struct_value (%.loc44_9, %.loc44_17) [template = constants.%struct.5] -// CHECK:STDOUT: %.loc44_18.2: {.x: i32, .y: i32} = converted %.loc44_18.1, %struct [template = constants.%struct.5] +// CHECK:STDOUT: %struct: {.x: i32, .y: i32} = struct_value (%.loc44_9, %.loc44_17) [template = constants.%struct.2] +// CHECK:STDOUT: %.loc44_18.2: {.x: i32, .y: i32} = converted %.loc44_18.1, %struct [template = constants.%struct.2] // CHECK:STDOUT: %.loc49_7: bool = bool_literal true [template = constants.%.12] // CHECK:STDOUT: if %.loc49_7 br !if.expr.then.loc49 else br !if.expr.else.loc49 // CHECK:STDOUT: @@ -193,7 +193,7 @@ fn Main() { // CHECK:STDOUT: %.loc49_4: i32 = block_arg !if.expr.result.loc49 [template = constants.%.2] // CHECK:STDOUT: %.loc49_29: i32 = int_literal 3 [template = constants.%.5] // CHECK:STDOUT: assign %.loc49_4, %.loc49_29 -// CHECK:STDOUT: %int.make_type_32.loc52: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc52: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc52_10.1: type = value_of_initializer %int.make_type_32.loc52 [template = i32] // CHECK:STDOUT: %.loc52_10.2: type = converted %int.make_type_32.loc52, %.loc52_10.1 [template = i32] // CHECK:STDOUT: %a.var: ref i32 = var a diff --git a/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon b/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon index 6737f0d3934a..6d40f63965fb 100644 --- a/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon @@ -17,7 +17,7 @@ fn Main() { // CHECK:STDERR: ^~~~~ // CHECK:STDERR: a = a.(a); - // CHECK:STDERR: fail_redundant_compound_access.carbon:[[@LINE+3]]:7: ERROR: Member name of type `F` in compound member access is not an instance member or an interface member. + // CHECK:STDERR: fail_redundant_compound_access.carbon:[[@LINE+3]]:7: ERROR: Member name of type `` in compound member access is not an instance member or an interface member. // CHECK:STDERR: a = a.(F)(); // CHECK:STDERR: ^~~~~ a = a.(F)(); @@ -26,14 +26,14 @@ fn Main() { // CHECK:STDOUT: --- fail_redundant_compound_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.3: Main = struct_value () [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -44,15 +44,15 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.3] {} -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -65,7 +65,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_32, %.loc14_10.1 [template = i32] // CHECK:STDOUT: %a.var: ref i32 = var a @@ -79,7 +79,7 @@ fn Main() { // CHECK:STDOUT: assign %a.ref.loc19_3, %.loc19 // CHECK:STDOUT: %a.ref.loc23_3: ref i32 = name_ref a, %a // CHECK:STDOUT: %a.ref.loc23_7: ref i32 = name_ref a, %a -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init i32 = call %F.ref() // CHECK:STDOUT: assign %a.ref.loc23_3, %F.call // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon index e0822b289dcc..3d29da7e6076 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon @@ -18,11 +18,11 @@ fn Main() { // CHECK:STDOUT: --- fail_type_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Main: type = fn_type @Main [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Main = struct_value () [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.2: Bool = struct_value () [template] +// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -32,13 +32,13 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %import_ref: = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct.2() [template = bool] +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc15_10.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc15_10.2: type = converted %bool.make_type, %.loc15_10.1 [template = bool] // CHECK:STDOUT: %x.var: ref bool = var x diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon index 021b10a899f4..a99628193fbb 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon @@ -19,11 +19,11 @@ fn Main() { // CHECK:STDOUT: --- fail_type_mismatch_assignment.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Main: type = fn_type @Main [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Main = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] +// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 3 [template] // CHECK:STDOUT: %.3: f64 = float_literal 5.6000000000000005 [template] // CHECK:STDOUT: } @@ -34,13 +34,13 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %a.var: ref i32 = var a diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon index 366ebf9249ec..dac6c06d3efe 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon @@ -24,19 +24,19 @@ fn Main() -> i32 { // CHECK:STDOUT: --- fail_type_mismatch_once.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.2: Main = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 12 [template] // CHECK:STDOUT: %.3: f64 = float_literal 3.4000000000000004 [template] // CHECK:STDOUT: %.4: type = interface_type @Add [template] // CHECK:STDOUT: %Self: Add = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Op: type = fn_type @Op [template] -// CHECK:STDOUT: %struct.3: Op = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @Add, Op [template] -// CHECK:STDOUT: %.6: = assoc_entity element0, file.%import_ref.6 [template] +// CHECK:STDOUT: %Op.type: type = fn_type @Op [template] +// CHECK:STDOUT: %Op: = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @Add, [template] +// CHECK:STDOUT: %.6: in Add> = assoc_entity element0, file.%import_ref.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -45,16 +45,16 @@ fn Main() -> i32 { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_32, %.loc11_14.1 [template = i32] // CHECK:STDOUT: @Main.%return: ref i32 = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.2: type = import_ref ir4, inst+1, loaded [template = constants.%.4] // CHECK:STDOUT: %import_ref.3 = import_ref ir4, inst+3, unloaded -// CHECK:STDOUT: %import_ref.4: = import_ref ir4, inst+24, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.4: in Add> = import_ref ir4, inst+24, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.5 = import_ref ir4, inst+19, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref ir4, inst+19, unloaded // CHECK:STDOUT: %import_ref.7: type = import_ref ir4, inst+1, loaded [template = constants.%.4] diff --git a/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon b/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon index b6f374b1157b..5908df3f0975 100644 --- a/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon @@ -18,19 +18,19 @@ fn Main() -> i32 { // CHECK:STDOUT: --- fail_unimplemented_op.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.2: Main = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 12 [template] // CHECK:STDOUT: %.3: i32 = int_literal 34 [template] // CHECK:STDOUT: %.4: type = interface_type @Add [template] // CHECK:STDOUT: %Self: Add = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Op: type = fn_type @Op [template] -// CHECK:STDOUT: %struct.3: Op = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @Add, Op [template] -// CHECK:STDOUT: %.6: = assoc_entity element0, file.%import_ref.6 [template] +// CHECK:STDOUT: %Op.type: type = fn_type @Op [template] +// CHECK:STDOUT: %Op: = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @Add, [template] +// CHECK:STDOUT: %.6: in Add> = assoc_entity element0, file.%import_ref.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -39,16 +39,16 @@ fn Main() -> i32 { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_32, %.loc11_14.1 [template = i32] // CHECK:STDOUT: @Main.%return: ref i32 = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.2: type = import_ref ir4, inst+1, loaded [template = constants.%.4] // CHECK:STDOUT: %import_ref.3 = import_ref ir4, inst+3, unloaded -// CHECK:STDOUT: %import_ref.4: = import_ref ir4, inst+24, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.4: in Add> = import_ref ir4, inst+24, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.5 = import_ref ir4, inst+19, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref ir4, inst+19, unloaded // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/builtin/or.carbon b/toolchain/check/testdata/operators/builtin/or.carbon index a33b2d00b5b2..7c218779f3de 100644 --- a/toolchain/check/testdata/operators/builtin/or.carbon +++ b/toolchain/check/testdata/operators/builtin/or.carbon @@ -29,22 +29,22 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: --- or.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Bool = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal true [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] -// CHECK:STDOUT: %Or: type = fn_type @Or [template] -// CHECK:STDOUT: %struct.4: Or = struct_value () [template] -// CHECK:STDOUT: %Constant: type = fn_type @Constant [template] -// CHECK:STDOUT: %struct.5: Constant = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %Or.type: type = fn_type @Or [template] +// CHECK:STDOUT: %Or: = struct_value () [template] +// CHECK:STDOUT: %Constant.type: type = fn_type @Constant [template] +// CHECK:STDOUT: %Constant: = struct_value () [template] // CHECK:STDOUT: %.3: bool = bool_literal false [template] // CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %PartialConstant: type = fn_type @PartialConstant [template] -// CHECK:STDOUT: %struct.6: PartialConstant = struct_value () [template] +// CHECK:STDOUT: %PartialConstant.type: type = fn_type @PartialConstant [template] +// CHECK:STDOUT: %PartialConstant: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -57,41 +57,41 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: .PartialConstant = %PartialConstant.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %bool.make_type.loc11: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %bool.make_type.loc11: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %bool.make_type.loc11 [template = bool] // CHECK:STDOUT: %.loc11_11.2: type = converted %bool.make_type.loc11, %.loc11_11.1 [template = bool] // CHECK:STDOUT: @F.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { -// CHECK:STDOUT: %bool.make_type.loc12: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.2: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %bool.make_type.loc12: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_11.1: type = value_of_initializer %bool.make_type.loc12 [template = bool] // CHECK:STDOUT: %.loc12_11.2: type = converted %bool.make_type.loc12, %.loc12_11.1 [template = bool] // CHECK:STDOUT: @G.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Or.decl: Or = fn_decl @Or [template = constants.%struct.4] { -// CHECK:STDOUT: %bool.make_type.loc14: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Or.decl: = fn_decl @Or [template = constants.%Or] { +// CHECK:STDOUT: %bool.make_type.loc14: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc14_12.1: type = value_of_initializer %bool.make_type.loc14 [template = bool] // CHECK:STDOUT: %.loc14_12.2: type = converted %bool.make_type.loc14, %.loc14_12.1 [template = bool] // CHECK:STDOUT: @Or.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Constant.decl: Constant = fn_decl @Constant [template = constants.%struct.5] {} -// CHECK:STDOUT: %import_ref.4: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %PartialConstant.decl: PartialConstant = fn_decl @PartialConstant [template = constants.%struct.6] { -// CHECK:STDOUT: %bool.make_type.loc25: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %Constant.decl: = fn_decl @Constant [template = constants.%Constant] {} +// CHECK:STDOUT: %import_ref.4: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.5: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.6: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.7: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %PartialConstant.decl: = fn_decl @PartialConstant [template = constants.%PartialConstant] { +// CHECK:STDOUT: %bool.make_type.loc25: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc25_23.1: type = value_of_initializer %bool.make_type.loc25 [template = bool] // CHECK:STDOUT: %.loc25_23.2: type = converted %bool.make_type.loc25, %.loc25_23.1 [template = bool] // CHECK:STDOUT: %x.loc25_20.1: bool = param x // CHECK:STDOUT: @PartialConstant.%x: bool = bind_name x, %x.loc25_20.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.9: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.9: = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; @@ -110,7 +110,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: fn @Or() -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init bool = call %F.ref() // CHECK:STDOUT: %.loc15_14.1: bool = value_of_initializer %F.call // CHECK:STDOUT: %.loc15_14.2: bool = converted %F.call, %.loc15_14.1 @@ -119,7 +119,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: if %.loc15_14.3 br !or.rhs else br !or.result(%.loc15_14.4) // CHECK:STDOUT: // CHECK:STDOUT: !or.rhs: -// CHECK:STDOUT: %G.ref: G = name_ref G, file.%G.decl [template = constants.%struct.3] +// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %G.call: init bool = call %G.ref() // CHECK:STDOUT: %.loc15_14.5: bool = value_of_initializer %G.call // CHECK:STDOUT: %.loc15_14.6: bool = converted %G.call, %.loc15_14.5 @@ -146,7 +146,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: if %.loc19_18.3 br !if.expr.then.loc19 else br !if.expr.else.loc19 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc19: -// CHECK:STDOUT: %bool.make_type.loc19: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc19: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc19_31.1: type = value_of_initializer %bool.make_type.loc19 [template = bool] // CHECK:STDOUT: %.loc19_31.2: type = converted %bool.make_type.loc19, %.loc19_31.1 [template = bool] // CHECK:STDOUT: br !if.expr.result.loc19(%.loc19_31.2) @@ -176,7 +176,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: if %.loc20_18.3 br !if.expr.then.loc20 else br !if.expr.else.loc20 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc20: -// CHECK:STDOUT: %bool.make_type.loc20: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc20: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc20_32.1: type = value_of_initializer %bool.make_type.loc20 [template = bool] // CHECK:STDOUT: %.loc20_32.2: type = converted %bool.make_type.loc20, %.loc20_32.1 [template = bool] // CHECK:STDOUT: br !if.expr.result.loc20(%.loc20_32.2) @@ -206,7 +206,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: if %.loc21_19.3 br !if.expr.then.loc21 else br !if.expr.else.loc21 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc21: -// CHECK:STDOUT: %bool.make_type.loc21: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc21: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc21_32.1: type = value_of_initializer %bool.make_type.loc21 [template = bool] // CHECK:STDOUT: %.loc21_32.2: type = converted %bool.make_type.loc21, %.loc21_32.1 [template = bool] // CHECK:STDOUT: br !if.expr.result.loc21(%.loc21_32.2) @@ -236,7 +236,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: if %.loc22_19.3 br !if.expr.then.loc22 else br !if.expr.else.loc22 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc22: -// CHECK:STDOUT: %bool.make_type.loc22: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc22: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc22_33.1: type = value_of_initializer %bool.make_type.loc22 [template = bool] // CHECK:STDOUT: %.loc22_33.2: type = converted %bool.make_type.loc22, %.loc22_33.1 [template = bool] // CHECK:STDOUT: br !if.expr.result.loc22(%.loc22_33.2) @@ -273,7 +273,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: if %.loc26_18.3 br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc26_28.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc26_28.2: type = converted %bool.make_type, %.loc26_28.1 [template = bool] // CHECK:STDOUT: br !if.expr.result(%.loc26_28.2) diff --git a/toolchain/check/testdata/operators/builtin/unary_op.carbon b/toolchain/check/testdata/operators/builtin/unary_op.carbon index cc2df6ca7ba8..f2335fc6ce6e 100644 --- a/toolchain/check/testdata/operators/builtin/unary_op.carbon +++ b/toolchain/check/testdata/operators/builtin/unary_op.carbon @@ -23,15 +23,15 @@ fn Constant() { // CHECK:STDOUT: --- unary_op.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Bool = struct_value () [template] -// CHECK:STDOUT: %Not: type = fn_type @Not [template] -// CHECK:STDOUT: %struct.2: Not = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Not.type: type = fn_type @Not [template] +// CHECK:STDOUT: %Not: = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal true [template] // CHECK:STDOUT: %.3: bool = bool_literal false [template] -// CHECK:STDOUT: %Constant: type = fn_type @Constant [template] -// CHECK:STDOUT: %struct.3: Constant = struct_value () [template] +// CHECK:STDOUT: %Constant.type: type = fn_type @Constant [template] +// CHECK:STDOUT: %Constant: = struct_value () [template] // CHECK:STDOUT: %tuple: () = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -42,36 +42,36 @@ fn Constant() { // CHECK:STDOUT: .Constant = %Constant.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Not.decl: Not = fn_decl @Not [template = constants.%struct.2] { -// CHECK:STDOUT: %bool.make_type.loc11_11: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.2: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Not.decl: = fn_decl @Not [template = constants.%Not] { +// CHECK:STDOUT: %bool.make_type.loc11_11: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %bool.make_type.loc11_11 [template = bool] // CHECK:STDOUT: %.loc11_11.2: type = converted %bool.make_type.loc11_11, %.loc11_11.1 [template = bool] // CHECK:STDOUT: %b.loc11_8.1: bool = param b // CHECK:STDOUT: @Not.%b: bool = bind_name b, %b.loc11_8.1 -// CHECK:STDOUT: %bool.make_type.loc11_20: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc11_20: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_20.1: type = value_of_initializer %bool.make_type.loc11_20 [template = bool] // CHECK:STDOUT: %.loc11_20.2: type = converted %bool.make_type.loc11_20, %.loc11_20.1 [template = bool] // CHECK:STDOUT: @Not.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %bool.make_type.loc15: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %bool.make_type.loc15: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc15_15.1: type = value_of_initializer %bool.make_type.loc15 [template = bool] // CHECK:STDOUT: %.loc15_15.2: type = converted %bool.make_type.loc15, %.loc15_15.1 [template = bool] // CHECK:STDOUT: %.loc15_26: bool = bool_literal true [template = constants.%.2] // CHECK:STDOUT: %.loc15_22: bool = not %.loc15_26 [template = constants.%.3] // CHECK:STDOUT: %not_true: bool = bind_name not_true, %.loc15_22 -// CHECK:STDOUT: %import_ref.4: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.4: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_16.1: type = value_of_initializer %bool.make_type.loc16 [template = bool] // CHECK:STDOUT: %.loc16_16.2: type = converted %bool.make_type.loc16, %.loc16_16.1 [template = bool] // CHECK:STDOUT: %.loc16_27: bool = bool_literal false [template = constants.%.3] // CHECK:STDOUT: %.loc16_23: bool = not %.loc16_27 [template = constants.%.2] // CHECK:STDOUT: %not_false: bool = bind_name not_false, %.loc16_23 -// CHECK:STDOUT: %Constant.decl: Constant = fn_decl @Constant [template = constants.%struct.3] {} -// CHECK:STDOUT: %import_ref.5: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %Constant.decl: = fn_decl @Constant [template = constants.%Constant] {} +// CHECK:STDOUT: %import_ref.5: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.6: = import_ref ir7, inst+2, loaded [template = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; @@ -90,7 +90,7 @@ fn Constant() { // CHECK:STDOUT: if %.loc19_13 br !if.expr.then.loc19 else br !if.expr.else.loc19 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc19: -// CHECK:STDOUT: %bool.make_type.loc19: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc19: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc19_27.1: type = value_of_initializer %bool.make_type.loc19 [template = bool] // CHECK:STDOUT: %.loc19_27.2: type = converted %bool.make_type.loc19, %.loc19_27.1 [template = bool] // CHECK:STDOUT: br !if.expr.result.loc19(%.loc19_27.2) @@ -113,7 +113,7 @@ fn Constant() { // CHECK:STDOUT: if %.loc20_13 br !if.expr.then.loc20 else br !if.expr.else.loc20 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc20: -// CHECK:STDOUT: %bool.make_type.loc20: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc20: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc20_28.1: type = value_of_initializer %bool.make_type.loc20 [template = bool] // CHECK:STDOUT: %.loc20_28.2: type = converted %bool.make_type.loc20, %.loc20_28.1 [template = bool] // CHECK:STDOUT: br !if.expr.result.loc20(%.loc20_28.2) diff --git a/toolchain/check/testdata/operators/overloaded/add.carbon b/toolchain/check/testdata/operators/overloaded/add.carbon index 8a963f0a839c..26ed8f62b813 100644 --- a/toolchain/check/testdata/operators/overloaded/add.carbon +++ b/toolchain/check/testdata/operators/overloaded/add.carbon @@ -38,31 +38,31 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @Add [template] // CHECK:STDOUT: %Self.1: Add = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Op.1: type = fn_type @Op.1 [template] +// CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Op = struct_value () [template] -// CHECK:STDOUT: %Op.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %struct.2: Op = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%struct.1) [template] +// CHECK:STDOUT: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] +// CHECK:STDOUT: %Op.2: = struct_value () [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %.5: type = ptr_type {} [template] -// CHECK:STDOUT: %struct.3: C = struct_value () [template] +// CHECK:STDOUT: %struct: C = struct_value () [template] // CHECK:STDOUT: %.6: type = interface_type @AddAssign [template] // CHECK:STDOUT: %Self.2: AddAssign = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.7: type = ptr_type C [template] -// CHECK:STDOUT: %Op.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %struct.4: Op = struct_value () [template] +// CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] +// CHECK:STDOUT: %Op.3: = struct_value () [template] // CHECK:STDOUT: %.8: type = ptr_type Self [symbolic] -// CHECK:STDOUT: %Op.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %struct.5: Op = struct_value () [template] -// CHECK:STDOUT: %.9: = interface_witness (%struct.4) [template] -// CHECK:STDOUT: %TestOp: type = fn_type @TestOp [template] -// CHECK:STDOUT: %struct.6: TestOp = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type @Add, Op [template] -// CHECK:STDOUT: %.11: = assoc_entity element0, file.%import_ref.10 [template] -// CHECK:STDOUT: %TestAssign: type = fn_type @TestAssign [template] -// CHECK:STDOUT: %struct.7: TestAssign = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @AddAssign, Op [template] -// CHECK:STDOUT: %.13: = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] +// CHECK:STDOUT: %Op.4: = struct_value () [template] +// CHECK:STDOUT: %.9: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] +// CHECK:STDOUT: %TestOp: = struct_value () [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type @Add, [template] +// CHECK:STDOUT: %.11: in Add> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] +// CHECK:STDOUT: %TestAssign: = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @AddAssign, [template] +// CHECK:STDOUT: %.13: in AddAssign> = assoc_entity element0, file.%import_ref.12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,8 +76,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir4, inst+1, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir4, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref ir4, inst+24, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.4: Op = import_ref ir4, inst+19, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.3: in Add> = import_ref ir4, inst+24, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.4: = import_ref ir4, inst+19, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc17: = name_ref Core, %Core [template = %Core] @@ -85,14 +85,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir4, inst+26, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.6 = import_ref ir4, inst+28, unloaded -// CHECK:STDOUT: %import_ref.7: = import_ref ir4, inst+47, loaded [template = constants.%.13] -// CHECK:STDOUT: %import_ref.8: Op = import_ref ir4, inst+43, loaded [template = constants.%struct.5] +// CHECK:STDOUT: %import_ref.7: in AddAssign> = import_ref ir4, inst+47, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.8: = import_ref ir4, inst+43, loaded [template = constants.%Op.4] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc22: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %AddAssign.ref: type = name_ref AddAssign, %import_ref.5 [template = constants.%.6] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: TestOp = fn_decl @TestOp [template = constants.%struct.6] { +// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc26_11.1: C = param a // CHECK:STDOUT: @TestOp.%a: C = bind_name a, %a.loc26_11.1 @@ -104,7 +104,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.9: type = import_ref ir4, inst+1, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.10 = import_ref ir4, inst+19, unloaded -// CHECK:STDOUT: %TestAssign.decl: TestAssign = fn_decl @TestAssign [template = constants.%struct.7] { +// CHECK:STDOUT: %TestAssign.decl: = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc30: type = ptr_type C [template = constants.%.7] // CHECK:STDOUT: %a.loc30_15.1: C* = param a @@ -132,7 +132,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: C as Add { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.loc18_9.1: C = param self // CHECK:STDOUT: %self.loc18_9.2: C = bind_name self, %self.loc18_9.1 @@ -150,7 +150,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: C as AddAssign { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.3 [template = constants.%struct.4] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc23_21: type = ptr_type C [template = constants.%.7] // CHECK:STDOUT: %self.loc23_14.1: C* = param self @@ -175,8 +175,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: C](@impl.1.%other.loc18_18.2: C) -> @impl.1.%return.var: C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc19_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_14 to @impl.1.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: @@ -193,7 +193,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: C = name_ref a, %a // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.1.%.1, element0 [template = constants.%struct.1] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 // CHECK:STDOUT: %.loc26: ref C = splice_block %return {} // CHECK:STDOUT: %Op.call: init C = call %.loc27(%a.ref, %b.ref) to %.loc26 @@ -205,7 +205,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: C* = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref C = deref %a.ref // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.2.%.1, element0 [template = constants.%struct.4] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 // CHECK:STDOUT: %.loc31_3.2: C* = addr_of %.loc31_3.1 // CHECK:STDOUT: %Op.call: init () = call %.loc31_6(%.loc31_3.2, %b.ref) diff --git a/toolchain/check/testdata/operators/overloaded/bit_and.carbon b/toolchain/check/testdata/operators/overloaded/bit_and.carbon index 071315708023..8fdd723908bb 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_and.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_and.carbon @@ -38,31 +38,31 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @BitAnd [template] // CHECK:STDOUT: %Self.1: BitAnd = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Op.1: type = fn_type @Op.1 [template] +// CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Op = struct_value () [template] -// CHECK:STDOUT: %Op.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %struct.2: Op = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%struct.1) [template] +// CHECK:STDOUT: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] +// CHECK:STDOUT: %Op.2: = struct_value () [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %.5: type = ptr_type {} [template] -// CHECK:STDOUT: %struct.3: C = struct_value () [template] +// CHECK:STDOUT: %struct: C = struct_value () [template] // CHECK:STDOUT: %.6: type = interface_type @BitAndAssign [template] // CHECK:STDOUT: %Self.2: BitAndAssign = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.7: type = ptr_type C [template] -// CHECK:STDOUT: %Op.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %struct.4: Op = struct_value () [template] +// CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] +// CHECK:STDOUT: %Op.3: = struct_value () [template] // CHECK:STDOUT: %.8: type = ptr_type Self [symbolic] -// CHECK:STDOUT: %Op.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %struct.5: Op = struct_value () [template] -// CHECK:STDOUT: %.9: = interface_witness (%struct.4) [template] -// CHECK:STDOUT: %TestOp: type = fn_type @TestOp [template] -// CHECK:STDOUT: %struct.6: TestOp = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type @BitAnd, Op [template] -// CHECK:STDOUT: %.11: = assoc_entity element0, file.%import_ref.10 [template] -// CHECK:STDOUT: %TestAssign: type = fn_type @TestAssign [template] -// CHECK:STDOUT: %struct.7: TestAssign = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @BitAndAssign, Op [template] -// CHECK:STDOUT: %.13: = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] +// CHECK:STDOUT: %Op.4: = struct_value () [template] +// CHECK:STDOUT: %.9: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] +// CHECK:STDOUT: %TestOp: = struct_value () [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type @BitAnd, [template] +// CHECK:STDOUT: %.11: in BitAnd> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] +// CHECK:STDOUT: %TestAssign: = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @BitAndAssign, [template] +// CHECK:STDOUT: %.13: in BitAndAssign> = assoc_entity element0, file.%import_ref.12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,8 +76,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir5, inst+21, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir5, inst+23, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref ir5, inst+43, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.4: Op = import_ref ir5, inst+39, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.3: in BitAnd> = import_ref ir5, inst+43, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.4: = import_ref ir5, inst+39, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc17: = name_ref Core, %Core [template = %Core] @@ -85,14 +85,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir5, inst+45, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.6 = import_ref ir5, inst+47, unloaded -// CHECK:STDOUT: %import_ref.7: = import_ref ir5, inst+66, loaded [template = constants.%.13] -// CHECK:STDOUT: %import_ref.8: Op = import_ref ir5, inst+62, loaded [template = constants.%struct.5] +// CHECK:STDOUT: %import_ref.7: in BitAndAssign> = import_ref ir5, inst+66, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.8: = import_ref ir5, inst+62, loaded [template = constants.%Op.4] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc22: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %BitAndAssign.ref: type = name_ref BitAndAssign, %import_ref.5 [template = constants.%.6] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: TestOp = fn_decl @TestOp [template = constants.%struct.6] { +// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc26_11.1: C = param a // CHECK:STDOUT: @TestOp.%a: C = bind_name a, %a.loc26_11.1 @@ -104,7 +104,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.9: type = import_ref ir5, inst+21, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.10 = import_ref ir5, inst+39, unloaded -// CHECK:STDOUT: %TestAssign.decl: TestAssign = fn_decl @TestAssign [template = constants.%struct.7] { +// CHECK:STDOUT: %TestAssign.decl: = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc30: type = ptr_type C [template = constants.%.7] // CHECK:STDOUT: %a.loc30_15.1: C* = param a @@ -132,7 +132,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: C as BitAnd { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.loc18_9.1: C = param self // CHECK:STDOUT: %self.loc18_9.2: C = bind_name self, %self.loc18_9.1 @@ -150,7 +150,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: C as BitAndAssign { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.3 [template = constants.%struct.4] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc23_21: type = ptr_type C [template = constants.%.7] // CHECK:STDOUT: %self.loc23_14.1: C* = param self @@ -175,8 +175,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: C](@impl.1.%other.loc18_18.2: C) -> @impl.1.%return.var: C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc19_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_14 to @impl.1.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: @@ -193,7 +193,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: C = name_ref a, %a // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.1.%.1, element0 [template = constants.%struct.1] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 // CHECK:STDOUT: %.loc26: ref C = splice_block %return {} // CHECK:STDOUT: %Op.call: init C = call %.loc27(%a.ref, %b.ref) to %.loc26 @@ -205,7 +205,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: C* = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref C = deref %a.ref // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.2.%.1, element0 [template = constants.%struct.4] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 // CHECK:STDOUT: %.loc31_3.2: C* = addr_of %.loc31_3.1 // CHECK:STDOUT: %Op.call: init () = call %.loc31_6(%.loc31_3.2, %b.ref) diff --git a/toolchain/check/testdata/operators/overloaded/bit_complement.carbon b/toolchain/check/testdata/operators/overloaded/bit_complement.carbon index 70afa5c08caf..e7127100a22b 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_complement.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_complement.carbon @@ -31,18 +31,18 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @BitComplement [template] // CHECK:STDOUT: %Self: BitComplement = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Op.1: type = fn_type @Op.1 [template] +// CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Op = struct_value () [template] -// CHECK:STDOUT: %Op.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %struct.2: Op = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%struct.1) [template] +// CHECK:STDOUT: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] +// CHECK:STDOUT: %Op.2: = struct_value () [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %.5: type = ptr_type {} [template] -// CHECK:STDOUT: %struct.3: C = struct_value () [template] -// CHECK:STDOUT: %TestOp: type = fn_type @TestOp [template] -// CHECK:STDOUT: %struct.4: TestOp = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type @BitComplement, Op [template] -// CHECK:STDOUT: %.7: = assoc_entity element0, file.%import_ref.6 [template] +// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] +// CHECK:STDOUT: %TestOp: = struct_value () [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type @BitComplement, [template] +// CHECK:STDOUT: %.7: in BitComplement> = assoc_entity element0, file.%import_ref.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -55,14 +55,14 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir5, inst+1, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir5, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref ir5, inst+19, loaded [template = constants.%.7] -// CHECK:STDOUT: %import_ref.4: Op = import_ref ir5, inst+14, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.3: in BitComplement> = import_ref ir5, inst+19, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.4: = import_ref ir5, inst+14, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %BitComplement.ref: type = name_ref BitComplement, %import_ref.1 [template = constants.%.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: TestOp = fn_decl @TestOp [template = constants.%struct.4] { +// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc23_14: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc23_11.1: C = param a // CHECK:STDOUT: @TestOp.%a: C = bind_name a, %a.loc23_11.1 @@ -81,7 +81,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: C as BitComplement { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.loc18_9.1: C = param self // CHECK:STDOUT: %self.loc18_9.2: C = bind_name self, %self.loc18_9.1 @@ -103,8 +103,8 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: fn @Op.1[@impl.%self.loc18_9.2: C]() -> @impl.%return.var: C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc19_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.%return.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_14 to @impl.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: @@ -113,7 +113,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: fn @TestOp(%a: C) -> %return: C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: C = name_ref a, %a -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.%.1, element0 [template = constants.%struct.1] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc24: = bound_method %a.ref, %.1 // CHECK:STDOUT: %.loc23: ref C = splice_block %return {} // CHECK:STDOUT: %Op.call: init C = call %.loc24(%a.ref) to %.loc23 diff --git a/toolchain/check/testdata/operators/overloaded/bit_or.carbon b/toolchain/check/testdata/operators/overloaded/bit_or.carbon index f021e96361f0..fef70dd1fe5a 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_or.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_or.carbon @@ -38,31 +38,31 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @BitOr [template] // CHECK:STDOUT: %Self.1: BitOr = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Op.1: type = fn_type @Op.1 [template] +// CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Op = struct_value () [template] -// CHECK:STDOUT: %Op.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %struct.2: Op = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%struct.1) [template] +// CHECK:STDOUT: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] +// CHECK:STDOUT: %Op.2: = struct_value () [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %.5: type = ptr_type {} [template] -// CHECK:STDOUT: %struct.3: C = struct_value () [template] +// CHECK:STDOUT: %struct: C = struct_value () [template] // CHECK:STDOUT: %.6: type = interface_type @BitOrAssign [template] // CHECK:STDOUT: %Self.2: BitOrAssign = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.7: type = ptr_type C [template] -// CHECK:STDOUT: %Op.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %struct.4: Op = struct_value () [template] +// CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] +// CHECK:STDOUT: %Op.3: = struct_value () [template] // CHECK:STDOUT: %.8: type = ptr_type Self [symbolic] -// CHECK:STDOUT: %Op.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %struct.5: Op = struct_value () [template] -// CHECK:STDOUT: %.9: = interface_witness (%struct.4) [template] -// CHECK:STDOUT: %TestOp: type = fn_type @TestOp [template] -// CHECK:STDOUT: %struct.6: TestOp = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type @BitOr, Op [template] -// CHECK:STDOUT: %.11: = assoc_entity element0, file.%import_ref.10 [template] -// CHECK:STDOUT: %TestAssign: type = fn_type @TestAssign [template] -// CHECK:STDOUT: %struct.7: TestAssign = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @BitOrAssign, Op [template] -// CHECK:STDOUT: %.13: = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] +// CHECK:STDOUT: %Op.4: = struct_value () [template] +// CHECK:STDOUT: %.9: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] +// CHECK:STDOUT: %TestOp: = struct_value () [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type @BitOr, [template] +// CHECK:STDOUT: %.11: in BitOr> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] +// CHECK:STDOUT: %TestAssign: = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @BitOrAssign, [template] +// CHECK:STDOUT: %.13: in BitOrAssign> = assoc_entity element0, file.%import_ref.12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,8 +76,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir5, inst+68, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir5, inst+70, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref ir5, inst+90, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.4: Op = import_ref ir5, inst+86, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.3: in BitOr> = import_ref ir5, inst+90, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.4: = import_ref ir5, inst+86, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc17: = name_ref Core, %Core [template = %Core] @@ -85,14 +85,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir5, inst+92, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.6 = import_ref ir5, inst+94, unloaded -// CHECK:STDOUT: %import_ref.7: = import_ref ir5, inst+113, loaded [template = constants.%.13] -// CHECK:STDOUT: %import_ref.8: Op = import_ref ir5, inst+109, loaded [template = constants.%struct.5] +// CHECK:STDOUT: %import_ref.7: in BitOrAssign> = import_ref ir5, inst+113, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.8: = import_ref ir5, inst+109, loaded [template = constants.%Op.4] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc22: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %BitOrAssign.ref: type = name_ref BitOrAssign, %import_ref.5 [template = constants.%.6] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: TestOp = fn_decl @TestOp [template = constants.%struct.6] { +// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc26_11.1: C = param a // CHECK:STDOUT: @TestOp.%a: C = bind_name a, %a.loc26_11.1 @@ -104,7 +104,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.9: type = import_ref ir5, inst+68, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.10 = import_ref ir5, inst+86, unloaded -// CHECK:STDOUT: %TestAssign.decl: TestAssign = fn_decl @TestAssign [template = constants.%struct.7] { +// CHECK:STDOUT: %TestAssign.decl: = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc30: type = ptr_type C [template = constants.%.7] // CHECK:STDOUT: %a.loc30_15.1: C* = param a @@ -132,7 +132,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: C as BitOr { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.loc18_9.1: C = param self // CHECK:STDOUT: %self.loc18_9.2: C = bind_name self, %self.loc18_9.1 @@ -150,7 +150,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: C as BitOrAssign { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.3 [template = constants.%struct.4] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc23_21: type = ptr_type C [template = constants.%.7] // CHECK:STDOUT: %self.loc23_14.1: C* = param self @@ -175,8 +175,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: C](@impl.1.%other.loc18_18.2: C) -> @impl.1.%return.var: C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc19_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_14 to @impl.1.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: @@ -193,7 +193,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: C = name_ref a, %a // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.1.%.1, element0 [template = constants.%struct.1] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 // CHECK:STDOUT: %.loc26: ref C = splice_block %return {} // CHECK:STDOUT: %Op.call: init C = call %.loc27(%a.ref, %b.ref) to %.loc26 @@ -205,7 +205,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: C* = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref C = deref %a.ref // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.2.%.1, element0 [template = constants.%struct.4] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 // CHECK:STDOUT: %.loc31_3.2: C* = addr_of %.loc31_3.1 // CHECK:STDOUT: %Op.call: init () = call %.loc31_6(%.loc31_3.2, %b.ref) diff --git a/toolchain/check/testdata/operators/overloaded/bit_xor.carbon b/toolchain/check/testdata/operators/overloaded/bit_xor.carbon index 8b218962eceb..c155b8541fe8 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_xor.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_xor.carbon @@ -38,31 +38,31 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @BitXor [template] // CHECK:STDOUT: %Self.1: BitXor = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Op.1: type = fn_type @Op.1 [template] +// CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Op = struct_value () [template] -// CHECK:STDOUT: %Op.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %struct.2: Op = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%struct.1) [template] +// CHECK:STDOUT: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] +// CHECK:STDOUT: %Op.2: = struct_value () [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %.5: type = ptr_type {} [template] -// CHECK:STDOUT: %struct.3: C = struct_value () [template] +// CHECK:STDOUT: %struct: C = struct_value () [template] // CHECK:STDOUT: %.6: type = interface_type @BitXorAssign [template] // CHECK:STDOUT: %Self.2: BitXorAssign = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.7: type = ptr_type C [template] -// CHECK:STDOUT: %Op.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %struct.4: Op = struct_value () [template] +// CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] +// CHECK:STDOUT: %Op.3: = struct_value () [template] // CHECK:STDOUT: %.8: type = ptr_type Self [symbolic] -// CHECK:STDOUT: %Op.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %struct.5: Op = struct_value () [template] -// CHECK:STDOUT: %.9: = interface_witness (%struct.4) [template] -// CHECK:STDOUT: %TestOp: type = fn_type @TestOp [template] -// CHECK:STDOUT: %struct.6: TestOp = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type @BitXor, Op [template] -// CHECK:STDOUT: %.11: = assoc_entity element0, file.%import_ref.10 [template] -// CHECK:STDOUT: %TestAssign: type = fn_type @TestAssign [template] -// CHECK:STDOUT: %struct.7: TestAssign = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @BitXorAssign, Op [template] -// CHECK:STDOUT: %.13: = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] +// CHECK:STDOUT: %Op.4: = struct_value () [template] +// CHECK:STDOUT: %.9: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] +// CHECK:STDOUT: %TestOp: = struct_value () [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type @BitXor, [template] +// CHECK:STDOUT: %.11: in BitXor> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] +// CHECK:STDOUT: %TestAssign: = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @BitXorAssign, [template] +// CHECK:STDOUT: %.13: in BitXorAssign> = assoc_entity element0, file.%import_ref.12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,8 +76,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir5, inst+115, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir5, inst+117, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref ir5, inst+137, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.4: Op = import_ref ir5, inst+133, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.3: in BitXor> = import_ref ir5, inst+137, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.4: = import_ref ir5, inst+133, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc17: = name_ref Core, %Core [template = %Core] @@ -85,14 +85,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir5, inst+139, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.6 = import_ref ir5, inst+141, unloaded -// CHECK:STDOUT: %import_ref.7: = import_ref ir5, inst+160, loaded [template = constants.%.13] -// CHECK:STDOUT: %import_ref.8: Op = import_ref ir5, inst+156, loaded [template = constants.%struct.5] +// CHECK:STDOUT: %import_ref.7: in BitXorAssign> = import_ref ir5, inst+160, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.8: = import_ref ir5, inst+156, loaded [template = constants.%Op.4] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc22: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %BitXorAssign.ref: type = name_ref BitXorAssign, %import_ref.5 [template = constants.%.6] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: TestOp = fn_decl @TestOp [template = constants.%struct.6] { +// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc26_11.1: C = param a // CHECK:STDOUT: @TestOp.%a: C = bind_name a, %a.loc26_11.1 @@ -104,7 +104,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.9: type = import_ref ir5, inst+115, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.10 = import_ref ir5, inst+133, unloaded -// CHECK:STDOUT: %TestAssign.decl: TestAssign = fn_decl @TestAssign [template = constants.%struct.7] { +// CHECK:STDOUT: %TestAssign.decl: = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc30: type = ptr_type C [template = constants.%.7] // CHECK:STDOUT: %a.loc30_15.1: C* = param a @@ -132,7 +132,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: C as BitXor { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.loc18_9.1: C = param self // CHECK:STDOUT: %self.loc18_9.2: C = bind_name self, %self.loc18_9.1 @@ -150,7 +150,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: C as BitXorAssign { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.3 [template = constants.%struct.4] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc23_21: type = ptr_type C [template = constants.%.7] // CHECK:STDOUT: %self.loc23_14.1: C* = param self @@ -175,8 +175,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: C](@impl.1.%other.loc18_18.2: C) -> @impl.1.%return.var: C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc19_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_14 to @impl.1.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: @@ -193,7 +193,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: C = name_ref a, %a // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.1.%.1, element0 [template = constants.%struct.1] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 // CHECK:STDOUT: %.loc26: ref C = splice_block %return {} // CHECK:STDOUT: %Op.call: init C = call %.loc27(%a.ref, %b.ref) to %.loc26 @@ -205,7 +205,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: C* = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref C = deref %a.ref // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.2.%.1, element0 [template = constants.%struct.4] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 // CHECK:STDOUT: %.loc31_3.2: C* = addr_of %.loc31_3.1 // CHECK:STDOUT: %Op.call: init () = call %.loc31_6(%.loc31_3.2, %b.ref) diff --git a/toolchain/check/testdata/operators/overloaded/dec.carbon b/toolchain/check/testdata/operators/overloaded/dec.carbon index fb297990991d..620b503ff5de 100644 --- a/toolchain/check/testdata/operators/overloaded/dec.carbon +++ b/toolchain/check/testdata/operators/overloaded/dec.carbon @@ -31,19 +31,19 @@ fn TestOp() { // CHECK:STDOUT: %.2: type = interface_type @Dec [template] // CHECK:STDOUT: %Self: Dec = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.3: type = ptr_type C [template] -// CHECK:STDOUT: %Op.1: type = fn_type @Op.1 [template] +// CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %.4: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Op = struct_value () [template] +// CHECK:STDOUT: %Op.1: = struct_value () [template] // CHECK:STDOUT: %.5: type = ptr_type Self [symbolic] -// CHECK:STDOUT: %Op.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %struct.2: Op = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%struct.1) [template] -// CHECK:STDOUT: %TestOp: type = fn_type @TestOp [template] -// CHECK:STDOUT: %struct.3: TestOp = struct_value () [template] +// CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] +// CHECK:STDOUT: %Op.2: = struct_value () [template] +// CHECK:STDOUT: %.6: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] +// CHECK:STDOUT: %TestOp: = struct_value () [template] // CHECK:STDOUT: %.7: type = ptr_type {} [template] -// CHECK:STDOUT: %struct.4: C = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type @Dec, Op [template] -// CHECK:STDOUT: %.9: = assoc_entity element0, file.%import_ref.6 [template] +// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type @Dec, [template] +// CHECK:STDOUT: %.9: in Dec> = assoc_entity element0, file.%import_ref.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -56,14 +56,14 @@ fn TestOp() { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir4, inst+133, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir4, inst+135, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref ir4, inst+149, loaded [template = constants.%.9] -// CHECK:STDOUT: %import_ref.4: Op = import_ref ir4, inst+145, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.3: in Dec> = import_ref ir4, inst+149, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.4: = import_ref ir4, inst+145, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %Dec.ref: type = name_ref Dec, %import_ref.1 [template = constants.%.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: TestOp = fn_decl @TestOp [template = constants.%struct.3] {} +// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] {} // CHECK:STDOUT: %import_ref.5: type = import_ref ir4, inst+133, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.6 = import_ref ir4, inst+145, unloaded // CHECK:STDOUT: } @@ -76,7 +76,7 @@ fn TestOp() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: C as Dec { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc18_21: type = ptr_type C [template = constants.%.3] // CHECK:STDOUT: %self.loc18_14.1: C* = param self @@ -105,11 +105,11 @@ fn TestOp() { // CHECK:STDOUT: %c.var: ref C = var c // CHECK:STDOUT: %c: ref C = bind_name c, %c.var // CHECK:STDOUT: %.loc22_15.1: {} = struct_literal () -// CHECK:STDOUT: %.loc22_15.2: init C = class_init (), %c.var [template = constants.%struct.4] -// CHECK:STDOUT: %.loc22_16: init C = converted %.loc22_15.1, %.loc22_15.2 [template = constants.%struct.4] +// CHECK:STDOUT: %.loc22_15.2: init C = class_init (), %c.var [template = constants.%struct] +// CHECK:STDOUT: %.loc22_16: init C = converted %.loc22_15.1, %.loc22_15.2 [template = constants.%struct] // CHECK:STDOUT: assign %c.var, %.loc22_16 // CHECK:STDOUT: %c.ref: ref C = name_ref c, %c -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.%.1, element0 [template = constants.%struct.1] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc23_3: = bound_method %c.ref, %.1 // CHECK:STDOUT: %.loc23_5: C* = addr_of %c.ref // CHECK:STDOUT: %Op.call: init () = call %.loc23_3(%.loc23_5) diff --git a/toolchain/check/testdata/operators/overloaded/div.carbon b/toolchain/check/testdata/operators/overloaded/div.carbon index 97cad977624e..86dc6a295782 100644 --- a/toolchain/check/testdata/operators/overloaded/div.carbon +++ b/toolchain/check/testdata/operators/overloaded/div.carbon @@ -38,31 +38,31 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @Div [template] // CHECK:STDOUT: %Self.1: Div = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Op.1: type = fn_type @Op.1 [template] +// CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Op = struct_value () [template] -// CHECK:STDOUT: %Op.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %struct.2: Op = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%struct.1) [template] +// CHECK:STDOUT: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] +// CHECK:STDOUT: %Op.2: = struct_value () [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %.5: type = ptr_type {} [template] -// CHECK:STDOUT: %struct.3: C = struct_value () [template] +// CHECK:STDOUT: %struct: C = struct_value () [template] // CHECK:STDOUT: %.6: type = interface_type @DivAssign [template] // CHECK:STDOUT: %Self.2: DivAssign = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.7: type = ptr_type C [template] -// CHECK:STDOUT: %Op.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %struct.4: Op = struct_value () [template] +// CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] +// CHECK:STDOUT: %Op.3: = struct_value () [template] // CHECK:STDOUT: %.8: type = ptr_type Self [symbolic] -// CHECK:STDOUT: %Op.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %struct.5: Op = struct_value () [template] -// CHECK:STDOUT: %.9: = interface_witness (%struct.4) [template] -// CHECK:STDOUT: %TestOp: type = fn_type @TestOp [template] -// CHECK:STDOUT: %struct.6: TestOp = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type @Div, Op [template] -// CHECK:STDOUT: %.11: = assoc_entity element0, file.%import_ref.10 [template] -// CHECK:STDOUT: %TestAssign: type = fn_type @TestAssign [template] -// CHECK:STDOUT: %struct.7: TestAssign = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @DivAssign, Op [template] -// CHECK:STDOUT: %.13: = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] +// CHECK:STDOUT: %Op.4: = struct_value () [template] +// CHECK:STDOUT: %.9: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] +// CHECK:STDOUT: %TestOp: = struct_value () [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type @Div, [template] +// CHECK:STDOUT: %.11: in Div> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] +// CHECK:STDOUT: %TestAssign: = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @DivAssign, [template] +// CHECK:STDOUT: %.13: in DivAssign> = assoc_entity element0, file.%import_ref.12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,8 +76,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir4, inst+198, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir4, inst+200, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref ir4, inst+220, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.4: Op = import_ref ir4, inst+216, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.3: in Div> = import_ref ir4, inst+220, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.4: = import_ref ir4, inst+216, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc17: = name_ref Core, %Core [template = %Core] @@ -85,14 +85,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir4, inst+222, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.6 = import_ref ir4, inst+224, unloaded -// CHECK:STDOUT: %import_ref.7: = import_ref ir4, inst+243, loaded [template = constants.%.13] -// CHECK:STDOUT: %import_ref.8: Op = import_ref ir4, inst+239, loaded [template = constants.%struct.5] +// CHECK:STDOUT: %import_ref.7: in DivAssign> = import_ref ir4, inst+243, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.8: = import_ref ir4, inst+239, loaded [template = constants.%Op.4] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc22: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %DivAssign.ref: type = name_ref DivAssign, %import_ref.5 [template = constants.%.6] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: TestOp = fn_decl @TestOp [template = constants.%struct.6] { +// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc26_11.1: C = param a // CHECK:STDOUT: @TestOp.%a: C = bind_name a, %a.loc26_11.1 @@ -104,7 +104,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.9: type = import_ref ir4, inst+198, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.10 = import_ref ir4, inst+216, unloaded -// CHECK:STDOUT: %TestAssign.decl: TestAssign = fn_decl @TestAssign [template = constants.%struct.7] { +// CHECK:STDOUT: %TestAssign.decl: = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc30: type = ptr_type C [template = constants.%.7] // CHECK:STDOUT: %a.loc30_15.1: C* = param a @@ -132,7 +132,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: C as Div { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.loc18_9.1: C = param self // CHECK:STDOUT: %self.loc18_9.2: C = bind_name self, %self.loc18_9.1 @@ -150,7 +150,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: C as DivAssign { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.3 [template = constants.%struct.4] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc23_21: type = ptr_type C [template = constants.%.7] // CHECK:STDOUT: %self.loc23_14.1: C* = param self @@ -175,8 +175,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: C](@impl.1.%other.loc18_18.2: C) -> @impl.1.%return.var: C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc19_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_14 to @impl.1.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: @@ -193,7 +193,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: C = name_ref a, %a // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.1.%.1, element0 [template = constants.%struct.1] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 // CHECK:STDOUT: %.loc26: ref C = splice_block %return {} // CHECK:STDOUT: %Op.call: init C = call %.loc27(%a.ref, %b.ref) to %.loc26 @@ -205,7 +205,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: C* = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref C = deref %a.ref // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.2.%.1, element0 [template = constants.%struct.4] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 // CHECK:STDOUT: %.loc31_3.2: C* = addr_of %.loc31_3.1 // CHECK:STDOUT: %Op.call: init () = call %.loc31_6(%.loc31_3.2, %b.ref) diff --git a/toolchain/check/testdata/operators/overloaded/eq.carbon b/toolchain/check/testdata/operators/overloaded/eq.carbon index 15e3a7eca9f5..c45fd38d5b79 100644 --- a/toolchain/check/testdata/operators/overloaded/eq.carbon +++ b/toolchain/check/testdata/operators/overloaded/eq.carbon @@ -86,27 +86,27 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @Eq [template] // CHECK:STDOUT: %Self: Eq = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Bool = struct_value () [template] -// CHECK:STDOUT: %Equal.1: type = fn_type @Equal.1 [template] -// CHECK:STDOUT: %struct.2: Equal = struct_value () [template] -// CHECK:STDOUT: %NotEqual.1: type = fn_type @NotEqual.1 [template] -// CHECK:STDOUT: %struct.3: NotEqual = struct_value () [template] -// CHECK:STDOUT: %Equal.2: type = fn_type @Equal.2 [template] -// CHECK:STDOUT: %struct.4: Equal = struct_value () [template] -// CHECK:STDOUT: %NotEqual.2: type = fn_type @NotEqual.2 [template] -// CHECK:STDOUT: %struct.5: NotEqual = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%struct.2, %struct.3) [template] -// CHECK:STDOUT: %TestEqual: type = fn_type @TestEqual [template] -// CHECK:STDOUT: %struct.6: TestEqual = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Equal.type.1: type = fn_type @Equal.1 [template] +// CHECK:STDOUT: %Equal.1: = struct_value () [template] +// CHECK:STDOUT: %NotEqual.type.1: type = fn_type @NotEqual.1 [template] +// CHECK:STDOUT: %NotEqual.1: = struct_value () [template] +// CHECK:STDOUT: %Equal.type.2: type = fn_type @Equal.2 [template] +// CHECK:STDOUT: %Equal.2: = struct_value () [template] +// CHECK:STDOUT: %NotEqual.type.2: type = fn_type @NotEqual.2 [template] +// CHECK:STDOUT: %NotEqual.2: = struct_value () [template] +// CHECK:STDOUT: %.4: = interface_witness (%Equal.1, %NotEqual.1) [template] +// CHECK:STDOUT: %TestEqual.type: type = fn_type @TestEqual [template] +// CHECK:STDOUT: %TestEqual: = struct_value () [template] // CHECK:STDOUT: %.5: type = ptr_type {} [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type @Eq, Equal [template] -// CHECK:STDOUT: %.7: = assoc_entity element0, file.%import_ref.11 [template] -// CHECK:STDOUT: %TestNotEqual: type = fn_type @TestNotEqual [template] -// CHECK:STDOUT: %struct.7: TestNotEqual = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type @Eq, NotEqual [template] -// CHECK:STDOUT: %.9: = assoc_entity element1, file.%import_ref.14 [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type @Eq, [template] +// CHECK:STDOUT: %.7: in Eq> = assoc_entity element0, file.%import_ref.11 [template] +// CHECK:STDOUT: %TestNotEqual.type: type = fn_type @TestNotEqual [template] +// CHECK:STDOUT: %TestNotEqual: = struct_value () [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type @Eq, [template] +// CHECK:STDOUT: %.9: in Eq> = assoc_entity element1, file.%import_ref.14 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -120,41 +120,41 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir6, inst+2, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir6, inst+4, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref ir6, inst+29, loaded [template = constants.%.7] -// CHECK:STDOUT: %import_ref.4: = import_ref ir6, inst+49, loaded [template = constants.%.9] -// CHECK:STDOUT: %import_ref.5: Equal = import_ref ir6, inst+25, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %import_ref.6: NotEqual = import_ref ir6, inst+45, loaded [template = constants.%struct.5] +// CHECK:STDOUT: %import_ref.3: in Eq> = import_ref ir6, inst+29, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.4: in Eq> = import_ref ir6, inst+49, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.5: = import_ref ir6, inst+25, loaded [template = constants.%Equal.2] +// CHECK:STDOUT: %import_ref.6: = import_ref ir6, inst+45, loaded [template = constants.%NotEqual.2] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %Eq.ref: type = name_ref Eq, %import_ref.1 [template = constants.%.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.9: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TestEqual.decl: TestEqual = fn_decl @TestEqual [template = constants.%struct.6] { +// CHECK:STDOUT: %import_ref.7: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.9: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestEqual.decl: = fn_decl @TestEqual [template = constants.%TestEqual] { // CHECK:STDOUT: %C.ref.loc11_17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc11_14.1: C = param a // CHECK:STDOUT: @TestEqual.%a: C = bind_name a, %a.loc11_14.1 // CHECK:STDOUT: %C.ref.loc11_23: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %b.loc11_20.1: C = param b // CHECK:STDOUT: @TestEqual.%b: C = bind_name b, %b.loc11_20.1 -// CHECK:STDOUT: %bool.make_type.loc11: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc11: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_29.1: type = value_of_initializer %bool.make_type.loc11 [template = bool] // CHECK:STDOUT: %.loc11_29.2: type = converted %bool.make_type.loc11, %.loc11_29.1 [template = bool] // CHECK:STDOUT: @TestEqual.%return: ref bool = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.10: type = import_ref ir6, inst+2, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.11 = import_ref ir6, inst+25, unloaded -// CHECK:STDOUT: %import_ref.12: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TestNotEqual.decl: TestNotEqual = fn_decl @TestNotEqual [template = constants.%struct.7] { +// CHECK:STDOUT: %import_ref.12: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestNotEqual.decl: = fn_decl @TestNotEqual [template = constants.%TestNotEqual] { // CHECK:STDOUT: %C.ref.loc15_20: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc15_17.1: C = param a // CHECK:STDOUT: @TestNotEqual.%a: C = bind_name a, %a.loc15_17.1 // CHECK:STDOUT: %C.ref.loc15_26: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %b.loc15_23.1: C = param b // CHECK:STDOUT: @TestNotEqual.%b: C = bind_name b, %b.loc15_23.1 -// CHECK:STDOUT: %bool.make_type.loc15: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc15: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc15_32.1: type = value_of_initializer %bool.make_type.loc15 [template = bool] // CHECK:STDOUT: %.loc15_32.2: type = converted %bool.make_type.loc15, %.loc15_32.1 [template = bool] // CHECK:STDOUT: @TestNotEqual.%return: ref bool = var @@ -172,26 +172,26 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: C as Eq { -// CHECK:STDOUT: %Equal.decl: Equal = fn_decl @Equal.1 [template = constants.%struct.2] { +// CHECK:STDOUT: %Equal.decl: = fn_decl @Equal.1 [template = constants.%Equal.1] { // CHECK:STDOUT: %C.ref.loc7_18: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.loc7_12.1: C = param self // CHECK:STDOUT: %self.loc7_12.2: C = bind_name self, %self.loc7_12.1 // CHECK:STDOUT: %C.ref.loc7_28: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other.loc7_21.1: C = param other // CHECK:STDOUT: %other.loc7_21.2: C = bind_name other, %other.loc7_21.1 -// CHECK:STDOUT: %bool.make_type.loc7: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc7: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc7_34.1: type = value_of_initializer %bool.make_type.loc7 [template = bool] // CHECK:STDOUT: %.loc7_34.2: type = converted %bool.make_type.loc7, %.loc7_34.1 [template = bool] // CHECK:STDOUT: %return.var.loc7: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %NotEqual.decl: NotEqual = fn_decl @NotEqual.1 [template = constants.%struct.3] { +// CHECK:STDOUT: %NotEqual.decl: = fn_decl @NotEqual.1 [template = constants.%NotEqual.1] { // CHECK:STDOUT: %C.ref.loc8_21: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.loc8_15.1: C = param self // CHECK:STDOUT: %self.loc8_15.2: C = bind_name self, %self.loc8_15.1 // CHECK:STDOUT: %C.ref.loc8_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other.loc8_24.1: C = param other // CHECK:STDOUT: %other.loc8_24.2: C = bind_name other, %other.loc8_24.1 -// CHECK:STDOUT: %bool.make_type.loc8: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc8: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc8_37.1: type = value_of_initializer %bool.make_type.loc8 [template = bool] // CHECK:STDOUT: %.loc8_37.2: type = converted %bool.make_type.loc8, %.loc8_37.1 [template = bool] // CHECK:STDOUT: %return.var.loc8: ref bool = var @@ -223,7 +223,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: C = name_ref a, %a // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: Equal = interface_witness_access @impl.%.1, element0 [template = constants.%struct.2] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%Equal.1] // CHECK:STDOUT: %.loc12_12: = bound_method %a.ref, %.1 // CHECK:STDOUT: %Equal.call: init bool = call %.loc12_12(%a.ref, %b.ref) // CHECK:STDOUT: %.loc12_16.1: bool = value_of_initializer %Equal.call @@ -235,7 +235,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: C = name_ref a, %a // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: NotEqual = interface_witness_access @impl.%.1, element1 [template = constants.%struct.3] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element1 [template = constants.%NotEqual.1] // CHECK:STDOUT: %.loc16_12: = bound_method %a.ref, %.1 // CHECK:STDOUT: %NotEqual.call: init bool = call %.loc16_12(%a.ref, %b.ref) // CHECK:STDOUT: %.loc16_16.1: bool = value_of_initializer %NotEqual.call @@ -248,24 +248,24 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: constants { // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Bool = struct_value () [template] -// CHECK:STDOUT: %TestEqual: type = fn_type @TestEqual [template] -// CHECK:STDOUT: %struct.2: TestEqual = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %TestEqual.type: type = fn_type @TestEqual [template] +// CHECK:STDOUT: %TestEqual: = struct_value () [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] // CHECK:STDOUT: %.4: type = interface_type @Eq [template] // CHECK:STDOUT: %Self: Eq = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Equal: type = fn_type @Equal [template] -// CHECK:STDOUT: %struct.3: Equal = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @Eq, Equal [template] -// CHECK:STDOUT: %.6: = assoc_entity element0, file.%import_ref.8 [template] -// CHECK:STDOUT: %TestNotEqual: type = fn_type @TestNotEqual [template] -// CHECK:STDOUT: %struct.4: TestNotEqual = struct_value () [template] -// CHECK:STDOUT: %NotEqual: type = fn_type @NotEqual [template] -// CHECK:STDOUT: %struct.5: NotEqual = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type @Eq, NotEqual [template] -// CHECK:STDOUT: %.8: = assoc_entity element1, file.%import_ref.11 [template] +// CHECK:STDOUT: %Equal.type: type = fn_type @Equal [template] +// CHECK:STDOUT: %Equal: = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @Eq, [template] +// CHECK:STDOUT: %.6: in Eq> = assoc_entity element0, file.%import_ref.8 [template] +// CHECK:STDOUT: %TestNotEqual.type: type = fn_type @TestNotEqual [template] +// CHECK:STDOUT: %TestNotEqual: = struct_value () [template] +// CHECK:STDOUT: %NotEqual.type: type = fn_type @NotEqual [template] +// CHECK:STDOUT: %NotEqual: = struct_value () [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type @Eq, [template] +// CHECK:STDOUT: %.8: in Eq> = assoc_entity element1, file.%import_ref.11 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -277,35 +277,35 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} -// CHECK:STDOUT: %import_ref.1: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TestEqual.decl: TestEqual = fn_decl @TestEqual [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestEqual.decl: = fn_decl @TestEqual [template = constants.%TestEqual] { // CHECK:STDOUT: %D.ref.loc6_17: type = name_ref D, %D.decl [template = constants.%D] // CHECK:STDOUT: %a.loc6_14.1: D = param a // CHECK:STDOUT: @TestEqual.%a: D = bind_name a, %a.loc6_14.1 // CHECK:STDOUT: %D.ref.loc6_23: type = name_ref D, %D.decl [template = constants.%D] // CHECK:STDOUT: %b.loc6_20.1: D = param b // CHECK:STDOUT: @TestEqual.%b: D = bind_name b, %b.loc6_20.1 -// CHECK:STDOUT: %bool.make_type.loc6: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc6: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc6_29.1: type = value_of_initializer %bool.make_type.loc6 [template = bool] // CHECK:STDOUT: %.loc6_29.2: type = converted %bool.make_type.loc6, %.loc6_29.1 [template = bool] // CHECK:STDOUT: @TestEqual.%return: ref bool = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.2: type = import_ref ir6, inst+2, loaded [template = constants.%.4] // CHECK:STDOUT: %import_ref.3 = import_ref ir6, inst+4, unloaded -// CHECK:STDOUT: %import_ref.4: = import_ref ir6, inst+29, loaded [template = constants.%.6] -// CHECK:STDOUT: %import_ref.5: = import_ref ir6, inst+49, loaded [template = constants.%.8] +// CHECK:STDOUT: %import_ref.4: in Eq> = import_ref ir6, inst+29, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.5: in Eq> = import_ref ir6, inst+49, loaded [template = constants.%.8] // CHECK:STDOUT: %import_ref.6 = import_ref ir6, inst+25, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref ir6, inst+45, unloaded // CHECK:STDOUT: %import_ref.8 = import_ref ir6, inst+25, unloaded -// CHECK:STDOUT: %import_ref.9: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TestNotEqual.decl: TestNotEqual = fn_decl @TestNotEqual [template = constants.%struct.4] { +// CHECK:STDOUT: %import_ref.9: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestNotEqual.decl: = fn_decl @TestNotEqual [template = constants.%TestNotEqual] { // CHECK:STDOUT: %D.ref.loc14_20: type = name_ref D, %D.decl [template = constants.%D] // CHECK:STDOUT: %a.loc14_17.1: D = param a // CHECK:STDOUT: @TestNotEqual.%a: D = bind_name a, %a.loc14_17.1 // CHECK:STDOUT: %D.ref.loc14_26: type = name_ref D, %D.decl [template = constants.%D] // CHECK:STDOUT: %b.loc14_23.1: D = param b // CHECK:STDOUT: @TestNotEqual.%b: D = bind_name b, %b.loc14_23.1 -// CHECK:STDOUT: %bool.make_type.loc14: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc14: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc14_32.1: type = value_of_initializer %bool.make_type.loc14 [template = bool] // CHECK:STDOUT: %.loc14_32.2: type = converted %bool.make_type.loc14, %.loc14_32.1 [template = bool] // CHECK:STDOUT: @TestNotEqual.%return: ref bool = var @@ -355,27 +355,27 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %.2: type = interface_type @Eq [template] // CHECK:STDOUT: %Self: Eq = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Bool = struct_value () [template] -// CHECK:STDOUT: %Equal.1: type = fn_type @Equal.1 [template] -// CHECK:STDOUT: %struct.2: Equal = struct_value () [template] -// CHECK:STDOUT: %NotEqual.1: type = fn_type @NotEqual.1 [template] -// CHECK:STDOUT: %struct.3: NotEqual = struct_value () [template] -// CHECK:STDOUT: %Equal.2: type = fn_type @Equal.2 [template] -// CHECK:STDOUT: %struct.4: Equal = struct_value () [template] -// CHECK:STDOUT: %NotEqual.2: type = fn_type @NotEqual.2 [template] -// CHECK:STDOUT: %struct.5: NotEqual = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%struct.2, %struct.3) [template] -// CHECK:STDOUT: %TestRhsBad: type = fn_type @TestRhsBad [template] -// CHECK:STDOUT: %struct.6: TestRhsBad = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Equal.type.1: type = fn_type @Equal.1 [template] +// CHECK:STDOUT: %Equal.1: = struct_value () [template] +// CHECK:STDOUT: %NotEqual.type.1: type = fn_type @NotEqual.1 [template] +// CHECK:STDOUT: %NotEqual.1: = struct_value () [template] +// CHECK:STDOUT: %Equal.type.2: type = fn_type @Equal.2 [template] +// CHECK:STDOUT: %Equal.2: = struct_value () [template] +// CHECK:STDOUT: %NotEqual.type.2: type = fn_type @NotEqual.2 [template] +// CHECK:STDOUT: %NotEqual.2: = struct_value () [template] +// CHECK:STDOUT: %.4: = interface_witness (%Equal.1, %NotEqual.1) [template] +// CHECK:STDOUT: %TestRhsBad.type: type = fn_type @TestRhsBad [template] +// CHECK:STDOUT: %TestRhsBad: = struct_value () [template] // CHECK:STDOUT: %.5: type = ptr_type {} [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type @Eq, Equal [template] -// CHECK:STDOUT: %.7: = assoc_entity element0, file.%import_ref.11 [template] -// CHECK:STDOUT: %TestLhsBad: type = fn_type @TestLhsBad [template] -// CHECK:STDOUT: %struct.7: TestLhsBad = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type @Eq, NotEqual [template] -// CHECK:STDOUT: %.9: = assoc_entity element1, file.%import_ref.14 [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type @Eq, [template] +// CHECK:STDOUT: %.7: in Eq> = assoc_entity element0, file.%import_ref.11 [template] +// CHECK:STDOUT: %TestLhsBad.type: type = fn_type @TestLhsBad [template] +// CHECK:STDOUT: %TestLhsBad: = struct_value () [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type @Eq, [template] +// CHECK:STDOUT: %.9: in Eq> = assoc_entity element1, file.%import_ref.14 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -391,41 +391,41 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir6, inst+2, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir6, inst+4, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref ir6, inst+29, loaded [template = constants.%.7] -// CHECK:STDOUT: %import_ref.4: = import_ref ir6, inst+49, loaded [template = constants.%.9] -// CHECK:STDOUT: %import_ref.5: Equal = import_ref ir6, inst+25, loaded [template = constants.%struct.4] -// CHECK:STDOUT: %import_ref.6: NotEqual = import_ref ir6, inst+45, loaded [template = constants.%struct.5] +// CHECK:STDOUT: %import_ref.3: in Eq> = import_ref ir6, inst+29, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.4: in Eq> = import_ref ir6, inst+49, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.5: = import_ref ir6, inst+25, loaded [template = constants.%Equal.2] +// CHECK:STDOUT: %import_ref.6: = import_ref ir6, inst+45, loaded [template = constants.%NotEqual.2] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %Eq.ref: type = name_ref Eq, %import_ref.1 [template = constants.%.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.9: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TestRhsBad.decl: TestRhsBad = fn_decl @TestRhsBad [template = constants.%struct.6] { +// CHECK:STDOUT: %import_ref.7: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.9: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestRhsBad.decl: = fn_decl @TestRhsBad [template = constants.%TestRhsBad] { // CHECK:STDOUT: %C.ref.loc12: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc12_15.1: C = param a // CHECK:STDOUT: @TestRhsBad.%a: C = bind_name a, %a.loc12_15.1 // CHECK:STDOUT: %D.ref.loc12: type = name_ref D, %D.decl [template = constants.%D] // CHECK:STDOUT: %b.loc12_21.1: D = param b // CHECK:STDOUT: @TestRhsBad.%b: D = bind_name b, %b.loc12_21.1 -// CHECK:STDOUT: %bool.make_type.loc12: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc12: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_30.1: type = value_of_initializer %bool.make_type.loc12 [template = bool] // CHECK:STDOUT: %.loc12_30.2: type = converted %bool.make_type.loc12, %.loc12_30.1 [template = bool] // CHECK:STDOUT: @TestRhsBad.%return: ref bool = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.10: type = import_ref ir6, inst+2, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.11 = import_ref ir6, inst+25, unloaded -// CHECK:STDOUT: %import_ref.12: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TestLhsBad.decl: TestLhsBad = fn_decl @TestLhsBad [template = constants.%struct.7] { +// CHECK:STDOUT: %import_ref.12: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestLhsBad.decl: = fn_decl @TestLhsBad [template = constants.%TestLhsBad] { // CHECK:STDOUT: %D.ref.loc23: type = name_ref D, %D.decl [template = constants.%D] // CHECK:STDOUT: %a.loc23_15.1: D = param a // CHECK:STDOUT: @TestLhsBad.%a: D = bind_name a, %a.loc23_15.1 // CHECK:STDOUT: %C.ref.loc23: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %b.loc23_21.1: C = param b // CHECK:STDOUT: @TestLhsBad.%b: C = bind_name b, %b.loc23_21.1 -// CHECK:STDOUT: %bool.make_type.loc23: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc23: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc23_30.1: type = value_of_initializer %bool.make_type.loc23 [template = bool] // CHECK:STDOUT: %.loc23_30.2: type = converted %bool.make_type.loc23, %.loc23_30.1 [template = bool] // CHECK:STDOUT: @TestLhsBad.%return: ref bool = var @@ -443,26 +443,26 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: C as Eq { -// CHECK:STDOUT: %Equal.decl: Equal = fn_decl @Equal.1 [template = constants.%struct.2] { +// CHECK:STDOUT: %Equal.decl: = fn_decl @Equal.1 [template = constants.%Equal.1] { // CHECK:STDOUT: %C.ref.loc8_18: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.loc8_12.1: C = param self // CHECK:STDOUT: %self.loc8_12.2: C = bind_name self, %self.loc8_12.1 // CHECK:STDOUT: %C.ref.loc8_28: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other.loc8_21.1: C = param other // CHECK:STDOUT: %other.loc8_21.2: C = bind_name other, %other.loc8_21.1 -// CHECK:STDOUT: %bool.make_type.loc8: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc8: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc8_34.1: type = value_of_initializer %bool.make_type.loc8 [template = bool] // CHECK:STDOUT: %.loc8_34.2: type = converted %bool.make_type.loc8, %.loc8_34.1 [template = bool] // CHECK:STDOUT: %return.var.loc8: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %NotEqual.decl: NotEqual = fn_decl @NotEqual.1 [template = constants.%struct.3] { +// CHECK:STDOUT: %NotEqual.decl: = fn_decl @NotEqual.1 [template = constants.%NotEqual.1] { // CHECK:STDOUT: %C.ref.loc9_21: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.loc9_15.1: C = param self // CHECK:STDOUT: %self.loc9_15.2: C = bind_name self, %self.loc9_15.1 // CHECK:STDOUT: %C.ref.loc9_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other.loc9_24.1: C = param other // CHECK:STDOUT: %other.loc9_24.2: C = bind_name other, %other.loc9_24.1 -// CHECK:STDOUT: %bool.make_type.loc9: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc9: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc9_37.1: type = value_of_initializer %bool.make_type.loc9 [template = bool] // CHECK:STDOUT: %.loc9_37.2: type = converted %bool.make_type.loc9, %.loc9_37.1 [template = bool] // CHECK:STDOUT: %return.var.loc9: ref bool = var @@ -499,7 +499,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: C = name_ref a, %a // CHECK:STDOUT: %b.ref: D = name_ref b, %b -// CHECK:STDOUT: %.1: Equal = interface_witness_access @impl.%.1, element0 [template = constants.%struct.2] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%Equal.1] // CHECK:STDOUT: %.loc20_12: = bound_method %a.ref, %.1 // CHECK:STDOUT: %Equal.call: init bool = call %.loc20_12() [template = ] // CHECK:STDOUT: %.loc20_16.1: bool = value_of_initializer %Equal.call [template = ] diff --git a/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon b/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon index f811369ba3f2..64f08c67e2d0 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon @@ -48,30 +48,30 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: %.2: type = interface_type @Inc [template] // CHECK:STDOUT: %Self.1: Inc = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.3: type = ptr_type C [template] -// CHECK:STDOUT: %Op.1: type = fn_type @Op.1 [template] +// CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %.4: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Op = struct_value () [template] +// CHECK:STDOUT: %Op.1: = struct_value () [template] // CHECK:STDOUT: %.5: type = ptr_type Self [symbolic] -// CHECK:STDOUT: %Op.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %struct.2: Op = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%struct.1) [template] +// CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] +// CHECK:STDOUT: %Op.2: = struct_value () [template] +// CHECK:STDOUT: %.6: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %.7: type = interface_type @AddAssign [template] // CHECK:STDOUT: %Self.2: AddAssign = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Op.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %struct.3: Op = struct_value () [template] +// CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] +// CHECK:STDOUT: %Op.3: = struct_value () [template] // CHECK:STDOUT: %.8: type = ptr_type Self [symbolic] -// CHECK:STDOUT: %Op.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %struct.4: Op = struct_value () [template] -// CHECK:STDOUT: %.9: = interface_witness (%struct.3) [template] -// CHECK:STDOUT: %TestIncNonRef: type = fn_type @TestIncNonRef [template] -// CHECK:STDOUT: %struct.5: TestIncNonRef = struct_value () [template] +// CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] +// CHECK:STDOUT: %Op.4: = struct_value () [template] +// CHECK:STDOUT: %.9: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %TestIncNonRef.type: type = fn_type @TestIncNonRef [template] +// CHECK:STDOUT: %TestIncNonRef: = struct_value () [template] // CHECK:STDOUT: %.10: type = ptr_type {} [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type @Inc, Op [template] -// CHECK:STDOUT: %.12: = assoc_entity element0, file.%import_ref.10 [template] -// CHECK:STDOUT: %TestAddAssignNonRef: type = fn_type @TestAddAssignNonRef [template] -// CHECK:STDOUT: %struct.6: TestAddAssignNonRef = struct_value () [template] -// CHECK:STDOUT: %.13: type = assoc_entity_type @AddAssign, Op [template] -// CHECK:STDOUT: %.14: = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type @Inc, [template] +// CHECK:STDOUT: %.12: in Inc> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %TestAddAssignNonRef.type: type = fn_type @TestAddAssignNonRef [template] +// CHECK:STDOUT: %TestAddAssignNonRef: = struct_value () [template] +// CHECK:STDOUT: %.13: type = assoc_entity_type @AddAssign, [template] +// CHECK:STDOUT: %.14: in AddAssign> = assoc_entity element0, file.%import_ref.12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -85,8 +85,8 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir4, inst+49, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir4, inst+51, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref ir4, inst+65, loaded [template = constants.%.12] -// CHECK:STDOUT: %import_ref.4: Op = import_ref ir4, inst+61, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.3: in Inc> = import_ref ir4, inst+65, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.4: = import_ref ir4, inst+61, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %C.ref.loc15: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc15: = name_ref Core, %Core [template = %Core] @@ -94,21 +94,21 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir4, inst+26, loaded [template = constants.%.7] // CHECK:STDOUT: %import_ref.6 = import_ref ir4, inst+28, unloaded -// CHECK:STDOUT: %import_ref.7: = import_ref ir4, inst+47, loaded [template = constants.%.14] -// CHECK:STDOUT: %import_ref.8: Op = import_ref ir4, inst+43, loaded [template = constants.%struct.4] +// CHECK:STDOUT: %import_ref.7: in AddAssign> = import_ref ir4, inst+47, loaded [template = constants.%.14] +// CHECK:STDOUT: %import_ref.8: = import_ref ir4, inst+43, loaded [template = constants.%Op.4] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %C.ref.loc18: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc18: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %AddAssign.ref: type = name_ref AddAssign, %import_ref.5 [template = constants.%.7] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestIncNonRef.decl: TestIncNonRef = fn_decl @TestIncNonRef [template = constants.%struct.5] { +// CHECK:STDOUT: %TestIncNonRef.decl: = fn_decl @TestIncNonRef [template = constants.%TestIncNonRef] { // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc22_18.1: C = param a // CHECK:STDOUT: @TestIncNonRef.%a: C = bind_name a, %a.loc22_18.1 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.9: type = import_ref ir4, inst+49, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.10 = import_ref ir4, inst+61, unloaded -// CHECK:STDOUT: %TestAddAssignNonRef.decl: TestAddAssignNonRef = fn_decl @TestAddAssignNonRef [template = constants.%struct.6] { +// CHECK:STDOUT: %TestAddAssignNonRef.decl: = fn_decl @TestAddAssignNonRef [template = constants.%TestAddAssignNonRef] { // CHECK:STDOUT: %C.ref.loc33_27: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc33_24.1: C = param a // CHECK:STDOUT: @TestAddAssignNonRef.%a: C = bind_name a, %a.loc33_24.1 @@ -135,7 +135,7 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: C as Inc { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc16_21: type = ptr_type C [template = constants.%.3] // CHECK:STDOUT: %self.loc16_14.1: C* = param self @@ -150,7 +150,7 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: C as AddAssign { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.3 [template = constants.%struct.3] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %C.ref.loc19_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc19_21: type = ptr_type C [template = constants.%.3] // CHECK:STDOUT: %self.loc19_14.1: C* = param self @@ -183,7 +183,7 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: fn @TestIncNonRef(%a: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: C = name_ref a, %a -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.1.%.1, element0 [template = constants.%struct.1] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc30: = bound_method %a.ref, %.1 // CHECK:STDOUT: %Op.call: init () = call %.loc30() [template = ] // CHECK:STDOUT: return @@ -193,7 +193,7 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: C = name_ref a, %a // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.2.%.1, element0 [template = constants.%struct.3] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc40: = bound_method %a.ref, %.1 // CHECK:STDOUT: %Op.call: init () = call %.loc40() [template = ] // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon b/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon index 06d8bb7c0c14..ea80fd39928e 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon @@ -46,41 +46,41 @@ fn TestRef(b: C) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %TestUnary: type = fn_type @TestUnary [template] +// CHECK:STDOUT: %TestUnary.type: type = fn_type @TestUnary [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: TestUnary = struct_value () [template] +// CHECK:STDOUT: %TestUnary: = struct_value () [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] // CHECK:STDOUT: %.4: type = interface_type @Negate [template] // CHECK:STDOUT: %Self.1: Negate = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Op.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %struct.2: Op = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @Negate, Op [template] -// CHECK:STDOUT: %.6: = assoc_entity element0, file.%import_ref.5 [template] -// CHECK:STDOUT: %TestBinary: type = fn_type @TestBinary [template] -// CHECK:STDOUT: %struct.3: TestBinary = struct_value () [template] +// CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] +// CHECK:STDOUT: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @Negate, [template] +// CHECK:STDOUT: %.6: in Negate> = assoc_entity element0, file.%import_ref.5 [template] +// CHECK:STDOUT: %TestBinary.type: type = fn_type @TestBinary [template] +// CHECK:STDOUT: %TestBinary: = struct_value () [template] // CHECK:STDOUT: %.7: type = interface_type @Add [template] // CHECK:STDOUT: %Self.2: Add = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Op.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %struct.4: Op = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type @Add, Op [template] -// CHECK:STDOUT: %.9: = assoc_entity element0, file.%import_ref.10 [template] -// CHECK:STDOUT: %TestRef: type = fn_type @TestRef [template] -// CHECK:STDOUT: %struct.5: TestRef = struct_value () [template] -// CHECK:STDOUT: %struct.6: C = struct_value () [template] +// CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] +// CHECK:STDOUT: %Op.2: = struct_value () [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type @Add, [template] +// CHECK:STDOUT: %.9: in Add> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %TestRef.type: type = fn_type @TestRef [template] +// CHECK:STDOUT: %TestRef: = struct_value () [template] +// CHECK:STDOUT: %struct: C = struct_value () [template] // CHECK:STDOUT: %.10: type = interface_type @AddAssign [template] // CHECK:STDOUT: %Self.3: AddAssign = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.11: type = ptr_type Self [symbolic] -// CHECK:STDOUT: %Op.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %struct.7: Op = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @AddAssign, Op [template] -// CHECK:STDOUT: %.13: = assoc_entity element0, file.%import_ref.15 [template] +// CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] +// CHECK:STDOUT: %Op.3: = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @AddAssign, [template] +// CHECK:STDOUT: %.13: in AddAssign> = assoc_entity element0, file.%import_ref.15 [template] // CHECK:STDOUT: %.14: type = interface_type @Inc [template] // CHECK:STDOUT: %Self.4: Inc = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.15: type = ptr_type Self [symbolic] -// CHECK:STDOUT: %Op.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %struct.8: Op = struct_value () [template] -// CHECK:STDOUT: %.16: type = assoc_entity_type @Inc, Op [template] -// CHECK:STDOUT: %.17: = assoc_entity element0, file.%import_ref.20 [template] +// CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] +// CHECK:STDOUT: %Op.4: = struct_value () [template] +// CHECK:STDOUT: %.16: type = assoc_entity_type @Inc, [template] +// CHECK:STDOUT: %.17: in Inc> = assoc_entity element0, file.%import_ref.20 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -93,7 +93,7 @@ fn TestRef(b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %TestUnary.decl: TestUnary = fn_decl @TestUnary [template = constants.%struct.1] { +// CHECK:STDOUT: %TestUnary.decl: = fn_decl @TestUnary [template = constants.%TestUnary] { // CHECK:STDOUT: %C.ref.loc15_17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc15_14.1: C = param a // CHECK:STDOUT: @TestUnary.%a: C = bind_name a, %a.loc15_14.1 @@ -102,10 +102,10 @@ fn TestRef(b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref ir4, inst+67, loaded [template = constants.%.4] // CHECK:STDOUT: %import_ref.2 = import_ref ir4, inst+69, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref ir4, inst+84, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.3: in Negate> = import_ref ir4, inst+84, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.4 = import_ref ir4, inst+80, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref ir4, inst+80, unloaded -// CHECK:STDOUT: %TestBinary.decl: TestBinary = fn_decl @TestBinary [template = constants.%struct.3] { +// CHECK:STDOUT: %TestBinary.decl: = fn_decl @TestBinary [template = constants.%TestBinary] { // CHECK:STDOUT: %C.ref.loc23_18: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc23_15.1: C = param a // CHECK:STDOUT: @TestBinary.%a: C = bind_name a, %a.loc23_15.1 @@ -117,22 +117,22 @@ fn TestRef(b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.6: type = import_ref ir4, inst+1, loaded [template = constants.%.7] // CHECK:STDOUT: %import_ref.7 = import_ref ir4, inst+3, unloaded -// CHECK:STDOUT: %import_ref.8: = import_ref ir4, inst+24, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.8: in Add> = import_ref ir4, inst+24, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.9 = import_ref ir4, inst+19, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref ir4, inst+19, unloaded -// CHECK:STDOUT: %TestRef.decl: TestRef = fn_decl @TestRef [template = constants.%struct.5] { +// CHECK:STDOUT: %TestRef.decl: = fn_decl @TestRef [template = constants.%TestRef] { // CHECK:STDOUT: %C.ref.loc31: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %b.loc31_12.1: C = param b // CHECK:STDOUT: @TestRef.%b: C = bind_name b, %b.loc31_12.1 // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.11: type = import_ref ir4, inst+26, loaded [template = constants.%.10] // CHECK:STDOUT: %import_ref.12 = import_ref ir4, inst+28, unloaded -// CHECK:STDOUT: %import_ref.13: = import_ref ir4, inst+47, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.13: in AddAssign> = import_ref ir4, inst+47, loaded [template = constants.%.13] // CHECK:STDOUT: %import_ref.14 = import_ref ir4, inst+43, unloaded // CHECK:STDOUT: %import_ref.15 = import_ref ir4, inst+43, unloaded // CHECK:STDOUT: %import_ref.16: type = import_ref ir4, inst+49, loaded [template = constants.%.14] // CHECK:STDOUT: %import_ref.17 = import_ref ir4, inst+51, unloaded -// CHECK:STDOUT: %import_ref.18: = import_ref ir4, inst+65, loaded [template = constants.%.17] +// CHECK:STDOUT: %import_ref.18: in Inc> = import_ref ir4, inst+65, loaded [template = constants.%.17] // CHECK:STDOUT: %import_ref.19 = import_ref ir4, inst+61, unloaded // CHECK:STDOUT: %import_ref.20 = import_ref ir4, inst+61, unloaded // CHECK:STDOUT: } @@ -193,8 +193,8 @@ fn TestRef(b: C) { // CHECK:STDOUT: %a.var: ref C = var a // CHECK:STDOUT: %a: ref C = bind_name a, %a.var // CHECK:STDOUT: %.loc32_15.1: {} = struct_literal () -// CHECK:STDOUT: %.loc32_15.2: init C = class_init (), %a.var [template = constants.%struct.6] -// CHECK:STDOUT: %.loc32_16: init C = converted %.loc32_15.1, %.loc32_15.2 [template = constants.%struct.6] +// CHECK:STDOUT: %.loc32_15.2: init C = class_init (), %a.var [template = constants.%struct] +// CHECK:STDOUT: %.loc32_16: init C = converted %.loc32_15.1, %.loc32_15.2 [template = constants.%struct] // CHECK:STDOUT: assign %a.var, %.loc32_16 // CHECK:STDOUT: %a.ref.loc37: ref C = name_ref a, %a // CHECK:STDOUT: %b.ref: C = name_ref b, %b diff --git a/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon b/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon index 9d652715ae90..3b6c30dc4f47 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon @@ -50,31 +50,31 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %.2: type = interface_type @Add [template] // CHECK:STDOUT: %Self.1: Add = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Op.1: type = fn_type @Op.1 [template] +// CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Op = struct_value () [template] -// CHECK:STDOUT: %Op.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %struct.2: Op = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%struct.1) [template] +// CHECK:STDOUT: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] +// CHECK:STDOUT: %Op.2: = struct_value () [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %.5: type = interface_type @AddAssign [template] // CHECK:STDOUT: %Self.2: AddAssign = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.6: type = ptr_type C [template] -// CHECK:STDOUT: %Op.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %struct.3: Op = struct_value () [template] +// CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] +// CHECK:STDOUT: %Op.3: = struct_value () [template] // CHECK:STDOUT: %.7: type = ptr_type Self [symbolic] -// CHECK:STDOUT: %Op.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %struct.4: Op = struct_value () [template] -// CHECK:STDOUT: %.8: = interface_witness (%struct.3) [template] -// CHECK:STDOUT: %Test: type = fn_type @Test [template] -// CHECK:STDOUT: %struct.5: Test = struct_value () [template] +// CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] +// CHECK:STDOUT: %Op.4: = struct_value () [template] +// CHECK:STDOUT: %.8: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %Test.type: type = fn_type @Test [template] +// CHECK:STDOUT: %Test: = struct_value () [template] // CHECK:STDOUT: %.9: type = ptr_type {} [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type @Add, Op [template] -// CHECK:STDOUT: %.11: = assoc_entity element0, file.%import_ref.10 [template] -// CHECK:STDOUT: %TestAssign: type = fn_type @TestAssign [template] -// CHECK:STDOUT: %struct.6: TestAssign = struct_value () [template] -// CHECK:STDOUT: %struct.7: C = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @AddAssign, Op [template] -// CHECK:STDOUT: %.13: = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type @Add, [template] +// CHECK:STDOUT: %.11: in Add> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] +// CHECK:STDOUT: %TestAssign: = struct_value () [template] +// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @AddAssign, [template] +// CHECK:STDOUT: %.13: in AddAssign> = assoc_entity element0, file.%import_ref.12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -90,8 +90,8 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir4, inst+1, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir4, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref ir4, inst+24, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.4: Op = import_ref ir4, inst+19, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.3: in Add> = import_ref ir4, inst+24, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.4: = import_ref ir4, inst+19, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %C.ref.loc16: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc16: = name_ref Core, %Core [template = %Core] @@ -99,14 +99,14 @@ fn TestAssign(b: D) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir4, inst+26, loaded [template = constants.%.5] // CHECK:STDOUT: %import_ref.6 = import_ref ir4, inst+28, unloaded -// CHECK:STDOUT: %import_ref.7: = import_ref ir4, inst+47, loaded [template = constants.%.13] -// CHECK:STDOUT: %import_ref.8: Op = import_ref ir4, inst+43, loaded [template = constants.%struct.4] +// CHECK:STDOUT: %import_ref.7: in AddAssign> = import_ref ir4, inst+47, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.8: = import_ref ir4, inst+43, loaded [template = constants.%Op.4] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %C.ref.loc19: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc19: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %AddAssign.ref: type = name_ref AddAssign, %import_ref.5 [template = constants.%.5] // CHECK:STDOUT: } -// CHECK:STDOUT: %Test.decl: Test = fn_decl @Test [template = constants.%struct.5] { +// CHECK:STDOUT: %Test.decl: = fn_decl @Test [template = constants.%Test] { // CHECK:STDOUT: %C.ref.loc23_12: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc23_9.1: C = param a // CHECK:STDOUT: @Test.%a: C = bind_name a, %a.loc23_9.1 @@ -118,7 +118,7 @@ fn TestAssign(b: D) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.9: type = import_ref ir4, inst+1, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.10 = import_ref ir4, inst+19, unloaded -// CHECK:STDOUT: %TestAssign.decl: TestAssign = fn_decl @TestAssign [template = constants.%struct.6] { +// CHECK:STDOUT: %TestAssign.decl: = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %D.ref.loc34: type = name_ref D, %D.decl [template = constants.%D] // CHECK:STDOUT: %b.loc34_15.1: D = param b // CHECK:STDOUT: @TestAssign.%b: D = bind_name b, %b.loc34_15.1 @@ -142,7 +142,7 @@ fn TestAssign(b: D) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: C as Add { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc17_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.loc17_9.1: C = param self // CHECK:STDOUT: %self.loc17_9.2: C = bind_name self, %self.loc17_9.1 @@ -160,7 +160,7 @@ fn TestAssign(b: D) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: C as AddAssign { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.3 [template = constants.%struct.3] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %C.ref.loc20_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc20_21: type = ptr_type C [template = constants.%.6] // CHECK:STDOUT: %self.loc20_14.1: C* = param self @@ -199,7 +199,7 @@ fn TestAssign(b: D) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: C = name_ref a, %a // CHECK:STDOUT: %b.ref: D = name_ref b, %b -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.1.%.1, element0 [template = constants.%struct.1] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc31_12.1: = bound_method %a.ref, %.1 // CHECK:STDOUT: %.loc31_12.2: ref C = temporary_storage // CHECK:STDOUT: %Op.call: init C = call %.loc31_12.1() [template = ] @@ -212,12 +212,12 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %a.var: ref C = var a // CHECK:STDOUT: %a: ref C = bind_name a, %a.var // CHECK:STDOUT: %.loc35_15.1: {} = struct_literal () -// CHECK:STDOUT: %.loc35_15.2: init C = class_init (), %a.var [template = constants.%struct.7] -// CHECK:STDOUT: %.loc35_16: init C = converted %.loc35_15.1, %.loc35_15.2 [template = constants.%struct.7] +// CHECK:STDOUT: %.loc35_15.2: init C = class_init (), %a.var [template = constants.%struct] +// CHECK:STDOUT: %.loc35_16: init C = converted %.loc35_15.1, %.loc35_15.2 [template = constants.%struct] // CHECK:STDOUT: assign %a.var, %.loc35_16 // CHECK:STDOUT: %a.ref: ref C = name_ref a, %a // CHECK:STDOUT: %b.ref: D = name_ref b, %b -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.2.%.1, element0 [template = constants.%struct.3] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc42_5: = bound_method %a.ref, %.1 // CHECK:STDOUT: %.loc42_3: C* = addr_of %a.ref // CHECK:STDOUT: %Op.call: init () = call %.loc42_5() [template = ] diff --git a/toolchain/check/testdata/operators/overloaded/inc.carbon b/toolchain/check/testdata/operators/overloaded/inc.carbon index 26ce2077c5cf..a748753c5a1e 100644 --- a/toolchain/check/testdata/operators/overloaded/inc.carbon +++ b/toolchain/check/testdata/operators/overloaded/inc.carbon @@ -31,19 +31,19 @@ fn TestOp() { // CHECK:STDOUT: %.2: type = interface_type @Inc [template] // CHECK:STDOUT: %Self: Inc = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.3: type = ptr_type C [template] -// CHECK:STDOUT: %Op.1: type = fn_type @Op.1 [template] +// CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %.4: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Op = struct_value () [template] +// CHECK:STDOUT: %Op.1: = struct_value () [template] // CHECK:STDOUT: %.5: type = ptr_type Self [symbolic] -// CHECK:STDOUT: %Op.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %struct.2: Op = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%struct.1) [template] -// CHECK:STDOUT: %TestOp: type = fn_type @TestOp [template] -// CHECK:STDOUT: %struct.3: TestOp = struct_value () [template] +// CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] +// CHECK:STDOUT: %Op.2: = struct_value () [template] +// CHECK:STDOUT: %.6: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] +// CHECK:STDOUT: %TestOp: = struct_value () [template] // CHECK:STDOUT: %.7: type = ptr_type {} [template] -// CHECK:STDOUT: %struct.4: C = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type @Inc, Op [template] -// CHECK:STDOUT: %.9: = assoc_entity element0, file.%import_ref.6 [template] +// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type @Inc, [template] +// CHECK:STDOUT: %.9: in Inc> = assoc_entity element0, file.%import_ref.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -56,14 +56,14 @@ fn TestOp() { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir4, inst+49, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir4, inst+51, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref ir4, inst+65, loaded [template = constants.%.9] -// CHECK:STDOUT: %import_ref.4: Op = import_ref ir4, inst+61, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.3: in Inc> = import_ref ir4, inst+65, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.4: = import_ref ir4, inst+61, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %Inc.ref: type = name_ref Inc, %import_ref.1 [template = constants.%.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: TestOp = fn_decl @TestOp [template = constants.%struct.3] {} +// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] {} // CHECK:STDOUT: %import_ref.5: type = import_ref ir4, inst+49, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.6 = import_ref ir4, inst+61, unloaded // CHECK:STDOUT: } @@ -76,7 +76,7 @@ fn TestOp() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: C as Inc { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc18_21: type = ptr_type C [template = constants.%.3] // CHECK:STDOUT: %self.loc18_14.1: C* = param self @@ -105,11 +105,11 @@ fn TestOp() { // CHECK:STDOUT: %c.var: ref C = var c // CHECK:STDOUT: %c: ref C = bind_name c, %c.var // CHECK:STDOUT: %.loc22_15.1: {} = struct_literal () -// CHECK:STDOUT: %.loc22_15.2: init C = class_init (), %c.var [template = constants.%struct.4] -// CHECK:STDOUT: %.loc22_16: init C = converted %.loc22_15.1, %.loc22_15.2 [template = constants.%struct.4] +// CHECK:STDOUT: %.loc22_15.2: init C = class_init (), %c.var [template = constants.%struct] +// CHECK:STDOUT: %.loc22_16: init C = converted %.loc22_15.1, %.loc22_15.2 [template = constants.%struct] // CHECK:STDOUT: assign %c.var, %.loc22_16 // CHECK:STDOUT: %c.ref: ref C = name_ref c, %c -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.%.1, element0 [template = constants.%struct.1] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc23_3: = bound_method %c.ref, %.1 // CHECK:STDOUT: %.loc23_5: C* = addr_of %c.ref // CHECK:STDOUT: %Op.call: init () = call %.loc23_3(%.loc23_5) diff --git a/toolchain/check/testdata/operators/overloaded/left_shift.carbon b/toolchain/check/testdata/operators/overloaded/left_shift.carbon index a1b2f2d749c5..14ebd24c066b 100644 --- a/toolchain/check/testdata/operators/overloaded/left_shift.carbon +++ b/toolchain/check/testdata/operators/overloaded/left_shift.carbon @@ -38,31 +38,31 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @LeftShift [template] // CHECK:STDOUT: %Self.1: LeftShift = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Op.1: type = fn_type @Op.1 [template] +// CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Op = struct_value () [template] -// CHECK:STDOUT: %Op.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %struct.2: Op = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%struct.1) [template] +// CHECK:STDOUT: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] +// CHECK:STDOUT: %Op.2: = struct_value () [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %.5: type = ptr_type {} [template] -// CHECK:STDOUT: %struct.3: C = struct_value () [template] +// CHECK:STDOUT: %struct: C = struct_value () [template] // CHECK:STDOUT: %.6: type = interface_type @LeftShiftAssign [template] // CHECK:STDOUT: %Self.2: LeftShiftAssign = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.7: type = ptr_type C [template] -// CHECK:STDOUT: %Op.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %struct.4: Op = struct_value () [template] +// CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] +// CHECK:STDOUT: %Op.3: = struct_value () [template] // CHECK:STDOUT: %.8: type = ptr_type Self [symbolic] -// CHECK:STDOUT: %Op.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %struct.5: Op = struct_value () [template] -// CHECK:STDOUT: %.9: = interface_witness (%struct.4) [template] -// CHECK:STDOUT: %TestOp: type = fn_type @TestOp [template] -// CHECK:STDOUT: %struct.6: TestOp = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type @LeftShift, Op [template] -// CHECK:STDOUT: %.11: = assoc_entity element0, file.%import_ref.10 [template] -// CHECK:STDOUT: %TestAssign: type = fn_type @TestAssign [template] -// CHECK:STDOUT: %struct.7: TestAssign = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @LeftShiftAssign, Op [template] -// CHECK:STDOUT: %.13: = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] +// CHECK:STDOUT: %Op.4: = struct_value () [template] +// CHECK:STDOUT: %.9: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] +// CHECK:STDOUT: %TestOp: = struct_value () [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type @LeftShift, [template] +// CHECK:STDOUT: %.11: in LeftShift> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] +// CHECK:STDOUT: %TestAssign: = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @LeftShiftAssign, [template] +// CHECK:STDOUT: %.13: in LeftShiftAssign> = assoc_entity element0, file.%import_ref.12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,8 +76,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir5, inst+162, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir5, inst+164, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref ir5, inst+184, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.4: Op = import_ref ir5, inst+180, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.3: in LeftShift> = import_ref ir5, inst+184, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.4: = import_ref ir5, inst+180, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc17: = name_ref Core, %Core [template = %Core] @@ -85,14 +85,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir5, inst+186, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.6 = import_ref ir5, inst+188, unloaded -// CHECK:STDOUT: %import_ref.7: = import_ref ir5, inst+207, loaded [template = constants.%.13] -// CHECK:STDOUT: %import_ref.8: Op = import_ref ir5, inst+203, loaded [template = constants.%struct.5] +// CHECK:STDOUT: %import_ref.7: in LeftShiftAssign> = import_ref ir5, inst+207, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.8: = import_ref ir5, inst+203, loaded [template = constants.%Op.4] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc22: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %LeftShiftAssign.ref: type = name_ref LeftShiftAssign, %import_ref.5 [template = constants.%.6] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: TestOp = fn_decl @TestOp [template = constants.%struct.6] { +// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc26_11.1: C = param a // CHECK:STDOUT: @TestOp.%a: C = bind_name a, %a.loc26_11.1 @@ -104,7 +104,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.9: type = import_ref ir5, inst+162, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.10 = import_ref ir5, inst+180, unloaded -// CHECK:STDOUT: %TestAssign.decl: TestAssign = fn_decl @TestAssign [template = constants.%struct.7] { +// CHECK:STDOUT: %TestAssign.decl: = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc30: type = ptr_type C [template = constants.%.7] // CHECK:STDOUT: %a.loc30_15.1: C* = param a @@ -132,7 +132,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: C as LeftShift { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.loc18_9.1: C = param self // CHECK:STDOUT: %self.loc18_9.2: C = bind_name self, %self.loc18_9.1 @@ -150,7 +150,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: C as LeftShiftAssign { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.3 [template = constants.%struct.4] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc23_21: type = ptr_type C [template = constants.%.7] // CHECK:STDOUT: %self.loc23_14.1: C* = param self @@ -175,8 +175,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: C](@impl.1.%other.loc18_18.2: C) -> @impl.1.%return.var: C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc19_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_14 to @impl.1.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: @@ -193,7 +193,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: C = name_ref a, %a // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.1.%.1, element0 [template = constants.%struct.1] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 // CHECK:STDOUT: %.loc26: ref C = splice_block %return {} // CHECK:STDOUT: %Op.call: init C = call %.loc27(%a.ref, %b.ref) to %.loc26 @@ -205,7 +205,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: C* = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref C = deref %a.ref // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.2.%.1, element0 [template = constants.%struct.4] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 // CHECK:STDOUT: %.loc31_3.2: C* = addr_of %.loc31_3.1 // CHECK:STDOUT: %Op.call: init () = call %.loc31_6(%.loc31_3.2, %b.ref) diff --git a/toolchain/check/testdata/operators/overloaded/mod.carbon b/toolchain/check/testdata/operators/overloaded/mod.carbon index 8d6e944dd6aa..63134cf21dfd 100644 --- a/toolchain/check/testdata/operators/overloaded/mod.carbon +++ b/toolchain/check/testdata/operators/overloaded/mod.carbon @@ -38,31 +38,31 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @Mod [template] // CHECK:STDOUT: %Self.1: Mod = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Op.1: type = fn_type @Op.1 [template] +// CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Op = struct_value () [template] -// CHECK:STDOUT: %Op.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %struct.2: Op = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%struct.1) [template] +// CHECK:STDOUT: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] +// CHECK:STDOUT: %Op.2: = struct_value () [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %.5: type = ptr_type {} [template] -// CHECK:STDOUT: %struct.3: C = struct_value () [template] +// CHECK:STDOUT: %struct: C = struct_value () [template] // CHECK:STDOUT: %.6: type = interface_type @ModAssign [template] // CHECK:STDOUT: %Self.2: ModAssign = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.7: type = ptr_type C [template] -// CHECK:STDOUT: %Op.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %struct.4: Op = struct_value () [template] +// CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] +// CHECK:STDOUT: %Op.3: = struct_value () [template] // CHECK:STDOUT: %.8: type = ptr_type Self [symbolic] -// CHECK:STDOUT: %Op.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %struct.5: Op = struct_value () [template] -// CHECK:STDOUT: %.9: = interface_witness (%struct.4) [template] -// CHECK:STDOUT: %TestOp: type = fn_type @TestOp [template] -// CHECK:STDOUT: %struct.6: TestOp = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type @Mod, Op [template] -// CHECK:STDOUT: %.11: = assoc_entity element0, file.%import_ref.10 [template] -// CHECK:STDOUT: %TestAssign: type = fn_type @TestAssign [template] -// CHECK:STDOUT: %struct.7: TestAssign = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @ModAssign, Op [template] -// CHECK:STDOUT: %.13: = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] +// CHECK:STDOUT: %Op.4: = struct_value () [template] +// CHECK:STDOUT: %.9: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] +// CHECK:STDOUT: %TestOp: = struct_value () [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type @Mod, [template] +// CHECK:STDOUT: %.11: in Mod> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] +// CHECK:STDOUT: %TestAssign: = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @ModAssign, [template] +// CHECK:STDOUT: %.13: in ModAssign> = assoc_entity element0, file.%import_ref.12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,8 +76,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir4, inst+245, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir4, inst+247, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref ir4, inst+267, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.4: Op = import_ref ir4, inst+263, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.3: in Mod> = import_ref ir4, inst+267, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.4: = import_ref ir4, inst+263, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc17: = name_ref Core, %Core [template = %Core] @@ -85,14 +85,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir4, inst+269, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.6 = import_ref ir4, inst+271, unloaded -// CHECK:STDOUT: %import_ref.7: = import_ref ir4, inst+290, loaded [template = constants.%.13] -// CHECK:STDOUT: %import_ref.8: Op = import_ref ir4, inst+286, loaded [template = constants.%struct.5] +// CHECK:STDOUT: %import_ref.7: in ModAssign> = import_ref ir4, inst+290, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.8: = import_ref ir4, inst+286, loaded [template = constants.%Op.4] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc22: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %ModAssign.ref: type = name_ref ModAssign, %import_ref.5 [template = constants.%.6] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: TestOp = fn_decl @TestOp [template = constants.%struct.6] { +// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc26_11.1: C = param a // CHECK:STDOUT: @TestOp.%a: C = bind_name a, %a.loc26_11.1 @@ -104,7 +104,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.9: type = import_ref ir4, inst+245, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.10 = import_ref ir4, inst+263, unloaded -// CHECK:STDOUT: %TestAssign.decl: TestAssign = fn_decl @TestAssign [template = constants.%struct.7] { +// CHECK:STDOUT: %TestAssign.decl: = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc30: type = ptr_type C [template = constants.%.7] // CHECK:STDOUT: %a.loc30_15.1: C* = param a @@ -132,7 +132,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: C as Mod { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.loc18_9.1: C = param self // CHECK:STDOUT: %self.loc18_9.2: C = bind_name self, %self.loc18_9.1 @@ -150,7 +150,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: C as ModAssign { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.3 [template = constants.%struct.4] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc23_21: type = ptr_type C [template = constants.%.7] // CHECK:STDOUT: %self.loc23_14.1: C* = param self @@ -175,8 +175,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: C](@impl.1.%other.loc18_18.2: C) -> @impl.1.%return.var: C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc19_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_14 to @impl.1.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: @@ -193,7 +193,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: C = name_ref a, %a // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.1.%.1, element0 [template = constants.%struct.1] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 // CHECK:STDOUT: %.loc26: ref C = splice_block %return {} // CHECK:STDOUT: %Op.call: init C = call %.loc27(%a.ref, %b.ref) to %.loc26 @@ -205,7 +205,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: C* = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref C = deref %a.ref // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.2.%.1, element0 [template = constants.%struct.4] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 // CHECK:STDOUT: %.loc31_3.2: C* = addr_of %.loc31_3.1 // CHECK:STDOUT: %Op.call: init () = call %.loc31_6(%.loc31_3.2, %b.ref) diff --git a/toolchain/check/testdata/operators/overloaded/mul.carbon b/toolchain/check/testdata/operators/overloaded/mul.carbon index f05fbc5edec8..735b50351c19 100644 --- a/toolchain/check/testdata/operators/overloaded/mul.carbon +++ b/toolchain/check/testdata/operators/overloaded/mul.carbon @@ -38,31 +38,31 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @Mul [template] // CHECK:STDOUT: %Self.1: Mul = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Op.1: type = fn_type @Op.1 [template] +// CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Op = struct_value () [template] -// CHECK:STDOUT: %Op.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %struct.2: Op = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%struct.1) [template] +// CHECK:STDOUT: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] +// CHECK:STDOUT: %Op.2: = struct_value () [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %.5: type = ptr_type {} [template] -// CHECK:STDOUT: %struct.3: C = struct_value () [template] +// CHECK:STDOUT: %struct: C = struct_value () [template] // CHECK:STDOUT: %.6: type = interface_type @MulAssign [template] // CHECK:STDOUT: %Self.2: MulAssign = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.7: type = ptr_type C [template] -// CHECK:STDOUT: %Op.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %struct.4: Op = struct_value () [template] +// CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] +// CHECK:STDOUT: %Op.3: = struct_value () [template] // CHECK:STDOUT: %.8: type = ptr_type Self [symbolic] -// CHECK:STDOUT: %Op.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %struct.5: Op = struct_value () [template] -// CHECK:STDOUT: %.9: = interface_witness (%struct.4) [template] -// CHECK:STDOUT: %TestOp: type = fn_type @TestOp [template] -// CHECK:STDOUT: %struct.6: TestOp = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type @Mul, Op [template] -// CHECK:STDOUT: %.11: = assoc_entity element0, file.%import_ref.10 [template] -// CHECK:STDOUT: %TestAssign: type = fn_type @TestAssign [template] -// CHECK:STDOUT: %struct.7: TestAssign = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @MulAssign, Op [template] -// CHECK:STDOUT: %.13: = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] +// CHECK:STDOUT: %Op.4: = struct_value () [template] +// CHECK:STDOUT: %.9: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] +// CHECK:STDOUT: %TestOp: = struct_value () [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type @Mul, [template] +// CHECK:STDOUT: %.11: in Mul> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] +// CHECK:STDOUT: %TestAssign: = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @MulAssign, [template] +// CHECK:STDOUT: %.13: in MulAssign> = assoc_entity element0, file.%import_ref.12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,8 +76,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir4, inst+151, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir4, inst+153, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref ir4, inst+173, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.4: Op = import_ref ir4, inst+169, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.3: in Mul> = import_ref ir4, inst+173, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.4: = import_ref ir4, inst+169, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc17: = name_ref Core, %Core [template = %Core] @@ -85,14 +85,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir4, inst+175, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.6 = import_ref ir4, inst+177, unloaded -// CHECK:STDOUT: %import_ref.7: = import_ref ir4, inst+196, loaded [template = constants.%.13] -// CHECK:STDOUT: %import_ref.8: Op = import_ref ir4, inst+192, loaded [template = constants.%struct.5] +// CHECK:STDOUT: %import_ref.7: in MulAssign> = import_ref ir4, inst+196, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.8: = import_ref ir4, inst+192, loaded [template = constants.%Op.4] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc22: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %MulAssign.ref: type = name_ref MulAssign, %import_ref.5 [template = constants.%.6] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: TestOp = fn_decl @TestOp [template = constants.%struct.6] { +// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc26_11.1: C = param a // CHECK:STDOUT: @TestOp.%a: C = bind_name a, %a.loc26_11.1 @@ -104,7 +104,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.9: type = import_ref ir4, inst+151, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.10 = import_ref ir4, inst+169, unloaded -// CHECK:STDOUT: %TestAssign.decl: TestAssign = fn_decl @TestAssign [template = constants.%struct.7] { +// CHECK:STDOUT: %TestAssign.decl: = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc30: type = ptr_type C [template = constants.%.7] // CHECK:STDOUT: %a.loc30_15.1: C* = param a @@ -132,7 +132,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: C as Mul { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.loc18_9.1: C = param self // CHECK:STDOUT: %self.loc18_9.2: C = bind_name self, %self.loc18_9.1 @@ -150,7 +150,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: C as MulAssign { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.3 [template = constants.%struct.4] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc23_21: type = ptr_type C [template = constants.%.7] // CHECK:STDOUT: %self.loc23_14.1: C* = param self @@ -175,8 +175,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: C](@impl.1.%other.loc18_18.2: C) -> @impl.1.%return.var: C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc19_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_14 to @impl.1.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: @@ -193,7 +193,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: C = name_ref a, %a // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.1.%.1, element0 [template = constants.%struct.1] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 // CHECK:STDOUT: %.loc26: ref C = splice_block %return {} // CHECK:STDOUT: %Op.call: init C = call %.loc27(%a.ref, %b.ref) to %.loc26 @@ -205,7 +205,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: C* = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref C = deref %a.ref // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.2.%.1, element0 [template = constants.%struct.4] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 // CHECK:STDOUT: %.loc31_3.2: C* = addr_of %.loc31_3.1 // CHECK:STDOUT: %Op.call: init () = call %.loc31_6(%.loc31_3.2, %b.ref) diff --git a/toolchain/check/testdata/operators/overloaded/negate.carbon b/toolchain/check/testdata/operators/overloaded/negate.carbon index a9add534841b..bcbaea38adc4 100644 --- a/toolchain/check/testdata/operators/overloaded/negate.carbon +++ b/toolchain/check/testdata/operators/overloaded/negate.carbon @@ -31,18 +31,18 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @Negate [template] // CHECK:STDOUT: %Self: Negate = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Op.1: type = fn_type @Op.1 [template] +// CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Op = struct_value () [template] -// CHECK:STDOUT: %Op.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %struct.2: Op = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%struct.1) [template] +// CHECK:STDOUT: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] +// CHECK:STDOUT: %Op.2: = struct_value () [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %.5: type = ptr_type {} [template] -// CHECK:STDOUT: %struct.3: C = struct_value () [template] -// CHECK:STDOUT: %TestOp: type = fn_type @TestOp [template] -// CHECK:STDOUT: %struct.4: TestOp = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type @Negate, Op [template] -// CHECK:STDOUT: %.7: = assoc_entity element0, file.%import_ref.6 [template] +// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] +// CHECK:STDOUT: %TestOp: = struct_value () [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type @Negate, [template] +// CHECK:STDOUT: %.7: in Negate> = assoc_entity element0, file.%import_ref.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -55,14 +55,14 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir4, inst+67, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir4, inst+69, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref ir4, inst+84, loaded [template = constants.%.7] -// CHECK:STDOUT: %import_ref.4: Op = import_ref ir4, inst+80, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.3: in Negate> = import_ref ir4, inst+84, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.4: = import_ref ir4, inst+80, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %Negate.ref: type = name_ref Negate, %import_ref.1 [template = constants.%.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: TestOp = fn_decl @TestOp [template = constants.%struct.4] { +// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc23_14: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc23_11.1: C = param a // CHECK:STDOUT: @TestOp.%a: C = bind_name a, %a.loc23_11.1 @@ -81,7 +81,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: C as Negate { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.loc18_9.1: C = param self // CHECK:STDOUT: %self.loc18_9.2: C = bind_name self, %self.loc18_9.1 @@ -103,8 +103,8 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: fn @Op.1[@impl.%self.loc18_9.2: C]() -> @impl.%return.var: C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc19_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.%return.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_14 to @impl.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: @@ -113,7 +113,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: fn @TestOp(%a: C) -> %return: C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: C = name_ref a, %a -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.%.1, element0 [template = constants.%struct.1] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc24: = bound_method %a.ref, %.1 // CHECK:STDOUT: %.loc23: ref C = splice_block %return {} // CHECK:STDOUT: %Op.call: init C = call %.loc24(%a.ref) to %.loc23 diff --git a/toolchain/check/testdata/operators/overloaded/ordered.carbon b/toolchain/check/testdata/operators/overloaded/ordered.carbon index 46ff7971b64e..fc2cd2d4f456 100644 --- a/toolchain/check/testdata/operators/overloaded/ordered.carbon +++ b/toolchain/check/testdata/operators/overloaded/ordered.carbon @@ -81,43 +81,43 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @Ordered [template] // CHECK:STDOUT: %Self: Ordered = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Bool = struct_value () [template] -// CHECK:STDOUT: %Less.1: type = fn_type @Less.1 [template] -// CHECK:STDOUT: %struct.2: Less = struct_value () [template] -// CHECK:STDOUT: %LessOrEquivalent.1: type = fn_type @LessOrEquivalent.1 [template] -// CHECK:STDOUT: %struct.3: LessOrEquivalent = struct_value () [template] -// CHECK:STDOUT: %Greater.1: type = fn_type @Greater.1 [template] -// CHECK:STDOUT: %struct.4: Greater = struct_value () [template] -// CHECK:STDOUT: %GreaterOrEquivalent.1: type = fn_type @GreaterOrEquivalent.1 [template] -// CHECK:STDOUT: %struct.5: GreaterOrEquivalent = struct_value () [template] -// CHECK:STDOUT: %Less.2: type = fn_type @Less.2 [template] -// CHECK:STDOUT: %struct.6: Less = struct_value () [template] -// CHECK:STDOUT: %LessOrEquivalent.2: type = fn_type @LessOrEquivalent.2 [template] -// CHECK:STDOUT: %struct.7: LessOrEquivalent = struct_value () [template] -// CHECK:STDOUT: %Greater.2: type = fn_type @Greater.2 [template] -// CHECK:STDOUT: %struct.8: Greater = struct_value () [template] -// CHECK:STDOUT: %GreaterOrEquivalent.2: type = fn_type @GreaterOrEquivalent.2 [template] -// CHECK:STDOUT: %struct.9: GreaterOrEquivalent = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%struct.2, %struct.3, %struct.4, %struct.5) [template] -// CHECK:STDOUT: %TestLess: type = fn_type @TestLess [template] -// CHECK:STDOUT: %struct.10: TestLess = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Less.type.1: type = fn_type @Less.1 [template] +// CHECK:STDOUT: %Less.1: = struct_value () [template] +// CHECK:STDOUT: %LessOrEquivalent.type.1: type = fn_type @LessOrEquivalent.1 [template] +// CHECK:STDOUT: %LessOrEquivalent.1: = struct_value () [template] +// CHECK:STDOUT: %Greater.type.1: type = fn_type @Greater.1 [template] +// CHECK:STDOUT: %Greater.1: = struct_value () [template] +// CHECK:STDOUT: %GreaterOrEquivalent.type.1: type = fn_type @GreaterOrEquivalent.1 [template] +// CHECK:STDOUT: %GreaterOrEquivalent.1: = struct_value () [template] +// CHECK:STDOUT: %Less.type.2: type = fn_type @Less.2 [template] +// CHECK:STDOUT: %Less.2: = struct_value () [template] +// CHECK:STDOUT: %LessOrEquivalent.type.2: type = fn_type @LessOrEquivalent.2 [template] +// CHECK:STDOUT: %LessOrEquivalent.2: = struct_value () [template] +// CHECK:STDOUT: %Greater.type.2: type = fn_type @Greater.2 [template] +// CHECK:STDOUT: %Greater.2: = struct_value () [template] +// CHECK:STDOUT: %GreaterOrEquivalent.type.2: type = fn_type @GreaterOrEquivalent.2 [template] +// CHECK:STDOUT: %GreaterOrEquivalent.2: = struct_value () [template] +// CHECK:STDOUT: %.4: = interface_witness (%Less.1, %LessOrEquivalent.1, %Greater.1, %GreaterOrEquivalent.1) [template] +// CHECK:STDOUT: %TestLess.type: type = fn_type @TestLess [template] +// CHECK:STDOUT: %TestLess: = struct_value () [template] // CHECK:STDOUT: %.5: type = ptr_type {} [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type @Ordered, Less [template] -// CHECK:STDOUT: %.7: = assoc_entity element0, file.%import_ref.17 [template] -// CHECK:STDOUT: %TestLessEqual: type = fn_type @TestLessEqual [template] -// CHECK:STDOUT: %struct.11: TestLessEqual = struct_value () [template] -// CHECK:STDOUT: %.8: type = assoc_entity_type @Ordered, LessOrEquivalent [template] -// CHECK:STDOUT: %.9: = assoc_entity element1, file.%import_ref.20 [template] -// CHECK:STDOUT: %TestGreater: type = fn_type @TestGreater [template] -// CHECK:STDOUT: %struct.12: TestGreater = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type @Ordered, Greater [template] -// CHECK:STDOUT: %.11: = assoc_entity element2, file.%import_ref.23 [template] -// CHECK:STDOUT: %TestGreaterEqual: type = fn_type @TestGreaterEqual [template] -// CHECK:STDOUT: %struct.13: TestGreaterEqual = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @Ordered, GreaterOrEquivalent [template] -// CHECK:STDOUT: %.13: = assoc_entity element3, file.%import_ref.26 [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type @Ordered, [template] +// CHECK:STDOUT: %.7: in Ordered> = assoc_entity element0, file.%import_ref.17 [template] +// CHECK:STDOUT: %TestLessEqual.type: type = fn_type @TestLessEqual [template] +// CHECK:STDOUT: %TestLessEqual: = struct_value () [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type @Ordered, [template] +// CHECK:STDOUT: %.9: in Ordered> = assoc_entity element1, file.%import_ref.20 [template] +// CHECK:STDOUT: %TestGreater.type: type = fn_type @TestGreater [template] +// CHECK:STDOUT: %TestGreater: = struct_value () [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type @Ordered, [template] +// CHECK:STDOUT: %.11: in Ordered> = assoc_entity element2, file.%import_ref.23 [template] +// CHECK:STDOUT: %TestGreaterEqual.type: type = fn_type @TestGreaterEqual [template] +// CHECK:STDOUT: %TestGreaterEqual: = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @Ordered, [template] +// CHECK:STDOUT: %.13: in Ordered> = assoc_entity element3, file.%import_ref.26 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -132,78 +132,78 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir6, inst+51, loaded [template = constants.%.2] -// CHECK:STDOUT: %import_ref.2: = import_ref ir6, inst+93, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.2: in Ordered> = import_ref ir6, inst+93, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.3 = import_ref ir6, inst+53, unloaded -// CHECK:STDOUT: %import_ref.4: = import_ref ir6, inst+133, loaded [template = constants.%.13] -// CHECK:STDOUT: %import_ref.5: = import_ref ir6, inst+73, loaded [template = constants.%.7] -// CHECK:STDOUT: %import_ref.6: = import_ref ir6, inst+113, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.7: Less = import_ref ir6, inst+69, loaded [template = constants.%struct.6] -// CHECK:STDOUT: %import_ref.8: LessOrEquivalent = import_ref ir6, inst+89, loaded [template = constants.%struct.7] -// CHECK:STDOUT: %import_ref.9: Greater = import_ref ir6, inst+109, loaded [template = constants.%struct.8] -// CHECK:STDOUT: %import_ref.10: GreaterOrEquivalent = import_ref ir6, inst+129, loaded [template = constants.%struct.9] +// CHECK:STDOUT: %import_ref.4: in Ordered> = import_ref ir6, inst+133, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.5: in Ordered> = import_ref ir6, inst+73, loaded [template = constants.%.7] +// CHECK:STDOUT: %import_ref.6: in Ordered> = import_ref ir6, inst+113, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.7: = import_ref ir6, inst+69, loaded [template = constants.%Less.2] +// CHECK:STDOUT: %import_ref.8: = import_ref ir6, inst+89, loaded [template = constants.%LessOrEquivalent.2] +// CHECK:STDOUT: %import_ref.9: = import_ref ir6, inst+109, loaded [template = constants.%Greater.2] +// CHECK:STDOUT: %import_ref.10: = import_ref ir6, inst+129, loaded [template = constants.%GreaterOrEquivalent.2] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %Ordered.ref: type = name_ref Ordered, %import_ref.1 [template = constants.%.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.11: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.12: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.13: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.14: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.15: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TestLess.decl: TestLess = fn_decl @TestLess [template = constants.%struct.10] { +// CHECK:STDOUT: %import_ref.11: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.12: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.13: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.14: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.15: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestLess.decl: = fn_decl @TestLess [template = constants.%TestLess] { // CHECK:STDOUT: %C.ref.loc13_16: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc13_13.1: C = param a // CHECK:STDOUT: @TestLess.%a: C = bind_name a, %a.loc13_13.1 // CHECK:STDOUT: %C.ref.loc13_22: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %b.loc13_19.1: C = param b // CHECK:STDOUT: @TestLess.%b: C = bind_name b, %b.loc13_19.1 -// CHECK:STDOUT: %bool.make_type.loc13: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc13: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc13_28.1: type = value_of_initializer %bool.make_type.loc13 [template = bool] // CHECK:STDOUT: %.loc13_28.2: type = converted %bool.make_type.loc13, %.loc13_28.1 [template = bool] // CHECK:STDOUT: @TestLess.%return: ref bool = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.16: type = import_ref ir6, inst+51, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.17 = import_ref ir6, inst+69, unloaded -// CHECK:STDOUT: %import_ref.18: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TestLessEqual.decl: TestLessEqual = fn_decl @TestLessEqual [template = constants.%struct.11] { +// CHECK:STDOUT: %import_ref.18: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestLessEqual.decl: = fn_decl @TestLessEqual [template = constants.%TestLessEqual] { // CHECK:STDOUT: %C.ref.loc17_21: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc17_18.1: C = param a // CHECK:STDOUT: @TestLessEqual.%a: C = bind_name a, %a.loc17_18.1 // CHECK:STDOUT: %C.ref.loc17_27: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %b.loc17_24.1: C = param b // CHECK:STDOUT: @TestLessEqual.%b: C = bind_name b, %b.loc17_24.1 -// CHECK:STDOUT: %bool.make_type.loc17: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc17: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc17_33.1: type = value_of_initializer %bool.make_type.loc17 [template = bool] // CHECK:STDOUT: %.loc17_33.2: type = converted %bool.make_type.loc17, %.loc17_33.1 [template = bool] // CHECK:STDOUT: @TestLessEqual.%return: ref bool = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.19: type = import_ref ir6, inst+51, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.20 = import_ref ir6, inst+89, unloaded -// CHECK:STDOUT: %import_ref.21: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TestGreater.decl: TestGreater = fn_decl @TestGreater [template = constants.%struct.12] { +// CHECK:STDOUT: %import_ref.21: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestGreater.decl: = fn_decl @TestGreater [template = constants.%TestGreater] { // CHECK:STDOUT: %C.ref.loc21_19: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc21_16.1: C = param a // CHECK:STDOUT: @TestGreater.%a: C = bind_name a, %a.loc21_16.1 // CHECK:STDOUT: %C.ref.loc21_25: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %b.loc21_22.1: C = param b // CHECK:STDOUT: @TestGreater.%b: C = bind_name b, %b.loc21_22.1 -// CHECK:STDOUT: %bool.make_type.loc21: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc21: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc21_31.1: type = value_of_initializer %bool.make_type.loc21 [template = bool] // CHECK:STDOUT: %.loc21_31.2: type = converted %bool.make_type.loc21, %.loc21_31.1 [template = bool] // CHECK:STDOUT: @TestGreater.%return: ref bool = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.22: type = import_ref ir6, inst+51, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.23 = import_ref ir6, inst+109, unloaded -// CHECK:STDOUT: %import_ref.24: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TestGreaterEqual.decl: TestGreaterEqual = fn_decl @TestGreaterEqual [template = constants.%struct.13] { +// CHECK:STDOUT: %import_ref.24: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestGreaterEqual.decl: = fn_decl @TestGreaterEqual [template = constants.%TestGreaterEqual] { // CHECK:STDOUT: %C.ref.loc25_24: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc25_21.1: C = param a // CHECK:STDOUT: @TestGreaterEqual.%a: C = bind_name a, %a.loc25_21.1 // CHECK:STDOUT: %C.ref.loc25_30: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %b.loc25_27.1: C = param b // CHECK:STDOUT: @TestGreaterEqual.%b: C = bind_name b, %b.loc25_27.1 -// CHECK:STDOUT: %bool.make_type.loc25: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc25: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc25_36.1: type = value_of_initializer %bool.make_type.loc25 [template = bool] // CHECK:STDOUT: %.loc25_36.2: type = converted %bool.make_type.loc25, %.loc25_36.1 [template = bool] // CHECK:STDOUT: @TestGreaterEqual.%return: ref bool = var @@ -223,50 +223,50 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: C as Ordered { -// CHECK:STDOUT: %Less.decl: Less = fn_decl @Less.1 [template = constants.%struct.2] { +// CHECK:STDOUT: %Less.decl: = fn_decl @Less.1 [template = constants.%Less.1] { // CHECK:STDOUT: %C.ref.loc7_17: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.loc7_11.1: C = param self // CHECK:STDOUT: %self.loc7_11.2: C = bind_name self, %self.loc7_11.1 // CHECK:STDOUT: %C.ref.loc7_27: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other.loc7_20.1: C = param other // CHECK:STDOUT: %other.loc7_20.2: C = bind_name other, %other.loc7_20.1 -// CHECK:STDOUT: %bool.make_type.loc7: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc7: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc7_33.1: type = value_of_initializer %bool.make_type.loc7 [template = bool] // CHECK:STDOUT: %.loc7_33.2: type = converted %bool.make_type.loc7, %.loc7_33.1 [template = bool] // CHECK:STDOUT: %return.var.loc7: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %LessOrEquivalent.decl: LessOrEquivalent = fn_decl @LessOrEquivalent.1 [template = constants.%struct.3] { +// CHECK:STDOUT: %LessOrEquivalent.decl: = fn_decl @LessOrEquivalent.1 [template = constants.%LessOrEquivalent.1] { // CHECK:STDOUT: %C.ref.loc8_29: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.loc8_23.1: C = param self // CHECK:STDOUT: %self.loc8_23.2: C = bind_name self, %self.loc8_23.1 // CHECK:STDOUT: %C.ref.loc8_39: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other.loc8_32.1: C = param other // CHECK:STDOUT: %other.loc8_32.2: C = bind_name other, %other.loc8_32.1 -// CHECK:STDOUT: %bool.make_type.loc8: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc8: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc8_45.1: type = value_of_initializer %bool.make_type.loc8 [template = bool] // CHECK:STDOUT: %.loc8_45.2: type = converted %bool.make_type.loc8, %.loc8_45.1 [template = bool] // CHECK:STDOUT: %return.var.loc8: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %Greater.decl: Greater = fn_decl @Greater.1 [template = constants.%struct.4] { +// CHECK:STDOUT: %Greater.decl: = fn_decl @Greater.1 [template = constants.%Greater.1] { // CHECK:STDOUT: %C.ref.loc9_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.loc9_14.1: C = param self // CHECK:STDOUT: %self.loc9_14.2: C = bind_name self, %self.loc9_14.1 // CHECK:STDOUT: %C.ref.loc9_30: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other.loc9_23.1: C = param other // CHECK:STDOUT: %other.loc9_23.2: C = bind_name other, %other.loc9_23.1 -// CHECK:STDOUT: %bool.make_type.loc9: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc9: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc9_36.1: type = value_of_initializer %bool.make_type.loc9 [template = bool] // CHECK:STDOUT: %.loc9_36.2: type = converted %bool.make_type.loc9, %.loc9_36.1 [template = bool] // CHECK:STDOUT: %return.var.loc9: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %GreaterOrEquivalent.decl: GreaterOrEquivalent = fn_decl @GreaterOrEquivalent.1 [template = constants.%struct.5] { +// CHECK:STDOUT: %GreaterOrEquivalent.decl: = fn_decl @GreaterOrEquivalent.1 [template = constants.%GreaterOrEquivalent.1] { // CHECK:STDOUT: %C.ref.loc10_32: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.loc10_26.1: C = param self // CHECK:STDOUT: %self.loc10_26.2: C = bind_name self, %self.loc10_26.1 // CHECK:STDOUT: %C.ref.loc10_42: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other.loc10_35.1: C = param other // CHECK:STDOUT: %other.loc10_35.2: C = bind_name other, %other.loc10_35.1 -// CHECK:STDOUT: %bool.make_type.loc10: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc10: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc10_48.1: type = value_of_initializer %bool.make_type.loc10 [template = bool] // CHECK:STDOUT: %.loc10_48.2: type = converted %bool.make_type.loc10, %.loc10_48.1 [template = bool] // CHECK:STDOUT: %return.var.loc10: ref bool = var @@ -308,7 +308,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: C = name_ref a, %a // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: Less = interface_witness_access @impl.%.1, element0 [template = constants.%struct.2] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element0 [template = constants.%Less.1] // CHECK:STDOUT: %.loc14_12: = bound_method %a.ref, %.1 // CHECK:STDOUT: %Less.call: init bool = call %.loc14_12(%a.ref, %b.ref) // CHECK:STDOUT: %.loc14_15.1: bool = value_of_initializer %Less.call @@ -320,7 +320,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: C = name_ref a, %a // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: LessOrEquivalent = interface_witness_access @impl.%.1, element1 [template = constants.%struct.3] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element1 [template = constants.%LessOrEquivalent.1] // CHECK:STDOUT: %.loc18_12: = bound_method %a.ref, %.1 // CHECK:STDOUT: %LessOrEquivalent.call: init bool = call %.loc18_12(%a.ref, %b.ref) // CHECK:STDOUT: %.loc18_16.1: bool = value_of_initializer %LessOrEquivalent.call @@ -332,7 +332,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: C = name_ref a, %a // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: Greater = interface_witness_access @impl.%.1, element2 [template = constants.%struct.4] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element2 [template = constants.%Greater.1] // CHECK:STDOUT: %.loc22_12: = bound_method %a.ref, %.1 // CHECK:STDOUT: %Greater.call: init bool = call %.loc22_12(%a.ref, %b.ref) // CHECK:STDOUT: %.loc22_15.1: bool = value_of_initializer %Greater.call @@ -344,7 +344,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: C = name_ref a, %a // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: GreaterOrEquivalent = interface_witness_access @impl.%.1, element3 [template = constants.%struct.5] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.%.1, element3 [template = constants.%GreaterOrEquivalent.1] // CHECK:STDOUT: %.loc26_12: = bound_method %a.ref, %.1 // CHECK:STDOUT: %GreaterOrEquivalent.call: init bool = call %.loc26_12(%a.ref, %b.ref) // CHECK:STDOUT: %.loc26_16.1: bool = value_of_initializer %GreaterOrEquivalent.call @@ -357,36 +357,36 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: constants { // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Bool = struct_value () [template] -// CHECK:STDOUT: %TestLess: type = fn_type @TestLess [template] -// CHECK:STDOUT: %struct.2: TestLess = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %TestLess.type: type = fn_type @TestLess [template] +// CHECK:STDOUT: %TestLess: = struct_value () [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] // CHECK:STDOUT: %.4: type = interface_type @Ordered [template] // CHECK:STDOUT: %Self: Ordered = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Less: type = fn_type @Less [template] -// CHECK:STDOUT: %struct.3: Less = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type @Ordered, Less [template] -// CHECK:STDOUT: %.6: = assoc_entity element0, file.%import_ref.12 [template] -// CHECK:STDOUT: %TestLessEqual: type = fn_type @TestLessEqual [template] -// CHECK:STDOUT: %struct.4: TestLessEqual = struct_value () [template] -// CHECK:STDOUT: %LessOrEquivalent: type = fn_type @LessOrEquivalent [template] -// CHECK:STDOUT: %struct.5: LessOrEquivalent = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type @Ordered, LessOrEquivalent [template] -// CHECK:STDOUT: %.8: = assoc_entity element1, file.%import_ref.15 [template] -// CHECK:STDOUT: %TestGreater: type = fn_type @TestGreater [template] -// CHECK:STDOUT: %struct.6: TestGreater = struct_value () [template] -// CHECK:STDOUT: %Greater: type = fn_type @Greater [template] -// CHECK:STDOUT: %struct.7: Greater = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type @Ordered, Greater [template] -// CHECK:STDOUT: %.10: = assoc_entity element2, file.%import_ref.18 [template] -// CHECK:STDOUT: %TestGreaterEqual: type = fn_type @TestGreaterEqual [template] -// CHECK:STDOUT: %struct.8: TestGreaterEqual = struct_value () [template] -// CHECK:STDOUT: %GreaterOrEquivalent: type = fn_type @GreaterOrEquivalent [template] -// CHECK:STDOUT: %struct.9: GreaterOrEquivalent = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type @Ordered, GreaterOrEquivalent [template] -// CHECK:STDOUT: %.12: = assoc_entity element3, file.%import_ref.21 [template] +// CHECK:STDOUT: %Less.type: type = fn_type @Less [template] +// CHECK:STDOUT: %Less: = struct_value () [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type @Ordered, [template] +// CHECK:STDOUT: %.6: in Ordered> = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %TestLessEqual.type: type = fn_type @TestLessEqual [template] +// CHECK:STDOUT: %TestLessEqual: = struct_value () [template] +// CHECK:STDOUT: %LessOrEquivalent.type: type = fn_type @LessOrEquivalent [template] +// CHECK:STDOUT: %LessOrEquivalent: = struct_value () [template] +// CHECK:STDOUT: %.7: type = assoc_entity_type @Ordered, [template] +// CHECK:STDOUT: %.8: in Ordered> = assoc_entity element1, file.%import_ref.15 [template] +// CHECK:STDOUT: %TestGreater.type: type = fn_type @TestGreater [template] +// CHECK:STDOUT: %TestGreater: = struct_value () [template] +// CHECK:STDOUT: %Greater.type: type = fn_type @Greater [template] +// CHECK:STDOUT: %Greater: = struct_value () [template] +// CHECK:STDOUT: %.9: type = assoc_entity_type @Ordered, [template] +// CHECK:STDOUT: %.10: in Ordered> = assoc_entity element2, file.%import_ref.18 [template] +// CHECK:STDOUT: %TestGreaterEqual.type: type = fn_type @TestGreaterEqual [template] +// CHECK:STDOUT: %TestGreaterEqual: = struct_value () [template] +// CHECK:STDOUT: %GreaterOrEquivalent.type: type = fn_type @GreaterOrEquivalent [template] +// CHECK:STDOUT: %GreaterOrEquivalent: = struct_value () [template] +// CHECK:STDOUT: %.11: type = assoc_entity_type @Ordered, [template] +// CHECK:STDOUT: %.12: in Ordered> = assoc_entity element3, file.%import_ref.21 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -400,69 +400,69 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} -// CHECK:STDOUT: %import_ref.1: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TestLess.decl: TestLess = fn_decl @TestLess [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestLess.decl: = fn_decl @TestLess [template = constants.%TestLess] { // CHECK:STDOUT: %D.ref.loc6_16: type = name_ref D, %D.decl [template = constants.%D] // CHECK:STDOUT: %a.loc6_13.1: D = param a // CHECK:STDOUT: @TestLess.%a: D = bind_name a, %a.loc6_13.1 // CHECK:STDOUT: %D.ref.loc6_22: type = name_ref D, %D.decl [template = constants.%D] // CHECK:STDOUT: %b.loc6_19.1: D = param b // CHECK:STDOUT: @TestLess.%b: D = bind_name b, %b.loc6_19.1 -// CHECK:STDOUT: %bool.make_type.loc6: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc6: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc6_28.1: type = value_of_initializer %bool.make_type.loc6 [template = bool] // CHECK:STDOUT: %.loc6_28.2: type = converted %bool.make_type.loc6, %.loc6_28.1 [template = bool] // CHECK:STDOUT: @TestLess.%return: ref bool = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.2: type = import_ref ir6, inst+51, loaded [template = constants.%.4] -// CHECK:STDOUT: %import_ref.3: = import_ref ir6, inst+93, loaded [template = constants.%.8] +// CHECK:STDOUT: %import_ref.3: in Ordered> = import_ref ir6, inst+93, loaded [template = constants.%.8] // CHECK:STDOUT: %import_ref.4 = import_ref ir6, inst+53, unloaded -// CHECK:STDOUT: %import_ref.5: = import_ref ir6, inst+133, loaded [template = constants.%.12] -// CHECK:STDOUT: %import_ref.6: = import_ref ir6, inst+73, loaded [template = constants.%.6] -// CHECK:STDOUT: %import_ref.7: = import_ref ir6, inst+113, loaded [template = constants.%.10] +// CHECK:STDOUT: %import_ref.5: in Ordered> = import_ref ir6, inst+133, loaded [template = constants.%.12] +// CHECK:STDOUT: %import_ref.6: in Ordered> = import_ref ir6, inst+73, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.7: in Ordered> = import_ref ir6, inst+113, loaded [template = constants.%.10] // CHECK:STDOUT: %import_ref.8 = import_ref ir6, inst+69, unloaded // CHECK:STDOUT: %import_ref.9 = import_ref ir6, inst+89, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref ir6, inst+109, unloaded // CHECK:STDOUT: %import_ref.11 = import_ref ir6, inst+129, unloaded // CHECK:STDOUT: %import_ref.12 = import_ref ir6, inst+69, unloaded -// CHECK:STDOUT: %import_ref.13: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TestLessEqual.decl: TestLessEqual = fn_decl @TestLessEqual [template = constants.%struct.4] { +// CHECK:STDOUT: %import_ref.13: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestLessEqual.decl: = fn_decl @TestLessEqual [template = constants.%TestLessEqual] { // CHECK:STDOUT: %D.ref.loc14_21: type = name_ref D, %D.decl [template = constants.%D] // CHECK:STDOUT: %a.loc14_18.1: D = param a // CHECK:STDOUT: @TestLessEqual.%a: D = bind_name a, %a.loc14_18.1 // CHECK:STDOUT: %D.ref.loc14_27: type = name_ref D, %D.decl [template = constants.%D] // CHECK:STDOUT: %b.loc14_24.1: D = param b // CHECK:STDOUT: @TestLessEqual.%b: D = bind_name b, %b.loc14_24.1 -// CHECK:STDOUT: %bool.make_type.loc14: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc14: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc14_33.1: type = value_of_initializer %bool.make_type.loc14 [template = bool] // CHECK:STDOUT: %.loc14_33.2: type = converted %bool.make_type.loc14, %.loc14_33.1 [template = bool] // CHECK:STDOUT: @TestLessEqual.%return: ref bool = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.14: type = import_ref ir6, inst+51, loaded [template = constants.%.4] // CHECK:STDOUT: %import_ref.15 = import_ref ir6, inst+89, unloaded -// CHECK:STDOUT: %import_ref.16: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TestGreater.decl: TestGreater = fn_decl @TestGreater [template = constants.%struct.6] { +// CHECK:STDOUT: %import_ref.16: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestGreater.decl: = fn_decl @TestGreater [template = constants.%TestGreater] { // CHECK:STDOUT: %D.ref.loc22_19: type = name_ref D, %D.decl [template = constants.%D] // CHECK:STDOUT: %a.loc22_16.1: D = param a // CHECK:STDOUT: @TestGreater.%a: D = bind_name a, %a.loc22_16.1 // CHECK:STDOUT: %D.ref.loc22_25: type = name_ref D, %D.decl [template = constants.%D] // CHECK:STDOUT: %b.loc22_22.1: D = param b // CHECK:STDOUT: @TestGreater.%b: D = bind_name b, %b.loc22_22.1 -// CHECK:STDOUT: %bool.make_type.loc22: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc22: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc22_31.1: type = value_of_initializer %bool.make_type.loc22 [template = bool] // CHECK:STDOUT: %.loc22_31.2: type = converted %bool.make_type.loc22, %.loc22_31.1 [template = bool] // CHECK:STDOUT: @TestGreater.%return: ref bool = var // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.17: type = import_ref ir6, inst+51, loaded [template = constants.%.4] // CHECK:STDOUT: %import_ref.18 = import_ref ir6, inst+109, unloaded -// CHECK:STDOUT: %import_ref.19: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %TestGreaterEqual.decl: TestGreaterEqual = fn_decl @TestGreaterEqual [template = constants.%struct.8] { +// CHECK:STDOUT: %import_ref.19: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %TestGreaterEqual.decl: = fn_decl @TestGreaterEqual [template = constants.%TestGreaterEqual] { // CHECK:STDOUT: %D.ref.loc30_24: type = name_ref D, %D.decl [template = constants.%D] // CHECK:STDOUT: %a.loc30_21.1: D = param a // CHECK:STDOUT: @TestGreaterEqual.%a: D = bind_name a, %a.loc30_21.1 // CHECK:STDOUT: %D.ref.loc30_30: type = name_ref D, %D.decl [template = constants.%D] // CHECK:STDOUT: %b.loc30_27.1: D = param b // CHECK:STDOUT: @TestGreaterEqual.%b: D = bind_name b, %b.loc30_27.1 -// CHECK:STDOUT: %bool.make_type.loc30: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %bool.make_type.loc30: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc30_36.1: type = value_of_initializer %bool.make_type.loc30 [template = bool] // CHECK:STDOUT: %.loc30_36.2: type = converted %bool.make_type.loc30, %.loc30_36.1 [template = bool] // CHECK:STDOUT: @TestGreaterEqual.%return: ref bool = var diff --git a/toolchain/check/testdata/operators/overloaded/right_shift.carbon b/toolchain/check/testdata/operators/overloaded/right_shift.carbon index 035ff7886bc2..72e648671847 100644 --- a/toolchain/check/testdata/operators/overloaded/right_shift.carbon +++ b/toolchain/check/testdata/operators/overloaded/right_shift.carbon @@ -38,31 +38,31 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @RightShift [template] // CHECK:STDOUT: %Self.1: RightShift = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Op.1: type = fn_type @Op.1 [template] +// CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Op = struct_value () [template] -// CHECK:STDOUT: %Op.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %struct.2: Op = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%struct.1) [template] +// CHECK:STDOUT: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] +// CHECK:STDOUT: %Op.2: = struct_value () [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %.5: type = ptr_type {} [template] -// CHECK:STDOUT: %struct.3: C = struct_value () [template] +// CHECK:STDOUT: %struct: C = struct_value () [template] // CHECK:STDOUT: %.6: type = interface_type @RightShiftAssign [template] // CHECK:STDOUT: %Self.2: RightShiftAssign = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.7: type = ptr_type C [template] -// CHECK:STDOUT: %Op.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %struct.4: Op = struct_value () [template] +// CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] +// CHECK:STDOUT: %Op.3: = struct_value () [template] // CHECK:STDOUT: %.8: type = ptr_type Self [symbolic] -// CHECK:STDOUT: %Op.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %struct.5: Op = struct_value () [template] -// CHECK:STDOUT: %.9: = interface_witness (%struct.4) [template] -// CHECK:STDOUT: %TestOp: type = fn_type @TestOp [template] -// CHECK:STDOUT: %struct.6: TestOp = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type @RightShift, Op [template] -// CHECK:STDOUT: %.11: = assoc_entity element0, file.%import_ref.10 [template] -// CHECK:STDOUT: %TestAssign: type = fn_type @TestAssign [template] -// CHECK:STDOUT: %struct.7: TestAssign = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @RightShiftAssign, Op [template] -// CHECK:STDOUT: %.13: = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] +// CHECK:STDOUT: %Op.4: = struct_value () [template] +// CHECK:STDOUT: %.9: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] +// CHECK:STDOUT: %TestOp: = struct_value () [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type @RightShift, [template] +// CHECK:STDOUT: %.11: in RightShift> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] +// CHECK:STDOUT: %TestAssign: = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @RightShiftAssign, [template] +// CHECK:STDOUT: %.13: in RightShiftAssign> = assoc_entity element0, file.%import_ref.12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,8 +76,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir5, inst+209, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir5, inst+211, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref ir5, inst+231, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.4: Op = import_ref ir5, inst+227, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.3: in RightShift> = import_ref ir5, inst+231, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.4: = import_ref ir5, inst+227, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc17: = name_ref Core, %Core [template = %Core] @@ -85,14 +85,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir5, inst+233, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.6 = import_ref ir5, inst+235, unloaded -// CHECK:STDOUT: %import_ref.7: = import_ref ir5, inst+254, loaded [template = constants.%.13] -// CHECK:STDOUT: %import_ref.8: Op = import_ref ir5, inst+250, loaded [template = constants.%struct.5] +// CHECK:STDOUT: %import_ref.7: in RightShiftAssign> = import_ref ir5, inst+254, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.8: = import_ref ir5, inst+250, loaded [template = constants.%Op.4] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc22: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %RightShiftAssign.ref: type = name_ref RightShiftAssign, %import_ref.5 [template = constants.%.6] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: TestOp = fn_decl @TestOp [template = constants.%struct.6] { +// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc26_11.1: C = param a // CHECK:STDOUT: @TestOp.%a: C = bind_name a, %a.loc26_11.1 @@ -104,7 +104,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.9: type = import_ref ir5, inst+209, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.10 = import_ref ir5, inst+227, unloaded -// CHECK:STDOUT: %TestAssign.decl: TestAssign = fn_decl @TestAssign [template = constants.%struct.7] { +// CHECK:STDOUT: %TestAssign.decl: = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc30: type = ptr_type C [template = constants.%.7] // CHECK:STDOUT: %a.loc30_15.1: C* = param a @@ -132,7 +132,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: C as RightShift { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.loc18_9.1: C = param self // CHECK:STDOUT: %self.loc18_9.2: C = bind_name self, %self.loc18_9.1 @@ -150,7 +150,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: C as RightShiftAssign { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.3 [template = constants.%struct.4] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc23_21: type = ptr_type C [template = constants.%.7] // CHECK:STDOUT: %self.loc23_14.1: C* = param self @@ -175,8 +175,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: C](@impl.1.%other.loc18_18.2: C) -> @impl.1.%return.var: C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc19_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_14 to @impl.1.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: @@ -193,7 +193,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: C = name_ref a, %a // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.1.%.1, element0 [template = constants.%struct.1] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 // CHECK:STDOUT: %.loc26: ref C = splice_block %return {} // CHECK:STDOUT: %Op.call: init C = call %.loc27(%a.ref, %b.ref) to %.loc26 @@ -205,7 +205,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: C* = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref C = deref %a.ref // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.2.%.1, element0 [template = constants.%struct.4] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 // CHECK:STDOUT: %.loc31_3.2: C* = addr_of %.loc31_3.1 // CHECK:STDOUT: %Op.call: init () = call %.loc31_6(%.loc31_3.2, %b.ref) diff --git a/toolchain/check/testdata/operators/overloaded/sub.carbon b/toolchain/check/testdata/operators/overloaded/sub.carbon index cb6daea60f80..84e34e5f1c8a 100644 --- a/toolchain/check/testdata/operators/overloaded/sub.carbon +++ b/toolchain/check/testdata/operators/overloaded/sub.carbon @@ -38,31 +38,31 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %.1: type = struct_type {} [template] // CHECK:STDOUT: %.2: type = interface_type @Sub [template] // CHECK:STDOUT: %Self.1: Sub = bind_symbolic_name Self 0 [symbolic] -// CHECK:STDOUT: %Op.1: type = fn_type @Op.1 [template] +// CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %.3: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Op = struct_value () [template] -// CHECK:STDOUT: %Op.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %struct.2: Op = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%struct.1) [template] +// CHECK:STDOUT: %Op.1: = struct_value () [template] +// CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] +// CHECK:STDOUT: %Op.2: = struct_value () [template] +// CHECK:STDOUT: %.4: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %.5: type = ptr_type {} [template] -// CHECK:STDOUT: %struct.3: C = struct_value () [template] +// CHECK:STDOUT: %struct: C = struct_value () [template] // CHECK:STDOUT: %.6: type = interface_type @SubAssign [template] // CHECK:STDOUT: %Self.2: SubAssign = bind_symbolic_name Self 0 [symbolic] // CHECK:STDOUT: %.7: type = ptr_type C [template] -// CHECK:STDOUT: %Op.3: type = fn_type @Op.3 [template] -// CHECK:STDOUT: %struct.4: Op = struct_value () [template] +// CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] +// CHECK:STDOUT: %Op.3: = struct_value () [template] // CHECK:STDOUT: %.8: type = ptr_type Self [symbolic] -// CHECK:STDOUT: %Op.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %struct.5: Op = struct_value () [template] -// CHECK:STDOUT: %.9: = interface_witness (%struct.4) [template] -// CHECK:STDOUT: %TestOp: type = fn_type @TestOp [template] -// CHECK:STDOUT: %struct.6: TestOp = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type @Sub, Op [template] -// CHECK:STDOUT: %.11: = assoc_entity element0, file.%import_ref.10 [template] -// CHECK:STDOUT: %TestAssign: type = fn_type @TestAssign [template] -// CHECK:STDOUT: %struct.7: TestAssign = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type @SubAssign, Op [template] -// CHECK:STDOUT: %.13: = assoc_entity element0, file.%import_ref.12 [template] +// CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] +// CHECK:STDOUT: %Op.4: = struct_value () [template] +// CHECK:STDOUT: %.9: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] +// CHECK:STDOUT: %TestOp: = struct_value () [template] +// CHECK:STDOUT: %.10: type = assoc_entity_type @Sub, [template] +// CHECK:STDOUT: %.11: in Sub> = assoc_entity element0, file.%import_ref.10 [template] +// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] +// CHECK:STDOUT: %TestAssign: = struct_value () [template] +// CHECK:STDOUT: %.12: type = assoc_entity_type @SubAssign, [template] +// CHECK:STDOUT: %.13: in SubAssign> = assoc_entity element0, file.%import_ref.12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,8 +76,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %import_ref.1: type = import_ref ir4, inst+86, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.2 = import_ref ir4, inst+88, unloaded -// CHECK:STDOUT: %import_ref.3: = import_ref ir4, inst+108, loaded [template = constants.%.11] -// CHECK:STDOUT: %import_ref.4: Op = import_ref ir4, inst+104, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.3: in Sub> = import_ref ir4, inst+108, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.4: = import_ref ir4, inst+104, loaded [template = constants.%Op.2] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc17: = name_ref Core, %Core [template = %Core] @@ -85,14 +85,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: type = import_ref ir4, inst+110, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.6 = import_ref ir4, inst+112, unloaded -// CHECK:STDOUT: %import_ref.7: = import_ref ir4, inst+131, loaded [template = constants.%.13] -// CHECK:STDOUT: %import_ref.8: Op = import_ref ir4, inst+127, loaded [template = constants.%struct.5] +// CHECK:STDOUT: %import_ref.7: in SubAssign> = import_ref ir4, inst+131, loaded [template = constants.%.13] +// CHECK:STDOUT: %import_ref.8: = import_ref ir4, inst+127, loaded [template = constants.%Op.4] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref.loc22: = name_ref Core, %Core [template = %Core] // CHECK:STDOUT: %SubAssign.ref: type = name_ref SubAssign, %import_ref.5 [template = constants.%.6] // CHECK:STDOUT: } -// CHECK:STDOUT: %TestOp.decl: TestOp = fn_decl @TestOp [template = constants.%struct.6] { +// CHECK:STDOUT: %TestOp.decl: = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc26_11.1: C = param a // CHECK:STDOUT: @TestOp.%a: C = bind_name a, %a.loc26_11.1 @@ -104,7 +104,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.9: type = import_ref ir4, inst+86, loaded [template = constants.%.2] // CHECK:STDOUT: %import_ref.10 = import_ref ir4, inst+104, unloaded -// CHECK:STDOUT: %TestAssign.decl: TestAssign = fn_decl @TestAssign [template = constants.%struct.7] { +// CHECK:STDOUT: %TestAssign.decl: = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc30: type = ptr_type C [template = constants.%.7] // CHECK:STDOUT: %a.loc30_15.1: C* = param a @@ -132,7 +132,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: C as Sub { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.1 [template = constants.%struct.1] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.loc18_9.1: C = param self // CHECK:STDOUT: %self.loc18_9.2: C = bind_name self, %self.loc18_9.1 @@ -150,7 +150,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: C as SubAssign { -// CHECK:STDOUT: %Op.decl: Op = fn_decl @Op.3 [template = constants.%struct.4] { +// CHECK:STDOUT: %Op.decl: = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc23_21: type = ptr_type C [template = constants.%.7] // CHECK:STDOUT: %self.loc23_14.1: C* = param self @@ -175,8 +175,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn @Op.1[@impl.1.%self.loc18_9.2: C](@impl.1.%other.loc18_18.2: C) -> @impl.1.%return.var: C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc19_13.1: {} = struct_literal () -// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc19_13.2: init C = class_init (), @impl.1.%return.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_14: init C = converted %.loc19_13.1, %.loc19_13.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc19_14 to @impl.1.%return.var // CHECK:STDOUT: } // CHECK:STDOUT: @@ -193,7 +193,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: C = name_ref a, %a // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.1.%.1, element0 [template = constants.%struct.1] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 // CHECK:STDOUT: %.loc26: ref C = splice_block %return {} // CHECK:STDOUT: %Op.call: init C = call %.loc27(%a.ref, %b.ref) to %.loc26 @@ -205,7 +205,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: C* = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref C = deref %a.ref // CHECK:STDOUT: %b.ref: C = name_ref b, %b -// CHECK:STDOUT: %.1: Op = interface_witness_access @impl.2.%.1, element0 [template = constants.%struct.4] +// CHECK:STDOUT: %.1: = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 // CHECK:STDOUT: %.loc31_3.2: C* = addr_of %.loc31_3.1 // CHECK:STDOUT: %Op.call: init () = call %.loc31_6(%.loc31_3.2, %b.ref) diff --git a/toolchain/check/testdata/package_expr/fail_not_found.carbon b/toolchain/check/testdata/package_expr/fail_not_found.carbon index 3e21dd851341..e9b82619bfd2 100644 --- a/toolchain/check/testdata/package_expr/fail_not_found.carbon +++ b/toolchain/check/testdata/package_expr/fail_not_found.carbon @@ -18,11 +18,11 @@ fn Main() { // CHECK:STDOUT: --- fail_not_found.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Main: type = fn_type @Main [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Main = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] +// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -31,13 +31,13 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc15_10.2: type = converted %int.make_type_32, %.loc15_10.1 [template = i32] // CHECK:STDOUT: %y.var: ref i32 = var y diff --git a/toolchain/check/testdata/package_expr/syntax.carbon b/toolchain/check/testdata/package_expr/syntax.carbon index 0fcae096706d..27dc253cf57c 100644 --- a/toolchain/check/testdata/package_expr/syntax.carbon +++ b/toolchain/check/testdata/package_expr/syntax.carbon @@ -44,9 +44,9 @@ fn Main() { // CHECK:STDOUT: --- global.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -57,14 +57,14 @@ fn Main() { // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_8.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_8.2: type = converted %int.make_type_32.loc4, %.loc4_8.1 [template = i32] // CHECK:STDOUT: %x.var: ref i32 = var x // CHECK:STDOUT: %x: ref i32 = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_8.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_8.2: type = converted %int.make_type_32.loc5, %.loc5_8.1 [template = i32] // CHECK:STDOUT: %y.var: ref i32 = var y @@ -87,12 +87,12 @@ fn Main() { // CHECK:STDOUT: --- inside_fn.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.2: Main = struct_value () [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -103,29 +103,29 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_8.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_8.2: type = converted %int.make_type_32, %.loc4_8.1 [template = i32] // CHECK:STDOUT: %x.var: ref i32 = var x // CHECK:STDOUT: %x: ref i32 = bind_name x, %x.var -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.2] {} -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_10.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_10.2: type = converted %int.make_type_32.loc7, %.loc7_10.1 [template = i32] // CHECK:STDOUT: %x.var: ref i32 = var x // CHECK:STDOUT: %x: ref i32 = bind_name x, %x.var // CHECK:STDOUT: %.loc7_16: i32 = int_literal 1 [template = constants.%.3] // CHECK:STDOUT: assign %x.var, %.loc7_16 -// CHECK:STDOUT: %int.make_type_32.loc9: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_10.1: type = value_of_initializer %int.make_type_32.loc9 [template = i32] // CHECK:STDOUT: %.loc9_10.2: type = converted %int.make_type_32.loc9, %.loc9_10.1 [template = i32] // CHECK:STDOUT: %y.var: ref i32 = var y @@ -148,12 +148,12 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %Foo: type = fn_type @Foo [template] +// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Foo = struct_value () [template] +// CHECK:STDOUT: %Foo: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.2: Main = struct_value () [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -167,11 +167,11 @@ fn Main() { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.2] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %Foo.decl: Foo = fn_decl @Foo [template = constants.%struct.1] {} +// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -188,7 +188,7 @@ fn Main() { // CHECK:STDOUT: %package.ref: = name_ref package, package [template = package] // CHECK:STDOUT: %NS.ref: = name_ref NS, file.%NS [template = file.%NS] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %Foo.ref: Foo = name_ref Foo, @C.%Foo.decl [template = constants.%struct.1] +// CHECK:STDOUT: %Foo.ref: = name_ref Foo, @C.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %Foo.call: init () = call %Foo.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon b/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon index 391532538d10..faad0127b278 100644 --- a/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon +++ b/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon @@ -42,9 +42,9 @@ import library "var"; // CHECK:STDOUT: --- fn.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Foo: type = fn_type @Foo [template] +// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Foo = struct_value () [template] +// CHECK:STDOUT: %Foo: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -53,7 +53,7 @@ import library "var"; // CHECK:STDOUT: .Foo = %Foo.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Foo.decl: Foo = fn_decl @Foo [template = constants.%struct] {} +// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo(); @@ -61,9 +61,9 @@ import library "var"; // CHECK:STDOUT: --- var.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -72,8 +72,8 @@ import library "var"; // CHECK:STDOUT: .Foo = %Foo // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_10.2: type = converted %int.make_type_32, %.loc4_10.1 [template = i32] // CHECK:STDOUT: %Foo.var: ref i32 = var Foo diff --git a/toolchain/check/testdata/packages/fail_import_type_error.carbon b/toolchain/check/testdata/packages/fail_import_type_error.carbon index deef4a37c107..c1d006d67d21 100644 --- a/toolchain/check/testdata/packages/fail_import_type_error.carbon +++ b/toolchain/check/testdata/packages/fail_import_type_error.carbon @@ -74,9 +74,9 @@ var d: i32 = d_ref; // CHECK:STDOUT: --- implicit.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -96,26 +96,26 @@ var d: i32 = d_ref; // CHECK:STDOUT: %import_ref.3: ref = import_ref ir0, inst+13, loaded // CHECK:STDOUT: %import_ref.4: ref = import_ref ir0, inst+17, loaded // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32] // CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_32.loc6, %.loc6_8.1 [template = i32] // CHECK:STDOUT: %a.var: ref i32 = var a // CHECK:STDOUT: %a: ref i32 = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] // CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_32.loc7, %.loc7_8.1 [template = i32] // CHECK:STDOUT: %b.var: ref i32 = var b // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32] // CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_32.loc8, %.loc8_8.1 [template = i32] // CHECK:STDOUT: %c.var: ref i32 = var c // CHECK:STDOUT: %c: ref i32 = bind_name c, %c.var -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc9: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_32.loc9 [template = i32] // CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_32.loc9, %.loc9_8.1 [template = i32] // CHECK:STDOUT: %d.var: ref i32 = var d diff --git a/toolchain/check/testdata/packages/loaded_global.carbon b/toolchain/check/testdata/packages/loaded_global.carbon index 685ad2da0b70..c1a7bd5ee795 100644 --- a/toolchain/check/testdata/packages/loaded_global.carbon +++ b/toolchain/check/testdata/packages/loaded_global.carbon @@ -41,9 +41,9 @@ var package_b: () = package.B(); // CHECK:STDOUT: --- implicit.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -52,7 +52,7 @@ var package_b: () = package.B(); // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); @@ -61,8 +61,8 @@ var package_b: () = package.B(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %A: type = fn_type @A [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -72,7 +72,7 @@ var package_b: () = package.B(); // CHECK:STDOUT: .a = %a // CHECK:STDOUT: .package_a = %package_a // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: A = import_ref ir0, inst+2, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref: = import_ref ir0, inst+2, loaded [template = constants.%A] // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %.loc4_9.1: () = tuple_literal () // CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%.1 [template = constants.%.1] @@ -88,11 +88,11 @@ var package_b: () = package.B(); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref.loc4: A = name_ref A, file.%import_ref [template = constants.%struct] +// CHECK:STDOUT: %A.ref.loc4: = name_ref A, file.%import_ref [template = constants.%A] // CHECK:STDOUT: %A.call.loc4: init () = call %A.ref.loc4() // CHECK:STDOUT: assign file.%a.var, %A.call.loc4 // CHECK:STDOUT: %package.ref: = name_ref package, package [template = package] -// CHECK:STDOUT: %A.ref.loc6: A = name_ref A, file.%import_ref [template = constants.%struct] +// CHECK:STDOUT: %A.ref.loc6: = name_ref A, file.%import_ref [template = constants.%A] // CHECK:STDOUT: %A.call.loc6: init () = call %A.ref.loc6() // CHECK:STDOUT: assign file.%package_a.var, %A.call.loc6 // CHECK:STDOUT: return @@ -101,9 +101,9 @@ var package_b: () = package.B(); // CHECK:STDOUT: --- same_package.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %B: type = fn_type @B [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: B = struct_value () [template] +// CHECK:STDOUT: %B: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -112,7 +112,7 @@ var package_b: () = package.B(); // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %B.decl: B = fn_decl @B [template = constants.%struct] {} +// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @B(); @@ -121,8 +121,8 @@ var package_b: () = package.B(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %B: type = fn_type @B [template] -// CHECK:STDOUT: %struct: B = struct_value () [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] +// CHECK:STDOUT: %B: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -132,7 +132,7 @@ var package_b: () = package.B(); // CHECK:STDOUT: .b = %b // CHECK:STDOUT: .package_b = %package_b // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: B = import_ref ir1, inst+2, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref: = import_ref ir1, inst+2, loaded [template = constants.%B] // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %.loc6_9.1: () = tuple_literal () // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1] @@ -148,11 +148,11 @@ var package_b: () = package.B(); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %B.ref.loc6: B = name_ref B, file.%import_ref [template = constants.%struct] +// CHECK:STDOUT: %B.ref.loc6: = name_ref B, file.%import_ref [template = constants.%B] // CHECK:STDOUT: %B.call.loc6: init () = call %B.ref.loc6() // CHECK:STDOUT: assign file.%b.var, %B.call.loc6 // CHECK:STDOUT: %package.ref: = name_ref package, package [template = package] -// CHECK:STDOUT: %B.ref.loc8: B = name_ref B, file.%import_ref [template = constants.%struct] +// CHECK:STDOUT: %B.ref.loc8: = name_ref B, file.%import_ref [template = constants.%B] // CHECK:STDOUT: %B.call.loc8: init () = call %B.ref.loc8() // CHECK:STDOUT: assign file.%package_b.var, %B.call.loc8 // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/packages/no_prelude/cross_package_export.carbon b/toolchain/check/testdata/packages/no_prelude/cross_package_export.carbon index 02cf4277a085..d1969b1caf06 100644 --- a/toolchain/check/testdata/packages/no_prelude/cross_package_export.carbon +++ b/toolchain/check/testdata/packages/no_prelude/cross_package_export.carbon @@ -230,16 +230,16 @@ alias C = Other.C; // CHECK:STDOUT: --- conflict.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %C: type = fn_type @C [template] +// CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %C: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %C.decl: C = fn_decl @C [template = constants.%struct] {} +// CHECK:STDOUT: %C.decl: = fn_decl @C [template = constants.%C] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @C() { @@ -682,9 +682,9 @@ alias C = Other.C; // CHECK:STDOUT: --- fail_conflict_on_export_import.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %C: type = fn_type @C [template] +// CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: C = struct_value () [template] +// CHECK:STDOUT: %C: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -694,10 +694,10 @@ alias C = Other.C; // CHECK:STDOUT: } // CHECK:STDOUT: %Other: = namespace [template] {} // CHECK:STDOUT: %Other.ref: = name_ref Other, %Other [template = %Other] -// CHECK:STDOUT: %import_ref.1: C = import_ref ir2, inst+1, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref.1: = import_ref ir2, inst+1, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.2 = import_ref ir3, inst+1, unloaded -// CHECK:STDOUT: %C.ref: C = name_ref C, %import_ref.1 [template = constants.%struct] -// CHECK:STDOUT: %C: C = bind_alias C, %import_ref.1 [template = constants.%struct] +// CHECK:STDOUT: %C.ref: = name_ref C, %import_ref.1 [template = constants.%C] +// CHECK:STDOUT: %C: = bind_alias C, %import_ref.1 [template = constants.%C] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @C(); diff --git a/toolchain/check/testdata/packages/no_prelude/cross_package_import.carbon b/toolchain/check/testdata/packages/no_prelude/cross_package_import.carbon index 94ce6aeb1e4e..701ba9cebe27 100644 --- a/toolchain/check/testdata/packages/no_prelude/cross_package_import.carbon +++ b/toolchain/check/testdata/packages/no_prelude/cross_package_import.carbon @@ -221,16 +221,16 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: --- other_fn.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -241,16 +241,16 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: --- other_fn_extern.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: extern fn @F(); @@ -259,15 +259,15 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %.loc4_10.1: () = tuple_literal () // CHECK:STDOUT: %.loc4_10.2: type = converted %.loc4_10.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %x.loc4_6.1: () = param x @@ -283,16 +283,16 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: --- other_fn2.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F2: type = fn_type @F2 [template] +// CHECK:STDOUT: %F2.type: type = fn_type @F2 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F2 = struct_value () [template] +// CHECK:STDOUT: %F2: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .F2 = %F2.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F2.decl: F2 = fn_decl @F2 [template = constants.%struct] {} +// CHECK:STDOUT: %F2.decl: = fn_decl @F2 [template = constants.%F2] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F2() { @@ -303,11 +303,11 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: --- other_fn_use.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %G: type = fn_type @G [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: G = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -315,13 +315,13 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: .F = %import_ref // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: F = import_ref ir1, inst+1, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.1] {} +// CHECK:STDOUT: %import_ref: = import_ref ir1, inst+1, loaded [template = constants.%F] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%import_ref [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref [template = constants.%F] // CHECK:STDOUT: %F.call: init () = call %F.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -340,13 +340,13 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: --- main_use_other.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Run: type = fn_type @Run [template] +// CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Run = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %F2: type = fn_type @F2 [template] -// CHECK:STDOUT: %struct.3: F2 = struct_value () [template] +// CHECK:STDOUT: %Run: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %F2.type: type = fn_type @F2 [template] +// CHECK:STDOUT: %F2: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -355,18 +355,18 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Other: = namespace [template] {} -// CHECK:STDOUT: %Run.decl: Run = fn_decl @Run [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref.1: F = import_ref ir1, inst+1, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.2: F2 = import_ref ir2, inst+1, loaded [template = constants.%struct.3] +// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} +// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+1, loaded [template = constants.%F] +// CHECK:STDOUT: %import_ref.2: = import_ref ir2, inst+1, loaded [template = constants.%F2] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Other.ref.loc8: = name_ref Other, file.%Other [template = file.%Other] -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%import_ref.1 [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref.1 [template = constants.%F] // CHECK:STDOUT: %F.call: init () = call %F.ref() // CHECK:STDOUT: %Other.ref.loc9: = name_ref Other, file.%Other [template = file.%Other] -// CHECK:STDOUT: %F2.ref: F2 = name_ref F2, file.%import_ref.2 [template = constants.%struct.3] +// CHECK:STDOUT: %F2.ref: = name_ref F2, file.%import_ref.2 [template = constants.%F2] // CHECK:STDOUT: %F2.call: init () = call %F2.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -378,11 +378,11 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: --- fail_todo_main_use_other_extern.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Run: type = fn_type @Run [template] +// CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Run = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %Run: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -391,15 +391,15 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Other: = namespace [template] {} -// CHECK:STDOUT: %Run.decl: Run = fn_decl @Run [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref.1: F = import_ref ir1, inst+1, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} +// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+1, loaded [template = constants.%F] // CHECK:STDOUT: %import_ref.2 = import_ref ir2, inst+1, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Other.ref: = name_ref Other, file.%Other [template = file.%Other] -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%import_ref.1 [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref.1 [template = constants.%F] // CHECK:STDOUT: %F.call: init () = call %F.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -418,11 +418,11 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: --- fail_main_use_other_ambiguous.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Run: type = fn_type @Run [template] +// CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Run = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %Run: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -431,15 +431,15 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Other: = namespace [template] {} -// CHECK:STDOUT: %Run.decl: Run = fn_decl @Run [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref.1: F = import_ref ir1, inst+1, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %Run.decl: = fn_decl @Run [template = constants.%Run] {} +// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+1, loaded [template = constants.%F] // CHECK:STDOUT: %import_ref.2 = import_ref ir2, inst+6, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Other.ref: = name_ref Other, file.%Other [template = file.%Other] -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%import_ref.1 [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%import_ref.1 [template = constants.%F] // CHECK:STDOUT: %F.call: init () = call %F.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -449,9 +449,9 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: --- fail_main_namespace_conflict.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -460,8 +460,8 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+1, loaded // CHECK:STDOUT: %Other: = namespace %import_ref.1, [template] {} -// CHECK:STDOUT: %import_ref.2: F = import_ref ir2, inst+1, loaded [template = constants.%struct] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] {} +// CHECK:STDOUT: %import_ref.2: = import_ref ir2, inst+1, loaded [template = constants.%F] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -472,9 +472,9 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: --- fail_main_reopen_other.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %G: type = fn_type @G [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: G = struct_value () [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -485,7 +485,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %.loc13: = namespace [template] {} -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct] {} +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { @@ -496,9 +496,9 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: --- fail_main_reopen_other_nested.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -511,7 +511,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: %Nested: = namespace [template] { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -522,9 +522,9 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: --- fail_main_add_to_other.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %G: type = fn_type @G [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: G = struct_value () [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -534,7 +534,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: %Other: = namespace [template] { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct] {} +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { @@ -545,9 +545,9 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: --- fail_use_other_fn_use.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %UseF: type = fn_type @UseF [template] +// CHECK:STDOUT: %UseF.type: type = fn_type @UseF [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: UseF = struct_value () [template] +// CHECK:STDOUT: %UseF: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -556,7 +556,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: .UseF = %UseF.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Other: = namespace [template] {} -// CHECK:STDOUT: %UseF.decl: UseF = fn_decl @UseF [template = constants.%struct] {} +// CHECK:STDOUT: %UseF.decl: = fn_decl @UseF [template = constants.%UseF] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @UseF() { diff --git a/toolchain/check/testdata/packages/no_prelude/fail_export_name_params.carbon b/toolchain/check/testdata/packages/no_prelude/fail_export_name_params.carbon index 49160b393649..95c197804f97 100644 --- a/toolchain/check/testdata/packages/no_prelude/fail_export_name_params.carbon +++ b/toolchain/check/testdata/packages/no_prelude/fail_export_name_params.carbon @@ -32,12 +32,12 @@ export C2(T:! type); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] -// CHECK:STDOUT: %C1.1: type = generic_class_type @C1 [template] +// CHECK:STDOUT: %C1.type: type = generic_class_type @C1 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: C1 = struct_value () [template] +// CHECK:STDOUT: %C1.1: = struct_value () [template] // CHECK:STDOUT: %C1.2: type = class_type @C1 [template] -// CHECK:STDOUT: %C2.1: type = generic_class_type @C2 [template] -// CHECK:STDOUT: %struct.2: C2 = struct_value () [template] +// CHECK:STDOUT: %C2.type: type = generic_class_type @C2 [template] +// CHECK:STDOUT: %C2.1: = struct_value () [template] // CHECK:STDOUT: %C2.2: type = class_type @C2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -46,11 +46,11 @@ export C2(T:! type); // CHECK:STDOUT: .C1 = %C1.decl // CHECK:STDOUT: .C2 = %C2.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %C1.decl: C1 = class_decl @C1 [template = constants.%struct.1] { +// CHECK:STDOUT: %C1.decl: = class_decl @C1 [template = constants.%C1.1] { // CHECK:STDOUT: %T.loc4_10.1: type = param T // CHECK:STDOUT: %T.loc4_10.2: type = bind_symbolic_name T 0, %T.loc4_10.1 [symbolic = constants.%T] // CHECK:STDOUT: } -// CHECK:STDOUT: %C2.decl: C2 = class_decl @C2 [template = constants.%struct.2] { +// CHECK:STDOUT: %C2.decl: = class_decl @C2 [template = constants.%C2.1] { // CHECK:STDOUT: %T.loc5_10.1: type = param T // CHECK:STDOUT: %T.loc5_10.2: type = bind_symbolic_name T 0, %T.loc5_10.1 [symbolic = constants.%T] // CHECK:STDOUT: } @@ -63,12 +63,12 @@ export C2(T:! type); // CHECK:STDOUT: --- fail_b.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %C1: type = generic_class_type @C1 [template] +// CHECK:STDOUT: %C1.type: type = generic_class_type @C1 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: C1 = struct_value () [template] +// CHECK:STDOUT: %C1: = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T 0, [symbolic] -// CHECK:STDOUT: %C2: type = generic_class_type @C2 [template] -// CHECK:STDOUT: %struct.2: C2 = struct_value () [template] +// CHECK:STDOUT: %C2.type: type = generic_class_type @C2 [template] +// CHECK:STDOUT: %C2: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,12 +76,12 @@ export C2(T:! type); // CHECK:STDOUT: .C1 = %C1 // CHECK:STDOUT: .C2 = %C2 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: C1 = import_ref ir1, inst+4, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: C2 = import_ref ir1, inst+11, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %C1: C1 = export C1, %import_ref.1 [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.1: = import_ref ir1, inst+4, loaded [template = constants.%C1] +// CHECK:STDOUT: %import_ref.2: = import_ref ir1, inst+11, loaded [template = constants.%C2] +// CHECK:STDOUT: %C1: = export C1, %import_ref.1 [template = constants.%C1] // CHECK:STDOUT: %T.loc11_11.1: type = param T // CHECK:STDOUT: %T.loc11_11.2: type = bind_symbolic_name T 0, %T.loc11_11.1 [symbolic = constants.%T] -// CHECK:STDOUT: %C2: C2 = export C2, %import_ref.2 [template = constants.%struct.2] +// CHECK:STDOUT: %C2: = export C2, %import_ref.2 [template = constants.%C2] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C1; diff --git a/toolchain/check/testdata/packages/unused_lazy_import.carbon b/toolchain/check/testdata/packages/unused_lazy_import.carbon index d81468e81c7e..a0fc9bb6d0b1 100644 --- a/toolchain/check/testdata/packages/unused_lazy_import.carbon +++ b/toolchain/check/testdata/packages/unused_lazy_import.carbon @@ -21,9 +21,9 @@ impl package Implicit; // CHECK:STDOUT: --- implicit.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -32,7 +32,7 @@ impl package Implicit; // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); diff --git a/toolchain/check/testdata/pointer/address_of_deref.carbon b/toolchain/check/testdata/pointer/address_of_deref.carbon index 0a50de5518e9..d0a702e068ee 100644 --- a/toolchain/check/testdata/pointer/address_of_deref.carbon +++ b/toolchain/check/testdata/pointer/address_of_deref.carbon @@ -16,11 +16,11 @@ fn F() -> i32 { // CHECK:STDOUT: --- address_of_deref.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: %.3: type = ptr_type i32 [template] // CHECK:STDOUT: } @@ -31,21 +31,21 @@ fn F() -> i32 { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %n.var: ref i32 = var n diff --git a/toolchain/check/testdata/pointer/address_of_lvalue.carbon b/toolchain/check/testdata/pointer/address_of_lvalue.carbon index 31ac075da15a..658200b11217 100644 --- a/toolchain/check/testdata/pointer/address_of_lvalue.carbon +++ b/toolchain/check/testdata/pointer/address_of_lvalue.carbon @@ -23,16 +23,16 @@ fn F() { // CHECK:STDOUT: --- address_of_lvalue.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: F = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %.3: type = ptr_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: i32 = int_literal 2 [template] -// CHECK:STDOUT: %struct.3: {.a: i32, .b: i32} = struct_value (%.4, %.5) [template] +// CHECK:STDOUT: %struct: {.a: i32, .b: i32} = struct_value (%.4, %.5) [template] // CHECK:STDOUT: %.6: type = ptr_type i32 [template] // CHECK:STDOUT: %.7: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.8: type = tuple_type (i32, i32) [template] @@ -47,25 +47,25 @@ fn F() { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.9: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %import_ref.10: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32.loc12_15: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_15.1: type = value_of_initializer %int.make_type_32.loc12_15 [template = i32] // CHECK:STDOUT: %.loc12_15.2: type = converted %int.make_type_32.loc12_15, %.loc12_15.1 [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc12_24: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12_24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_24.1: type = value_of_initializer %int.make_type_32.loc12_24 [template = i32] // CHECK:STDOUT: %.loc12_24.2: type = converted %int.make_type_32.loc12_24, %.loc12_24.1 [template = i32] // CHECK:STDOUT: %.loc12_27: type = struct_type {.a: i32, .b: i32} [template = constants.%.2] @@ -78,13 +78,13 @@ fn F() { // CHECK:STDOUT: %.loc12_46.3: init i32 = initialize_from %.loc12_37 to %.loc12_46.2 [template = constants.%.4] // CHECK:STDOUT: %.loc12_46.4: ref i32 = struct_access %s.var, element1 // CHECK:STDOUT: %.loc12_46.5: init i32 = initialize_from %.loc12_45 to %.loc12_46.4 [template = constants.%.5] -// CHECK:STDOUT: %.loc12_46.6: init {.a: i32, .b: i32} = struct_init (%.loc12_46.3, %.loc12_46.5) to %s.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc12_47: init {.a: i32, .b: i32} = converted %.loc12_46.1, %.loc12_46.6 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc12_46.6: init {.a: i32, .b: i32} = struct_init (%.loc12_46.3, %.loc12_46.5) to %s.var [template = constants.%struct] +// CHECK:STDOUT: %.loc12_47: init {.a: i32, .b: i32} = converted %.loc12_46.1, %.loc12_46.6 [template = constants.%struct] // CHECK:STDOUT: assign %s.var, %.loc12_47 -// CHECK:STDOUT: %int.make_type_32.loc14_15: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_15.1: type = value_of_initializer %int.make_type_32.loc14_15 [template = i32] // CHECK:STDOUT: %.loc14_15.2: type = converted %int.make_type_32.loc14_15, %.loc14_15.1 [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc14_24: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_24.1: type = value_of_initializer %int.make_type_32.loc14_24 [template = i32] // CHECK:STDOUT: %.loc14_24.2: type = converted %int.make_type_32.loc14_24, %.loc14_24.1 [template = i32] // CHECK:STDOUT: %.loc14_27: type = struct_type {.a: i32, .b: i32} [template = constants.%.2] @@ -94,7 +94,7 @@ fn F() { // CHECK:STDOUT: %s.ref.loc14: ref {.a: i32, .b: i32} = name_ref s, %s // CHECK:STDOUT: %.loc14_32: {.a: i32, .b: i32}* = addr_of %s.ref.loc14 // CHECK:STDOUT: assign %p.var, %.loc14_32 -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_13.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_13.2: type = converted %int.make_type_32.loc15, %.loc15_13.1 [template = i32] // CHECK:STDOUT: %.loc15_13.3: type = ptr_type i32 [template = constants.%.6] @@ -104,7 +104,7 @@ fn F() { // CHECK:STDOUT: %.loc15_19: ref i32 = struct_access %s.ref.loc15, element0 // CHECK:STDOUT: %.loc15_17: i32* = addr_of %.loc15_19 // CHECK:STDOUT: assign %q.var, %.loc15_17 -// CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_13.1: type = value_of_initializer %int.make_type_32.loc16 [template = i32] // CHECK:STDOUT: %.loc16_13.2: type = converted %int.make_type_32.loc16, %.loc16_13.1 [template = i32] // CHECK:STDOUT: %.loc16_13.3: type = ptr_type i32 [template = constants.%.6] @@ -114,8 +114,8 @@ fn F() { // CHECK:STDOUT: %.loc16_19: ref i32 = struct_access %s.ref.loc16, element1 // CHECK:STDOUT: %.loc16_17: i32* = addr_of %.loc16_19 // CHECK:STDOUT: assign %r.var, %.loc16_17 -// CHECK:STDOUT: %int.make_type_32.loc18_11: init type = call constants.%struct.2() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc18_16: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc18_11: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc18_16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_19.1: (type, type) = tuple_literal (%int.make_type_32.loc18_11, %int.make_type_32.loc18_16) // CHECK:STDOUT: %.loc18_19.2: type = value_of_initializer %int.make_type_32.loc18_11 [template = i32] // CHECK:STDOUT: %.loc18_19.3: type = converted %int.make_type_32.loc18_11, %.loc18_19.2 [template = i32] @@ -134,7 +134,7 @@ fn F() { // CHECK:STDOUT: %.loc18_28.6: init (i32, i32) = tuple_init (%.loc18_28.3, %.loc18_28.5) to %t.var [template = constants.%tuple] // CHECK:STDOUT: %.loc18_29: init (i32, i32) = converted %.loc18_28.1, %.loc18_28.6 [template = constants.%tuple] // CHECK:STDOUT: assign %t.var, %.loc18_29 -// CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_14.1: type = value_of_initializer %int.make_type_32.loc19 [template = i32] // CHECK:STDOUT: %.loc19_14.2: type = converted %int.make_type_32.loc19, %.loc19_14.1 [template = i32] // CHECK:STDOUT: %.loc19_14.3: type = ptr_type i32 [template = constants.%.6] @@ -145,7 +145,7 @@ fn F() { // CHECK:STDOUT: %.loc19_22: ref i32 = tuple_index %t.ref.loc19, %.loc19_21 // CHECK:STDOUT: %.loc19_18: i32* = addr_of %.loc19_22 // CHECK:STDOUT: assign %t0.var, %.loc19_18 -// CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc20_14.1: type = value_of_initializer %int.make_type_32.loc20 [template = i32] // CHECK:STDOUT: %.loc20_14.2: type = converted %int.make_type_32.loc20, %.loc20_14.1 [template = i32] // CHECK:STDOUT: %.loc20_14.3: type = ptr_type i32 [template = constants.%.6] diff --git a/toolchain/check/testdata/pointer/arrow.carbon b/toolchain/check/testdata/pointer/arrow.carbon index db10a9ebc949..b5391bd2aa2a 100644 --- a/toolchain/check/testdata/pointer/arrow.carbon +++ b/toolchain/check/testdata/pointer/arrow.carbon @@ -27,14 +27,14 @@ fn Foo(ptr: C*) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %Member: type = fn_type @Member [template] +// CHECK:STDOUT: %Member.type: type = fn_type @Member [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Member = struct_value () [template] +// CHECK:STDOUT: %Member: = struct_value () [template] // CHECK:STDOUT: %.2: type = ptr_type C [template] // CHECK:STDOUT: %.3: type = unbound_element_type C, C* [template] // CHECK:STDOUT: %.4: type = struct_type {.field: C*} [template] -// CHECK:STDOUT: %Foo: type = fn_type @Foo [template] -// CHECK:STDOUT: %struct.2: Foo = struct_value () [template] +// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] +// CHECK:STDOUT: %Foo: = struct_value () [template] // CHECK:STDOUT: %.5: type = ptr_type {.field: C*} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -46,7 +46,7 @@ fn Foo(ptr: C*) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %Foo.decl: Foo = fn_decl @Foo [template = constants.%struct.2] { +// CHECK:STDOUT: %Foo.decl: = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc16: type = ptr_type C [template = constants.%.2] // CHECK:STDOUT: %ptr.loc16_8.1: C* = param ptr @@ -55,7 +55,7 @@ fn Foo(ptr: C*) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %Member.decl: Member = fn_decl @Member [template = constants.%struct.1] { +// CHECK:STDOUT: %Member.decl: = fn_decl @Member [template = constants.%Member] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %self.loc12_13.1: C = param self // CHECK:STDOUT: %self.loc12_13.2: C = bind_name self, %self.loc12_13.1 @@ -76,13 +76,13 @@ fn Foo(ptr: C*) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ptr.ref.loc17: C* = name_ref ptr, %ptr // CHECK:STDOUT: %.loc17_4.1: ref C = deref %ptr.ref.loc17 -// CHECK:STDOUT: %Member.ref.loc17: Member = name_ref Member, @C.%Member.decl [template = constants.%struct.1] +// CHECK:STDOUT: %Member.ref.loc17: = name_ref Member, @C.%Member.decl [template = constants.%Member] // CHECK:STDOUT: %.loc17_9: = bound_method %.loc17_4.1, %Member.ref.loc17 // CHECK:STDOUT: %.loc17_4.2: C = bind_value %.loc17_4.1 // CHECK:STDOUT: %Member.call.loc17: init () = call %.loc17_9(%.loc17_4.2) // CHECK:STDOUT: %ptr.ref.loc18: C* = name_ref ptr, %ptr // CHECK:STDOUT: %.loc18_6.1: ref C = deref %ptr.ref.loc18 -// CHECK:STDOUT: %Member.ref.loc18: Member = name_ref Member, @C.%Member.decl [template = constants.%struct.1] +// CHECK:STDOUT: %Member.ref.loc18: = name_ref Member, @C.%Member.decl [template = constants.%Member] // CHECK:STDOUT: %.loc18_6.2: = bound_method %.loc18_6.1, %Member.ref.loc18 // CHECK:STDOUT: %.loc18_6.3: C = bind_value %.loc18_6.1 // CHECK:STDOUT: %Member.call.loc18: init () = call %.loc18_6.2(%.loc18_6.3) diff --git a/toolchain/check/testdata/pointer/basic.carbon b/toolchain/check/testdata/pointer/basic.carbon index 79eeb9bd6f3c..39c7692b057b 100644 --- a/toolchain/check/testdata/pointer/basic.carbon +++ b/toolchain/check/testdata/pointer/basic.carbon @@ -18,11 +18,11 @@ fn F() -> i32 { // CHECK:STDOUT: --- basic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: %.3: type = ptr_type i32 [template] // CHECK:STDOUT: } @@ -33,29 +33,29 @@ fn F() -> i32 { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %n.var: ref i32 = var n // CHECK:STDOUT: %n: ref i32 = bind_name n, %n.var // CHECK:STDOUT: %.loc12_16: i32 = int_literal 0 [template = constants.%.2] // CHECK:STDOUT: assign %n.var, %.loc12_16 -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_13.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_13.2: type = converted %int.make_type_32.loc13, %.loc13_13.1 [template = i32] // CHECK:STDOUT: %.loc13_13.3: type = ptr_type i32 [template = constants.%.3] diff --git a/toolchain/check/testdata/pointer/fail_address_of_error.carbon b/toolchain/check/testdata/pointer/fail_address_of_error.carbon index 907b293092d7..bf055b67e521 100644 --- a/toolchain/check/testdata/pointer/fail_address_of_error.carbon +++ b/toolchain/check/testdata/pointer/fail_address_of_error.carbon @@ -27,9 +27,9 @@ fn Test() { // CHECK:STDOUT: --- fail_address_of_error.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Test: type = fn_type @Test [template] +// CHECK:STDOUT: %Test.type: type = fn_type @Test [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Test = struct_value () [template] +// CHECK:STDOUT: %Test: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -38,7 +38,7 @@ fn Test() { // CHECK:STDOUT: .Test = %Test.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Test.decl: Test = fn_decl @Test [template = constants.%struct] {} +// CHECK:STDOUT: %Test.decl: = fn_decl @Test [template = constants.%Test] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Test() { diff --git a/toolchain/check/testdata/pointer/fail_address_of_value.carbon b/toolchain/check/testdata/pointer/fail_address_of_value.carbon index 1133881e8feb..0eeccb86b9fa 100644 --- a/toolchain/check/testdata/pointer/fail_address_of_value.carbon +++ b/toolchain/check/testdata/pointer/fail_address_of_value.carbon @@ -102,16 +102,16 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: --- fail_address_of_value.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.2: G = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] -// CHECK:STDOUT: %H: type = fn_type @H [template] -// CHECK:STDOUT: %struct.3: H = struct_value () [template] -// CHECK:STDOUT: %AddressOfLiteral: type = fn_type @AddressOfLiteral [template] -// CHECK:STDOUT: %struct.4: AddressOfLiteral = struct_value () [template] +// CHECK:STDOUT: %H.type: type = fn_type @H [template] +// CHECK:STDOUT: %H: = struct_value () [template] +// CHECK:STDOUT: %AddressOfLiteral.type: type = fn_type @AddressOfLiteral [template] +// CHECK:STDOUT: %AddressOfLiteral: = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: %.4: type = ptr_type i32 [template] // CHECK:STDOUT: %.5: bool = bool_literal true [template] @@ -126,21 +126,21 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: %.14: type = ptr_type (i32, i32) [template] // CHECK:STDOUT: %.15: i32 = int_literal 5 [template] // CHECK:STDOUT: %.16: type = ptr_type {.a: i32} [template] -// CHECK:STDOUT: %AddressOfOperator: type = fn_type @AddressOfOperator [template] -// CHECK:STDOUT: %struct.5: AddressOfOperator = struct_value () [template] +// CHECK:STDOUT: %AddressOfOperator.type: type = fn_type @AddressOfOperator [template] +// CHECK:STDOUT: %AddressOfOperator: = struct_value () [template] // CHECK:STDOUT: %.17: bool = bool_literal false [template] -// CHECK:STDOUT: %AddressOfCall: type = fn_type @AddressOfCall [template] -// CHECK:STDOUT: %struct.6: AddressOfCall = struct_value () [template] -// CHECK:STDOUT: %AddressOfType: type = fn_type @AddressOfType [template] -// CHECK:STDOUT: %struct.7: AddressOfType = struct_value () [template] +// CHECK:STDOUT: %AddressOfCall.type: type = fn_type @AddressOfCall [template] +// CHECK:STDOUT: %AddressOfCall: = struct_value () [template] +// CHECK:STDOUT: %AddressOfType.type: type = fn_type @AddressOfType [template] +// CHECK:STDOUT: %AddressOfType: = struct_value () [template] // CHECK:STDOUT: %.18: type = ptr_type type [template] // CHECK:STDOUT: %.19: type = const_type i32 [template] // CHECK:STDOUT: %.20: type = ptr_type const i32 [template] -// CHECK:STDOUT: %AddressOfTupleElementValue: type = fn_type @AddressOfTupleElementValue [template] -// CHECK:STDOUT: %struct.8: AddressOfTupleElementValue = struct_value () [template] +// CHECK:STDOUT: %AddressOfTupleElementValue.type: type = fn_type @AddressOfTupleElementValue [template] +// CHECK:STDOUT: %AddressOfTupleElementValue: = struct_value () [template] // CHECK:STDOUT: %tuple: (i32, i32) = tuple_value (%.11, %.12) [template] -// CHECK:STDOUT: %AddressOfParam: type = fn_type @AddressOfParam [template] -// CHECK:STDOUT: %struct.9: AddressOfParam = struct_value () [template] +// CHECK:STDOUT: %AddressOfParam.type: type = fn_type @AddressOfParam [template] +// CHECK:STDOUT: %AddressOfParam: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -156,37 +156,37 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: .AddressOfParam = %AddressOfParam.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11, %.loc11_11.1 [template = i32] // CHECK:STDOUT: @G.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %H.decl: H = fn_decl @H [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] { +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_16.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_16.2: type = converted %int.make_type_32.loc13, %.loc13_16.1 [template = i32] // CHECK:STDOUT: %.loc13_19: type = struct_type {.a: i32} [template = constants.%.2] // CHECK:STDOUT: @H.%return: ref {.a: i32} = var // CHECK:STDOUT: } -// CHECK:STDOUT: %AddressOfLiteral.decl: AddressOfLiteral = fn_decl @AddressOfLiteral [template = constants.%struct.4] {} -// CHECK:STDOUT: %AddressOfOperator.decl: AddressOfOperator = fn_decl @AddressOfOperator [template = constants.%struct.5] {} -// CHECK:STDOUT: %AddressOfCall.decl: AddressOfCall = fn_decl @AddressOfCall [template = constants.%struct.6] {} -// CHECK:STDOUT: %AddressOfType.decl: AddressOfType = fn_decl @AddressOfType [template = constants.%struct.7] {} -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %AddressOfTupleElementValue.decl: AddressOfTupleElementValue = fn_decl @AddressOfTupleElementValue [template = constants.%struct.8] {} -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %AddressOfParam.decl: AddressOfParam = fn_decl @AddressOfParam [template = constants.%struct.9] { -// CHECK:STDOUT: %int.make_type_32.loc95: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %AddressOfLiteral.decl: = fn_decl @AddressOfLiteral [template = constants.%AddressOfLiteral] {} +// CHECK:STDOUT: %AddressOfOperator.decl: = fn_decl @AddressOfOperator [template = constants.%AddressOfOperator] {} +// CHECK:STDOUT: %AddressOfCall.decl: = fn_decl @AddressOfCall [template = constants.%AddressOfCall] {} +// CHECK:STDOUT: %AddressOfType.decl: = fn_decl @AddressOfType [template = constants.%AddressOfType] {} +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AddressOfTupleElementValue.decl: = fn_decl @AddressOfTupleElementValue [template = constants.%AddressOfTupleElementValue] {} +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %AddressOfParam.decl: = fn_decl @AddressOfParam [template = constants.%AddressOfParam] { +// CHECK:STDOUT: %int.make_type_32.loc95: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc95_26.1: type = value_of_initializer %int.make_type_32.loc95 [template = i32] // CHECK:STDOUT: %.loc95_26.2: type = converted %int.make_type_32.loc95, %.loc95_26.1 [template = i32] // CHECK:STDOUT: %param.loc95_19.1: i32 = param param // CHECK:STDOUT: @AddressOfParam.%param: i32 = bind_name param, %param.loc95_19.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -228,7 +228,7 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: !and.result: // CHECK:STDOUT: %.loc53_10.2: bool = block_arg !and.result [template = constants.%.17] // CHECK:STDOUT: %.loc53_3: bool* = addr_of [template = ] -// CHECK:STDOUT: %H.ref: H = name_ref H, file.%H.decl [template = constants.%struct.3] +// CHECK:STDOUT: %H.ref: = name_ref H, file.%H.decl [template = constants.%H] // CHECK:STDOUT: %H.call: init {.a: i32} = call %H.ref() // CHECK:STDOUT: %.loc58_5.1: ref {.a: i32} = temporary_storage // CHECK:STDOUT: %.loc58_5.2: ref {.a: i32} = temporary %.loc58_5.1, %H.call @@ -242,7 +242,7 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: // CHECK:STDOUT: fn @AddressOfCall() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %G.ref: G = name_ref G, file.%G.decl [template = constants.%struct.2] +// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %G.call: init i32 = call %G.ref() // CHECK:STDOUT: %.loc71: i32* = addr_of [template = ] // CHECK:STDOUT: return @@ -250,9 +250,9 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: // CHECK:STDOUT: fn @AddressOfType() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32.loc79: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc79: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc79: type* = addr_of [template = ] -// CHECK:STDOUT: %int.make_type_32.loc84: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc84: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc84_5.1: type = value_of_initializer %int.make_type_32.loc84 [template = i32] // CHECK:STDOUT: %.loc84_5.2: type = converted %int.make_type_32.loc84, %.loc84_5.1 [template = i32] // CHECK:STDOUT: %.loc84_5.3: type = const_type i32 [template = constants.%.19] @@ -276,7 +276,7 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: // CHECK:STDOUT: fn @AddressOfParam(%param: i32) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc99_22.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc99_22.2: type = converted %int.make_type_32, %.loc99_22.1 [template = i32] // CHECK:STDOUT: %.loc99_22.3: type = ptr_type i32 [template = constants.%.4] diff --git a/toolchain/check/testdata/pointer/fail_deref_error.carbon b/toolchain/check/testdata/pointer/fail_deref_error.carbon index b2e13951b0bf..ab7b9c05776a 100644 --- a/toolchain/check/testdata/pointer/fail_deref_error.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_error.carbon @@ -21,9 +21,9 @@ let n2: i32 = undeclared->foo; // CHECK:STDOUT: --- fail_deref_error.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -31,15 +31,15 @@ let n2: i32 = undeclared->foo; // CHECK:STDOUT: .Core = %Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_32.loc15, %.loc15_8.1 [template = i32] // CHECK:STDOUT: %undeclared.ref.loc15: = name_ref undeclared, [template = ] // CHECK:STDOUT: %.loc15_14: ref = deref // CHECK:STDOUT: %n: i32 = bind_name n, -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_9.1: type = value_of_initializer %int.make_type_32.loc19 [template = i32] // CHECK:STDOUT: %.loc19_9.2: type = converted %int.make_type_32.loc19, %.loc19_9.1 [template = i32] // CHECK:STDOUT: %undeclared.ref.loc19: = name_ref undeclared, [template = ] diff --git a/toolchain/check/testdata/pointer/fail_deref_function.carbon b/toolchain/check/testdata/pointer/fail_deref_function.carbon index a027b3e6892e..06360fc42b3c 100644 --- a/toolchain/check/testdata/pointer/fail_deref_function.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_function.carbon @@ -23,9 +23,9 @@ fn A() { // CHECK:STDOUT: --- fail_deref_function.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -34,14 +34,14 @@ fn A() { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref.loc16: A = name_ref A, file.%A.decl [template = constants.%struct] +// CHECK:STDOUT: %A.ref.loc16: = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %.loc16: ref = deref -// CHECK:STDOUT: %A.ref.loc20: A = name_ref A, file.%A.decl [template = constants.%struct] +// CHECK:STDOUT: %A.ref.loc20: = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %.loc20: ref = deref // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/pointer/fail_deref_namespace.carbon b/toolchain/check/testdata/pointer/fail_deref_namespace.carbon index 8860f20f04ca..7ca211e8dfc2 100644 --- a/toolchain/check/testdata/pointer/fail_deref_namespace.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_namespace.carbon @@ -25,9 +25,9 @@ fn F() { // CHECK:STDOUT: --- fail_deref_namespace.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -38,7 +38,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %A: = namespace [template] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { diff --git a/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon b/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon index 7341ef3d72aa..792ff5b25129 100644 --- a/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon @@ -43,14 +43,14 @@ fn Deref(n: i32) { // CHECK:STDOUT: --- fail_deref_not_pointer.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Deref: type = fn_type @Deref [template] -// CHECK:STDOUT: %struct.2: Deref = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Deref.type: type = fn_type @Deref [template] +// CHECK:STDOUT: %Deref: = struct_value () [template] // CHECK:STDOUT: %tuple: () = tuple_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] -// CHECK:STDOUT: %struct.3: {} = struct_value () [template] +// CHECK:STDOUT: %struct: {} = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -59,9 +59,9 @@ fn Deref(n: i32) { // CHECK:STDOUT: .Deref = %Deref.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Deref.decl: Deref = fn_decl @Deref [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Deref.decl: = fn_decl @Deref [template = constants.%Deref] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_32, %.loc11_13.1 [template = i32] // CHECK:STDOUT: %n.loc11_10.1: i32 = param n @@ -86,12 +86,12 @@ fn Deref(n: i32) { // CHECK:STDOUT: %.loc31_4.2: () = converted %.loc31_4.1, %tuple.loc31 [template = constants.%tuple] // CHECK:STDOUT: %.loc31_5: ref = deref %.loc31_4.2 // CHECK:STDOUT: %.loc36_5.1: {} = struct_literal () -// CHECK:STDOUT: %struct.loc36: {} = struct_value () [template = constants.%struct.3] -// CHECK:STDOUT: %.loc36_5.2: {} = converted %.loc36_5.1, %struct.loc36 [template = constants.%struct.3] +// CHECK:STDOUT: %struct.loc36: {} = struct_value () [template = constants.%struct] +// CHECK:STDOUT: %.loc36_5.2: {} = converted %.loc36_5.1, %struct.loc36 [template = constants.%struct] // CHECK:STDOUT: %.loc36_3: ref = deref %.loc36_5.2 // CHECK:STDOUT: %.loc40_4.1: {} = struct_literal () -// CHECK:STDOUT: %struct.loc40: {} = struct_value () [template = constants.%struct.3] -// CHECK:STDOUT: %.loc40_4.2: {} = converted %.loc40_4.1, %struct.loc40 [template = constants.%struct.3] +// CHECK:STDOUT: %struct.loc40: {} = struct_value () [template = constants.%struct] +// CHECK:STDOUT: %.loc40_4.2: {} = converted %.loc40_4.1, %struct.loc40 [template = constants.%struct] // CHECK:STDOUT: %.loc40_5: ref = deref %.loc40_4.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/pointer/fail_deref_type.carbon b/toolchain/check/testdata/pointer/fail_deref_type.carbon index 414bfda13571..8edd5039d2db 100644 --- a/toolchain/check/testdata/pointer/fail_deref_type.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_type.carbon @@ -24,9 +24,9 @@ var p2: i32->foo; // CHECK:STDOUT: --- fail_deref_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -36,15 +36,15 @@ var p2: i32->foo; // CHECK:STDOUT: .p2 = %p2 // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_9.1: type = value_of_initializer %int.make_type_32.loc18 [template = i32] // CHECK:STDOUT: %.loc18_9.2: type = converted %int.make_type_32.loc18, %.loc18_9.1 [template = i32] // CHECK:STDOUT: %.loc18_8: ref = deref %.loc18_9.2 // CHECK:STDOUT: %p.var: ref = var p // CHECK:STDOUT: %p: ref = bind_name p, %p.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_9.1: type = value_of_initializer %int.make_type_32.loc22 [template = i32] // CHECK:STDOUT: %.loc22_9.2: type = converted %int.make_type_32.loc22, %.loc22_9.1 [template = i32] // CHECK:STDOUT: %.loc22_12: ref = deref %.loc22_9.2 diff --git a/toolchain/check/testdata/pointer/fail_type_mismatch.carbon b/toolchain/check/testdata/pointer/fail_type_mismatch.carbon index 1a6fe94e58b2..466210aec902 100644 --- a/toolchain/check/testdata/pointer/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/pointer/fail_type_mismatch.carbon @@ -23,9 +23,9 @@ fn ConstMismatch(p: const {}*) -> const ({}*) { // CHECK:STDOUT: %.3: type = ptr_type const {} [template] // CHECK:STDOUT: %.4: type = ptr_type {} [template] // CHECK:STDOUT: %.5: type = const_type {}* [template] -// CHECK:STDOUT: %ConstMismatch: type = fn_type @ConstMismatch [template] +// CHECK:STDOUT: %ConstMismatch.type: type = fn_type @ConstMismatch [template] // CHECK:STDOUT: %.6: type = tuple_type () [template] -// CHECK:STDOUT: %struct: ConstMismatch = struct_value () [template] +// CHECK:STDOUT: %ConstMismatch: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -34,7 +34,7 @@ fn ConstMismatch(p: const {}*) -> const ({}*) { // CHECK:STDOUT: .ConstMismatch = %ConstMismatch.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %ConstMismatch.decl: ConstMismatch = fn_decl @ConstMismatch [template = constants.%struct] { +// CHECK:STDOUT: %ConstMismatch.decl: = fn_decl @ConstMismatch [template = constants.%ConstMismatch] { // CHECK:STDOUT: %.loc11_28: {} = struct_literal () // CHECK:STDOUT: %.loc11_21.1: type = converted %.loc11_28, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %.loc11_21.2: type = const_type {} [template = constants.%.2] diff --git a/toolchain/check/testdata/pointer/import.carbon b/toolchain/check/testdata/pointer/import.carbon index 894a3cefb356..3c8d7c778208 100644 --- a/toolchain/check/testdata/pointer/import.carbon +++ b/toolchain/check/testdata/pointer/import.carbon @@ -24,9 +24,9 @@ var a: i32* = a_ref; // CHECK:STDOUT: --- implicit.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: %.3: type = ptr_type i32 [template] // CHECK:STDOUT: } @@ -38,14 +38,14 @@ var a: i32* = a_ref; // CHECK:STDOUT: .a_ref = %a_ref // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_13.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_13.2: type = converted %int.make_type_32.loc4, %.loc4_13.1 [template = i32] // CHECK:STDOUT: %a_orig.var: ref i32 = var a_orig // CHECK:STDOUT: %a_orig: ref i32 = bind_name a_orig, %a_orig.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_15.1: type = value_of_initializer %int.make_type_32.loc5 [template = i32] // CHECK:STDOUT: %.loc5_15.2: type = converted %int.make_type_32.loc5, %.loc5_15.1 [template = i32] // CHECK:STDOUT: %.loc5_15.3: type = ptr_type i32 [template = constants.%.3] @@ -68,9 +68,9 @@ var a: i32* = a_ref; // CHECK:STDOUT: --- implicit.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = ptr_type i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -84,8 +84,8 @@ var a: i32* = a_ref; // CHECK:STDOUT: %import_ref.1 = import_ref ir0, inst+12, unloaded // CHECK:STDOUT: %import_ref.2: ref i32* = import_ref ir0, inst+23, loaded // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32, %.loc4_11.1 [template = i32] // CHECK:STDOUT: %.loc4_11.3: type = ptr_type i32 [template = constants.%.2] diff --git a/toolchain/check/testdata/pointer/nested_const.carbon b/toolchain/check/testdata/pointer/nested_const.carbon index a1a086f98dac..a02fa6e49944 100644 --- a/toolchain/check/testdata/pointer/nested_const.carbon +++ b/toolchain/check/testdata/pointer/nested_const.carbon @@ -16,16 +16,16 @@ fn F(p: const (const (const i32*)*)) -> const i32 { // CHECK:STDOUT: --- nested_const.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = const_type i32 [template] // CHECK:STDOUT: %.3: type = ptr_type const i32 [template] // CHECK:STDOUT: %.4: type = const_type const i32* [template] // CHECK:STDOUT: %.5: type = ptr_type const (const i32*) [template] // CHECK:STDOUT: %.6: type = const_type const (const i32*)* [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -34,10 +34,10 @@ fn F(p: const (const (const i32*)*)) -> const i32 { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc12_29: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc12_29: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_23.1: type = value_of_initializer %int.make_type_32.loc12_29 [template = i32] // CHECK:STDOUT: %.loc12_23.2: type = converted %int.make_type_32.loc12_29, %.loc12_23.1 [template = i32] // CHECK:STDOUT: %.loc12_23.3: type = const_type i32 [template = constants.%.2] @@ -47,7 +47,7 @@ fn F(p: const (const (const i32*)*)) -> const i32 { // CHECK:STDOUT: %.loc12_9: type = const_type const (const i32*)* [template = constants.%.6] // CHECK:STDOUT: %p.loc12_6.1: const (const (const i32*)*) = param p // CHECK:STDOUT: @F.%p: const (const (const i32*)*) = bind_name p, %p.loc12_6.1 -// CHECK:STDOUT: %int.make_type_32.loc12_47: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12_47: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_41.1: type = value_of_initializer %int.make_type_32.loc12_47 [template = i32] // CHECK:STDOUT: %.loc12_41.2: type = converted %int.make_type_32.loc12_47, %.loc12_41.1 [template = i32] // CHECK:STDOUT: %.loc12_41.3: type = const_type i32 [template = constants.%.2] diff --git a/toolchain/check/testdata/pointer/types.carbon b/toolchain/check/testdata/pointer/types.carbon index 2a7825b5c04f..e0abe9f7733b 100644 --- a/toolchain/check/testdata/pointer/types.carbon +++ b/toolchain/check/testdata/pointer/types.carbon @@ -19,16 +19,16 @@ fn ConstPtr(p: const i32*) -> (const i32)* { // CHECK:STDOUT: --- types.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = ptr_type i32 [template] -// CHECK:STDOUT: %Ptr: type = fn_type @Ptr [template] -// CHECK:STDOUT: %struct.2: Ptr = struct_value () [template] +// CHECK:STDOUT: %Ptr.type: type = fn_type @Ptr [template] +// CHECK:STDOUT: %Ptr: = struct_value () [template] // CHECK:STDOUT: %.3: type = const_type i32 [template] // CHECK:STDOUT: %.4: type = ptr_type const i32 [template] -// CHECK:STDOUT: %ConstPtr: type = fn_type @ConstPtr [template] -// CHECK:STDOUT: %struct.3: ConstPtr = struct_value () [template] +// CHECK:STDOUT: %ConstPtr.type: type = fn_type @ConstPtr [template] +// CHECK:STDOUT: %ConstPtr: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -38,32 +38,32 @@ fn ConstPtr(p: const i32*) -> (const i32)* { // CHECK:STDOUT: .ConstPtr = %ConstPtr.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Ptr.decl: Ptr = fn_decl @Ptr [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Ptr.decl: = fn_decl @Ptr [template = constants.%Ptr] { +// CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_32.loc11_11, %.loc11_14.1 [template = i32] // CHECK:STDOUT: %.loc11_14.3: type = ptr_type i32 [template = constants.%.2] // CHECK:STDOUT: %p.loc11_8.1: i32* = param p // CHECK:STDOUT: @Ptr.%p: i32* = bind_name p, %p.loc11_8.1 -// CHECK:STDOUT: %int.make_type_32.loc11_20: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_23.1: type = value_of_initializer %int.make_type_32.loc11_20 [template = i32] // CHECK:STDOUT: %.loc11_23.2: type = converted %int.make_type_32.loc11_20, %.loc11_23.1 [template = i32] // CHECK:STDOUT: %.loc11_23.3: type = ptr_type i32 [template = constants.%.2] // CHECK:STDOUT: @Ptr.%return: ref i32* = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %ConstPtr.decl: ConstPtr = fn_decl @ConstPtr [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc15_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %ConstPtr.decl: = fn_decl @ConstPtr [template = constants.%ConstPtr] { +// CHECK:STDOUT: %int.make_type_32.loc15_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_16.1: type = value_of_initializer %int.make_type_32.loc15_22 [template = i32] // CHECK:STDOUT: %.loc15_16.2: type = converted %int.make_type_32.loc15_22, %.loc15_16.1 [template = i32] // CHECK:STDOUT: %.loc15_16.3: type = const_type i32 [template = constants.%.3] // CHECK:STDOUT: %.loc15_25: type = ptr_type const i32 [template = constants.%.4] // CHECK:STDOUT: %p.loc15_13.1: const i32* = param p // CHECK:STDOUT: @ConstPtr.%p: const i32* = bind_name p, %p.loc15_13.1 -// CHECK:STDOUT: %int.make_type_32.loc15_38: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc15_38: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_32.1: type = value_of_initializer %int.make_type_32.loc15_38 [template = i32] // CHECK:STDOUT: %.loc15_32.2: type = converted %int.make_type_32.loc15_38, %.loc15_32.1 [template = i32] // CHECK:STDOUT: %.loc15_32.3: type = const_type i32 [template = constants.%.3] diff --git a/toolchain/check/testdata/return/code_after_return.carbon b/toolchain/check/testdata/return/code_after_return.carbon index 53c17afdc360..085ac038d418 100644 --- a/toolchain/check/testdata/return/code_after_return.carbon +++ b/toolchain/check/testdata/return/code_after_return.carbon @@ -16,11 +16,11 @@ fn Main() { // CHECK:STDOUT: --- code_after_return.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Main: type = fn_type @Main [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Main = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] +// CHECK:STDOUT: %Main: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -30,8 +30,8 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.1] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { diff --git a/toolchain/check/testdata/return/code_after_return_value.carbon b/toolchain/check/testdata/return/code_after_return_value.carbon index 47b9d99e08b9..d8f9336c377c 100644 --- a/toolchain/check/testdata/return/code_after_return_value.carbon +++ b/toolchain/check/testdata/return/code_after_return_value.carbon @@ -23,13 +23,13 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: --- code_after_return_value.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Bool = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.3: F = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] // CHECK:STDOUT: %.4: i32 = int_literal 2 [template] @@ -43,20 +43,20 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.3] { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc11_9.2: type = converted %bool.make_type, %.loc11_9.1 [template = bool] // CHECK:STDOUT: %b.loc11_6.1: bool = param b // CHECK:STDOUT: @F.%b: bool = bind_name b, %b.loc11_6.1 -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_18.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_18.2: type = converted %int.make_type_32, %.loc11_18.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; diff --git a/toolchain/check/testdata/return/fail_call_in_type.carbon b/toolchain/check/testdata/return/fail_call_in_type.carbon index 854d1305f987..bb9e19854147 100644 --- a/toolchain/check/testdata/return/fail_call_in_type.carbon +++ b/toolchain/check/testdata/return/fail_call_in_type.carbon @@ -19,13 +19,13 @@ fn Six() -> ReturnType() { return 6; } // CHECK:STDOUT: --- fail_call_in_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %ReturnType: type = fn_type @ReturnType [template] +// CHECK:STDOUT: %ReturnType.type: type = fn_type @ReturnType [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: ReturnType = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] -// CHECK:STDOUT: %Six: type = fn_type @Six [template] -// CHECK:STDOUT: %struct.3: Six = struct_value () [template] +// CHECK:STDOUT: %ReturnType: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Six.type: type = fn_type @Six [template] +// CHECK:STDOUT: %Six: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -36,12 +36,12 @@ fn Six() -> ReturnType() { return 6; } // CHECK:STDOUT: .Six = %Six.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %ReturnType.decl: ReturnType = fn_decl @ReturnType [template = constants.%struct.1] { +// CHECK:STDOUT: %ReturnType.decl: = fn_decl @ReturnType [template = constants.%ReturnType] { // CHECK:STDOUT: @ReturnType.%return: ref type = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %Six.decl: Six = fn_decl @Six [template = constants.%struct.3] { -// CHECK:STDOUT: %ReturnType.ref: ReturnType = name_ref ReturnType, %ReturnType.decl [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Six.decl: = fn_decl @Six [template = constants.%Six] { +// CHECK:STDOUT: %ReturnType.ref: = name_ref ReturnType, %ReturnType.decl [template = constants.%ReturnType] // CHECK:STDOUT: %ReturnType.call: init type = call %ReturnType.ref() // CHECK:STDOUT: %.loc17_24.1: type = value_of_initializer %ReturnType.call // CHECK:STDOUT: %.loc17_24.2: type = converted %ReturnType.call, %.loc17_24.1 @@ -51,7 +51,7 @@ fn Six() -> ReturnType() { return 6; } // CHECK:STDOUT: // CHECK:STDOUT: fn @ReturnType() -> type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_37.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc13_37.2: type = converted %int.make_type_32, %.loc13_37.1 [template = i32] // CHECK:STDOUT: return %.loc13_37.2 diff --git a/toolchain/check/testdata/return/fail_error_in_type.carbon b/toolchain/check/testdata/return/fail_error_in_type.carbon index 8df3ccb6b7da..c41ee95be37a 100644 --- a/toolchain/check/testdata/return/fail_error_in_type.carbon +++ b/toolchain/check/testdata/return/fail_error_in_type.carbon @@ -16,9 +16,9 @@ fn Six() -> x; // CHECK:STDOUT: --- fail_error_in_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Six: type = fn_type @Six [template] +// CHECK:STDOUT: %Six.type: type = fn_type @Six [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Six = struct_value () [template] +// CHECK:STDOUT: %Six: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -27,7 +27,7 @@ fn Six() -> x; // CHECK:STDOUT: .Six = %Six.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Six.decl: Six = fn_decl @Six [template = constants.%struct] { +// CHECK:STDOUT: %Six.decl: = fn_decl @Six [template = constants.%Six] { // CHECK:STDOUT: %x.ref: = name_ref x, [template = ] // CHECK:STDOUT: @Six.%return: ref = var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/return/fail_let_in_type.carbon b/toolchain/check/testdata/return/fail_let_in_type.carbon index 806222502311..9068bc844d1d 100644 --- a/toolchain/check/testdata/return/fail_let_in_type.carbon +++ b/toolchain/check/testdata/return/fail_let_in_type.carbon @@ -33,15 +33,15 @@ fn FirstPerfectNumber() -> z { return 6; } // CHECK:STDOUT: --- fail_let_in_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Six: type = fn_type @Six [template] -// CHECK:STDOUT: %struct.2: Six = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Six.type: type = fn_type @Six [template] +// CHECK:STDOUT: %Six: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 6 [template] // CHECK:STDOUT: %y: type = bind_symbolic_name y 0 [symbolic] -// CHECK:STDOUT: %HalfDozen: type = fn_type @HalfDozen [template] -// CHECK:STDOUT: %struct.3: HalfDozen = struct_value () [template] +// CHECK:STDOUT: %HalfDozen.type: type = fn_type @HalfDozen [template] +// CHECK:STDOUT: %HalfDozen: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file {} diff --git a/toolchain/check/testdata/return/fail_missing_return.carbon b/toolchain/check/testdata/return/fail_missing_return.carbon index a179205c7327..539b66f53a2c 100644 --- a/toolchain/check/testdata/return/fail_missing_return.carbon +++ b/toolchain/check/testdata/return/fail_missing_return.carbon @@ -17,11 +17,11 @@ fn Main() -> i32 { // CHECK:STDOUT: --- fail_missing_return.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.2: Main = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -30,9 +30,9 @@ fn Main() -> i32 { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_32, %.loc11_14.1 [template = i32] // CHECK:STDOUT: @Main.%return: ref i32 = var diff --git a/toolchain/check/testdata/return/fail_missing_return_empty_tuple.carbon b/toolchain/check/testdata/return/fail_missing_return_empty_tuple.carbon index 97a63bc88a6f..592298b802da 100644 --- a/toolchain/check/testdata/return/fail_missing_return_empty_tuple.carbon +++ b/toolchain/check/testdata/return/fail_missing_return_empty_tuple.carbon @@ -18,8 +18,8 @@ fn F() -> () { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -28,7 +28,7 @@ fn F() -> () { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %.loc11_12.1: () = tuple_literal () // CHECK:STDOUT: %.loc11_12.2: type = converted %.loc11_12.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: @F.%return: ref () = var diff --git a/toolchain/check/testdata/return/fail_return_var_no_returned_var.carbon b/toolchain/check/testdata/return/fail_return_var_no_returned_var.carbon index 2a9b5c2da83c..41359a142d3e 100644 --- a/toolchain/check/testdata/return/fail_return_var_no_returned_var.carbon +++ b/toolchain/check/testdata/return/fail_return_var_no_returned_var.carbon @@ -18,11 +18,11 @@ fn Procedure() -> i32 { // CHECK:STDOUT: --- fail_return_var_no_returned_var.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Procedure: type = fn_type @Procedure [template] -// CHECK:STDOUT: %struct.2: Procedure = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Procedure.type: type = fn_type @Procedure [template] +// CHECK:STDOUT: %Procedure: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -31,9 +31,9 @@ fn Procedure() -> i32 { // CHECK:STDOUT: .Procedure = %Procedure.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Procedure.decl: Procedure = fn_decl @Procedure [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Procedure.decl: = fn_decl @Procedure [template = constants.%Procedure] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_32, %.loc11_19.1 [template = i32] // CHECK:STDOUT: @Procedure.%return: ref i32 = var diff --git a/toolchain/check/testdata/return/fail_return_with_returned_var.carbon b/toolchain/check/testdata/return/fail_return_with_returned_var.carbon index 01301ad031ea..a78a4aeabb96 100644 --- a/toolchain/check/testdata/return/fail_return_with_returned_var.carbon +++ b/toolchain/check/testdata/return/fail_return_with_returned_var.carbon @@ -35,21 +35,21 @@ fn G() -> C { // CHECK:STDOUT: --- fail_return_with_returned_var.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %.4: type = unbound_element_type C, i32 [template] // CHECK:STDOUT: %.5: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.6: type = ptr_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %.7: i32 = int_literal 2 [template] -// CHECK:STDOUT: %struct.4: C = struct_value (%.3, %.7) [template] +// CHECK:STDOUT: %struct: C = struct_value (%.3, %.7) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -60,29 +60,29 @@ fn G() -> C { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] { +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: @G.%return: ref C = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %int.make_type_32.loc23_18: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc23_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_18.1: type = value_of_initializer %int.make_type_32.loc23_18 [template = i32] // CHECK:STDOUT: %.loc23_18.2: type = converted %int.make_type_32.loc23_18, %.loc23_18.1 [template = i32] // CHECK:STDOUT: %.loc23_16: = field_decl a, element0 [template] -// CHECK:STDOUT: %int.make_type_32.loc23_30: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc23_30: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_30.1: type = value_of_initializer %int.make_type_32.loc23_30 [template = i32] // CHECK:STDOUT: %.loc23_30.2: type = converted %int.make_type_32.loc23_30, %.loc23_30.1 [template = i32] // CHECK:STDOUT: %.loc23_28: = field_decl b, element1 [template] @@ -97,7 +97,7 @@ fn G() -> C { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_19.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_19.2: type = converted %int.make_type_32, %.loc12_19.1 [template = i32] // CHECK:STDOUT: %v.var: ref i32 = var v @@ -119,8 +119,8 @@ fn G() -> C { // CHECK:STDOUT: %.loc25_38.3: init i32 = initialize_from %.loc25_29 to %.loc25_38.2 [template = constants.%.3] // CHECK:STDOUT: %.loc25_38.4: ref i32 = class_element_access %return, element1 // CHECK:STDOUT: %.loc25_38.5: init i32 = initialize_from %.loc25_37 to %.loc25_38.4 [template = constants.%.7] -// CHECK:STDOUT: %.loc25_38.6: init C = class_init (%.loc25_38.3, %.loc25_38.5), %return [template = constants.%struct.4] -// CHECK:STDOUT: %.loc25_39: init C = converted %.loc25_38.1, %.loc25_38.6 [template = constants.%struct.4] +// CHECK:STDOUT: %.loc25_38.6: init C = class_init (%.loc25_38.3, %.loc25_38.5), %return [template = constants.%struct] +// CHECK:STDOUT: %.loc25_39: init C = converted %.loc25_38.1, %.loc25_38.6 [template = constants.%struct] // CHECK:STDOUT: assign %return, %.loc25_39 // CHECK:STDOUT: %c.ref: ref C = name_ref c, %c // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon b/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon index 90225cb7d768..938078d31289 100644 --- a/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon @@ -22,9 +22,9 @@ fn Procedure() { // CHECK:STDOUT: --- fail_returned_var_no_return_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Procedure: type = fn_type @Procedure [template] +// CHECK:STDOUT: %Procedure.type: type = fn_type @Procedure [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Procedure = struct_value () [template] +// CHECK:STDOUT: %Procedure: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -33,7 +33,7 @@ fn Procedure() { // CHECK:STDOUT: .Procedure = %Procedure.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Procedure.decl: Procedure = fn_decl @Procedure [template = constants.%struct] {} +// CHECK:STDOUT: %Procedure.decl: = fn_decl @Procedure [template = constants.%Procedure] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Procedure() { diff --git a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon index aab4804065a6..3b0acd38acbc 100644 --- a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon @@ -42,16 +42,16 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: --- fail_returned_var_shadow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %SameScope: type = fn_type @SameScope [template] -// CHECK:STDOUT: %struct.2: SameScope = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %SameScope.type: type = fn_type @SameScope [template] +// CHECK:STDOUT: %SameScope: = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal true [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] -// CHECK:STDOUT: %DifferentScopes: type = fn_type @DifferentScopes [template] -// CHECK:STDOUT: %struct.3: DifferentScopes = struct_value () [template] +// CHECK:STDOUT: %DifferentScopes.type: type = fn_type @DifferentScopes [template] +// CHECK:STDOUT: %DifferentScopes: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -61,24 +61,24 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: .DifferentScopes = %DifferentScopes.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %SameScope.decl: SameScope = fn_decl @SameScope [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %SameScope.decl: = fn_decl @SameScope [template = constants.%SameScope] { +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_32.loc11, %.loc11_19.1 [template = i32] // CHECK:STDOUT: @SameScope.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %DifferentScopes.decl: DifferentScopes = fn_decl @DifferentScopes [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc26: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %DifferentScopes.decl: = fn_decl @DifferentScopes [template = constants.%DifferentScopes] { +// CHECK:STDOUT: %int.make_type_32.loc26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc26_25.1: type = value_of_initializer %int.make_type_32.loc26 [template = i32] // CHECK:STDOUT: %.loc26_25.2: type = converted %int.make_type_32.loc26, %.loc26_25.1 [template = i32] // CHECK:STDOUT: @DifferentScopes.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -89,14 +89,14 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: if %.loc12 br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_21.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_21.2: type = converted %int.make_type_32.loc13, %.loc13_21.1 [template = i32] // CHECK:STDOUT: %v.var: ref i32 = var v // CHECK:STDOUT: %v: ref i32 = bind_name v, %v.var // CHECK:STDOUT: %.loc13_27: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: assign %v.var, %.loc13_27 -// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_21.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_21.2: type = converted %int.make_type_32.loc21, %.loc21_21.1 [template = i32] // CHECK:STDOUT: %w.var: ref i32 = var w @@ -116,7 +116,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: if %.loc27 br !if.then.loc27 else br !if.else.loc27 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc27: -// CHECK:STDOUT: %int.make_type_32.loc28: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc28: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc28_21.1: type = value_of_initializer %int.make_type_32.loc28 [template = i32] // CHECK:STDOUT: %.loc28_21.2: type = converted %int.make_type_32.loc28, %.loc28_21.1 [template = i32] // CHECK:STDOUT: %v.var: ref i32 = var v @@ -127,7 +127,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: if %.loc29 br !if.then.loc29 else br !if.else.loc29 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc29: -// CHECK:STDOUT: %int.make_type_32.loc36: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc36: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc36_23.1: type = value_of_initializer %int.make_type_32.loc36 [template = i32] // CHECK:STDOUT: %.loc36_23.2: type = converted %int.make_type_32.loc36, %.loc36_23.1 [template = i32] // CHECK:STDOUT: %w.var: ref i32 = var w diff --git a/toolchain/check/testdata/return/fail_returned_var_type.carbon b/toolchain/check/testdata/return/fail_returned_var_type.carbon index 8a183a8104af..131a6cfc2a8f 100644 --- a/toolchain/check/testdata/return/fail_returned_var_type.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_type.carbon @@ -22,14 +22,14 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: --- fail_returned_var_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Mismatch: type = fn_type @Mismatch [template] -// CHECK:STDOUT: %struct.2: Mismatch = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Mismatch.type: type = fn_type @Mismatch [template] +// CHECK:STDOUT: %Mismatch: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] -// CHECK:STDOUT: %struct.3: Float = struct_value () [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] +// CHECK:STDOUT: %Float: = struct_value () [template] // CHECK:STDOUT: %.3: f64 = float_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -39,14 +39,14 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: .Mismatch = %Mismatch.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Mismatch.decl: Mismatch = fn_decl @Mismatch [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Mismatch.decl: = fn_decl @Mismatch [template = constants.%Mismatch] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_18.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_18.2: type = converted %int.make_type_32, %.loc11_18.1 [template = i32] // CHECK:STDOUT: @Mismatch.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.3] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -54,7 +54,7 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: fn @Mismatch() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc18_19.1: i32 = int_literal 64 [template = constants.%.2] -// CHECK:STDOUT: %float.make_type: init type = call constants.%struct.3(%.loc18_19.1) [template = f64] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc18_19.1) [template = f64] // CHECK:STDOUT: %.loc18_19.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc18_19.3: type = converted %float.make_type, %.loc18_19.2 [template = f64] // CHECK:STDOUT: %v: f64 = bind_name v, diff --git a/toolchain/check/testdata/return/fail_type_mismatch.carbon b/toolchain/check/testdata/return/fail_type_mismatch.carbon index 494d0992265f..b19be4a87c79 100644 --- a/toolchain/check/testdata/return/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/return/fail_type_mismatch.carbon @@ -18,11 +18,11 @@ fn Main() -> i32 { // CHECK:STDOUT: --- fail_type_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.2: Main = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %.2: f64 = float_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -32,9 +32,9 @@ fn Main() -> i32 { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_32, %.loc11_14.1 [template = i32] // CHECK:STDOUT: @Main.%return: ref i32 = var diff --git a/toolchain/check/testdata/return/fail_value_disallowed.carbon b/toolchain/check/testdata/return/fail_value_disallowed.carbon index 634b880276bf..6bba1fdb474e 100644 --- a/toolchain/check/testdata/return/fail_value_disallowed.carbon +++ b/toolchain/check/testdata/return/fail_value_disallowed.carbon @@ -21,9 +21,9 @@ fn Main() { // CHECK:STDOUT: --- fail_value_disallowed.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Main: type = fn_type @Main [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Main = struct_value () [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -33,7 +33,7 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { diff --git a/toolchain/check/testdata/return/fail_value_missing.carbon b/toolchain/check/testdata/return/fail_value_missing.carbon index 8f7376d293db..b37d766f2876 100644 --- a/toolchain/check/testdata/return/fail_value_missing.carbon +++ b/toolchain/check/testdata/return/fail_value_missing.carbon @@ -21,11 +21,11 @@ fn Main() -> i32 { // CHECK:STDOUT: --- fail_value_missing.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.2: Main = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -34,9 +34,9 @@ fn Main() -> i32 { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_32, %.loc11_14.1 [template = i32] // CHECK:STDOUT: @Main.%return: ref i32 = var diff --git a/toolchain/check/testdata/return/fail_var_in_type.carbon b/toolchain/check/testdata/return/fail_var_in_type.carbon index 483abe966b31..1867c7f39787 100644 --- a/toolchain/check/testdata/return/fail_var_in_type.carbon +++ b/toolchain/check/testdata/return/fail_var_in_type.carbon @@ -17,11 +17,11 @@ fn Six() -> x { return 6; } // CHECK:STDOUT: --- fail_var_in_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Six: type = fn_type @Six [template] -// CHECK:STDOUT: %struct.2: Six = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Six.type: type = fn_type @Six [template] +// CHECK:STDOUT: %Six: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -34,8 +34,8 @@ fn Six() -> x { return 6; } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %x.var: ref type = var x // CHECK:STDOUT: %x: ref type = bind_name x, %x.var -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Six.decl: Six = fn_decl @Six [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Six.decl: = fn_decl @Six [template = constants.%Six] { // CHECK:STDOUT: %x.ref: ref type = name_ref x, %x // CHECK:STDOUT: %.loc15: type = bind_value %x.ref // CHECK:STDOUT: @Six.%return: ref = var @@ -52,7 +52,7 @@ fn Six() -> x { return 6; } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: assign file.%x.var, %int.make_type_32 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/return/missing_return_no_return_type.carbon b/toolchain/check/testdata/return/missing_return_no_return_type.carbon index 7a6422f363a9..f9e5e894f6b5 100644 --- a/toolchain/check/testdata/return/missing_return_no_return_type.carbon +++ b/toolchain/check/testdata/return/missing_return_no_return_type.carbon @@ -14,9 +14,9 @@ fn F() { // CHECK:STDOUT: --- missing_return_no_return_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -25,7 +25,7 @@ fn F() { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { diff --git a/toolchain/check/testdata/return/no_value.carbon b/toolchain/check/testdata/return/no_value.carbon index e6a3f95eec6c..20b4d61e12ca 100644 --- a/toolchain/check/testdata/return/no_value.carbon +++ b/toolchain/check/testdata/return/no_value.carbon @@ -15,9 +15,9 @@ fn Main() { // CHECK:STDOUT: --- no_value.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Main: type = fn_type @Main [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Main = struct_value () [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -26,7 +26,7 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { diff --git a/toolchain/check/testdata/return/returned_var.carbon b/toolchain/check/testdata/return/returned_var.carbon index 0767bb2cef8a..a1c21538d56a 100644 --- a/toolchain/check/testdata/return/returned_var.carbon +++ b/toolchain/check/testdata/return/returned_var.carbon @@ -27,19 +27,19 @@ fn G() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = unbound_element_type C, i32 [template] // CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: i32} [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.4: type = ptr_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %.5: i32 = int_literal 1 [template] // CHECK:STDOUT: %.6: i32 = int_literal 2 [template] -// CHECK:STDOUT: %struct.3: C = struct_value (%.5, %.6) [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.4: G = struct_value () [template] +// CHECK:STDOUT: %struct: C = struct_value (%.5, %.6) [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.7: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -52,28 +52,28 @@ fn G() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: @F.%return: ref C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.4] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc21_11.2: type = converted %int.make_type_32, %.loc21_11.1 [template = i32] // CHECK:STDOUT: @G.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32.loc12, %.loc12_10.1 [template = i32] // CHECK:STDOUT: %.loc12_8: = field_decl a, element0 [template] -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] // CHECK:STDOUT: %.loc13_8: = field_decl b, element1 [template] @@ -97,15 +97,15 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc17_43.3: init i32 = initialize_from %.loc17_34 to %.loc17_43.2 [template = constants.%.5] // CHECK:STDOUT: %.loc17_43.4: ref i32 = class_element_access %return, element1 // CHECK:STDOUT: %.loc17_43.5: init i32 = initialize_from %.loc17_42 to %.loc17_43.4 [template = constants.%.6] -// CHECK:STDOUT: %.loc17_43.6: init C = class_init (%.loc17_43.3, %.loc17_43.5), %return [template = constants.%struct.3] -// CHECK:STDOUT: %.loc17_44: init C = converted %.loc17_43.1, %.loc17_43.6 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc17_43.6: init C = class_init (%.loc17_43.3, %.loc17_43.5), %return [template = constants.%struct] +// CHECK:STDOUT: %.loc17_44: init C = converted %.loc17_43.1, %.loc17_43.6 [template = constants.%struct] // CHECK:STDOUT: assign %return, %.loc17_44 // CHECK:STDOUT: return %result to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_24.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc22_24.2: type = converted %int.make_type_32, %.loc22_24.1 [template = i32] // CHECK:STDOUT: %result.var: ref i32 = var result diff --git a/toolchain/check/testdata/return/returned_var_scope.carbon b/toolchain/check/testdata/return/returned_var_scope.carbon index 7d41b342045a..26e5c4ba5877 100644 --- a/toolchain/check/testdata/return/returned_var_scope.carbon +++ b/toolchain/check/testdata/return/returned_var_scope.carbon @@ -30,18 +30,18 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: --- returned_var_scope.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %UnrelatedScopes: type = fn_type @UnrelatedScopes [template] -// CHECK:STDOUT: %struct.2: UnrelatedScopes = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %UnrelatedScopes.type: type = fn_type @UnrelatedScopes [template] +// CHECK:STDOUT: %UnrelatedScopes: = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal true [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct.3: Bool = struct_value () [template] -// CHECK:STDOUT: %EnclosingButAfter: type = fn_type @EnclosingButAfter [template] -// CHECK:STDOUT: %struct.4: EnclosingButAfter = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %EnclosingButAfter.type: type = fn_type @EnclosingButAfter [template] +// CHECK:STDOUT: %EnclosingButAfter: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -51,30 +51,30 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: .EnclosingButAfter = %EnclosingButAfter.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %UnrelatedScopes.decl: UnrelatedScopes = fn_decl @UnrelatedScopes [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %UnrelatedScopes.decl: = fn_decl @UnrelatedScopes [template = constants.%UnrelatedScopes] { +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_25.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_25.2: type = converted %int.make_type_32.loc11, %.loc11_25.1 [template = i32] // CHECK:STDOUT: @UnrelatedScopes.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %EnclosingButAfter.decl: EnclosingButAfter = fn_decl @EnclosingButAfter [template = constants.%struct.4] { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct.3() [template = bool] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %EnclosingButAfter.decl: = fn_decl @EnclosingButAfter [template = constants.%EnclosingButAfter] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc21_25.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc21_25.2: type = converted %bool.make_type, %.loc21_25.1 [template = bool] // CHECK:STDOUT: %b.loc21_22.1: bool = param b // CHECK:STDOUT: @EnclosingButAfter.%b: bool = bind_name b, %b.loc21_22.1 -// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_34.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_34.2: type = converted %int.make_type_32.loc21, %.loc21_34.1 [template = i32] // CHECK:STDOUT: @EnclosingButAfter.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -85,7 +85,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: if %.loc12 br !if.then.loc12 else br !if.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc12: -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_21.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_21.2: type = converted %int.make_type_32.loc13, %.loc13_21.1 [template = i32] // CHECK:STDOUT: %v.var: ref i32 = var v @@ -99,7 +99,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: if %.loc15 br !if.then.loc15 else br !if.else.loc15 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc15: -// CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_21.1: type = value_of_initializer %int.make_type_32.loc16 [template = i32] // CHECK:STDOUT: %.loc16_21.2: type = converted %int.make_type_32.loc16, %.loc16_21.1 [template = i32] // CHECK:STDOUT: %w.var: ref i32 = var w @@ -121,7 +121,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: if %b.ref br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// CHECK:STDOUT: %int.make_type_32.loc23: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_21.1: type = value_of_initializer %int.make_type_32.loc23 [template = i32] // CHECK:STDOUT: %.loc23_21.2: type = converted %int.make_type_32.loc23, %.loc23_21.1 [template = i32] // CHECK:STDOUT: %v.var: ref i32 = var v @@ -132,7 +132,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: return %.loc23_18 // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %int.make_type_32.loc26: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc26_19.1: type = value_of_initializer %int.make_type_32.loc26 [template = i32] // CHECK:STDOUT: %.loc26_19.2: type = converted %int.make_type_32.loc26, %.loc26_19.1 [template = i32] // CHECK:STDOUT: %w.var: ref i32 = var w diff --git a/toolchain/check/testdata/return/struct.carbon b/toolchain/check/testdata/return/struct.carbon index d86db3487b4e..92321581182b 100644 --- a/toolchain/check/testdata/return/struct.carbon +++ b/toolchain/check/testdata/return/struct.carbon @@ -15,14 +15,14 @@ fn Main() -> {.a: i32} { // CHECK:STDOUT: --- struct.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.2: Main = struct_value () [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 3 [template] -// CHECK:STDOUT: %struct.3: {.a: i32} = struct_value (%.3) [template] +// CHECK:STDOUT: %struct: {.a: i32} = struct_value (%.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -31,9 +31,9 @@ fn Main() -> {.a: i32} { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_32, %.loc11_19.1 [template = i32] // CHECK:STDOUT: %.loc11_22: type = struct_type {.a: i32} [template = constants.%.2] @@ -47,8 +47,8 @@ fn Main() -> {.a: i32} { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc12_16: i32 = int_literal 3 [template = constants.%.3] // CHECK:STDOUT: %.loc12_17: {.a: i32} = struct_literal (%.loc12_16) -// CHECK:STDOUT: %struct: {.a: i32} = struct_value (%.loc12_16) [template = constants.%struct.3] -// CHECK:STDOUT: %.loc12_18: {.a: i32} = converted %.loc12_17, %struct [template = constants.%struct.3] +// CHECK:STDOUT: %struct: {.a: i32} = struct_value (%.loc12_16) [template = constants.%struct] +// CHECK:STDOUT: %.loc12_18: {.a: i32} = converted %.loc12_17, %struct [template = constants.%struct] // CHECK:STDOUT: return %.loc12_18 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/tuple.carbon b/toolchain/check/testdata/return/tuple.carbon index 85950159a157..cc551b6938c8 100644 --- a/toolchain/check/testdata/return/tuple.carbon +++ b/toolchain/check/testdata/return/tuple.carbon @@ -16,13 +16,13 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: --- tuple.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.2: Main = struct_value () [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %.4: type = ptr_type (i32, i32) [template] // CHECK:STDOUT: %.5: i32 = int_literal 15 [template] // CHECK:STDOUT: %.6: i32 = int_literal 35 [template] @@ -35,11 +35,11 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc12_15: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc12_20: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] { +// CHECK:STDOUT: %int.make_type_32.loc12_15: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc12_20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_23.1: (type, type) = tuple_literal (%int.make_type_32.loc12_15, %int.make_type_32.loc12_20) // CHECK:STDOUT: %.loc12_23.2: type = value_of_initializer %int.make_type_32.loc12_15 [template = i32] // CHECK:STDOUT: %.loc12_23.3: type = converted %int.make_type_32.loc12_15, %.loc12_23.2 [template = i32] diff --git a/toolchain/check/testdata/return/value.carbon b/toolchain/check/testdata/return/value.carbon index 5dca0284b3fd..e0057bd0bad3 100644 --- a/toolchain/check/testdata/return/value.carbon +++ b/toolchain/check/testdata/return/value.carbon @@ -15,11 +15,11 @@ fn Main() -> i32 { // CHECK:STDOUT: --- value.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.2: Main = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -29,9 +29,9 @@ fn Main() -> i32 { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] { +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_32, %.loc11_14.1 [template = i32] // CHECK:STDOUT: @Main.%return: ref i32 = var diff --git a/toolchain/check/testdata/struct/fail_access_into_invalid.carbon b/toolchain/check/testdata/struct/fail_access_into_invalid.carbon index eeec4eb77c73..8f2245f4f65a 100644 --- a/toolchain/check/testdata/struct/fail_access_into_invalid.carbon +++ b/toolchain/check/testdata/struct/fail_access_into_invalid.carbon @@ -17,9 +17,9 @@ fn F() { a.b; } // CHECK:STDOUT: --- fail_access_into_invalid.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -28,7 +28,7 @@ fn F() { a.b; } // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { diff --git a/toolchain/check/testdata/struct/fail_assign_empty.carbon b/toolchain/check/testdata/struct/fail_assign_empty.carbon index 47b51eedb93c..9d05e7a525a0 100644 --- a/toolchain/check/testdata/struct/fail_assign_empty.carbon +++ b/toolchain/check/testdata/struct/fail_assign_empty.carbon @@ -16,9 +16,9 @@ var x: {.a: i32} = {}; // CHECK:STDOUT: --- fail_assign_empty.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %.3: type = struct_type {} [template] // CHECK:STDOUT: } @@ -29,8 +29,8 @@ var x: {.a: i32} = {}; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_32, %.loc14_13.1 [template = i32] // CHECK:STDOUT: %.loc14_16: type = struct_type {.a: i32} [template = constants.%.2] diff --git a/toolchain/check/testdata/struct/fail_duplicate_name.carbon b/toolchain/check/testdata/struct/fail_duplicate_name.carbon index 576f6a657cfc..6e050538ea37 100644 --- a/toolchain/check/testdata/struct/fail_duplicate_name.carbon +++ b/toolchain/check/testdata/struct/fail_duplicate_name.carbon @@ -55,11 +55,11 @@ var y: {.b: i32, .c: i32} = {.b = 3, .b = 4}; // CHECK:STDOUT: --- fail_duplicate_name.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: %.3: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %.4: i32 = int_literal 2 [template] @@ -77,60 +77,60 @@ var y: {.b: i32, .c: i32} = {.b = 3, .b = 4}; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc18_16: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc18_16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_16.1: type = value_of_initializer %int.make_type_32.loc18_16 [template = i32] // CHECK:STDOUT: %.loc18_16.2: type = converted %int.make_type_32.loc18_16, %.loc18_16.1 [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc18_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc18_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_27.1: type = value_of_initializer %int.make_type_32.loc18_27 [template = i32] // CHECK:STDOUT: %.loc18_27.2: type = converted %int.make_type_32.loc18_27, %.loc18_27.1 [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc18_36: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc18_36: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_36.1: type = value_of_initializer %int.make_type_32.loc18_36 [template = i32] // CHECK:STDOUT: %.loc18_36.2: type = converted %int.make_type_32.loc18_36, %.loc18_36.1 [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc18_47: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc18_47: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_47.1: type = value_of_initializer %int.make_type_32.loc18_47 [template = i32] // CHECK:STDOUT: %.loc18_47.2: type = converted %int.make_type_32.loc18_47, %.loc18_47.1 [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc18_56: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc18_56: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_56.1: type = value_of_initializer %int.make_type_32.loc18_56 [template = i32] // CHECK:STDOUT: %.loc18_56.2: type = converted %int.make_type_32.loc18_56, %.loc18_56.1 [template = i32] // CHECK:STDOUT: @F.%return: ref = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc27_13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc27_13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc27_13.1: type = value_of_initializer %int.make_type_32.loc27_13 [template = i32] // CHECK:STDOUT: %.loc27_13.2: type = converted %int.make_type_32.loc27_13, %.loc27_13.1 [template = i32] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc27_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc27_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc27_22.1: type = value_of_initializer %int.make_type_32.loc27_22 [template = i32] // CHECK:STDOUT: %.loc27_22.2: type = converted %int.make_type_32.loc27_22, %.loc27_22.1 [template = i32] // CHECK:STDOUT: %.loc27_35: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc27_36: {.a: i32} = struct_literal (%.loc27_35) // CHECK:STDOUT: %v: = bind_name v, -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc36: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc36: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc36_8.1: type = value_of_initializer %int.make_type_32.loc36 [template = i32] // CHECK:STDOUT: %.loc36_8.2: type = converted %int.make_type_32.loc36, %.loc36_8.1 [template = i32] // CHECK:STDOUT: %.loc36_22: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc36_32: i32 = int_literal 2 [template = constants.%.4] // CHECK:STDOUT: %w: i32 = bind_name w, -// CHECK:STDOUT: %import_ref.9: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc45: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc45: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc45_13.1: type = value_of_initializer %int.make_type_32.loc45 [template = i32] // CHECK:STDOUT: %.loc45_13.2: type = converted %int.make_type_32.loc45, %.loc45_13.1 [template = i32] // CHECK:STDOUT: %.loc45_16: type = struct_type {.a: i32} [template = constants.%.3] // CHECK:STDOUT: %x.var: ref {.a: i32} = var x // CHECK:STDOUT: %x: ref {.a: i32} = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.10: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc53_13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc53_13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc53_13.1: type = value_of_initializer %int.make_type_32.loc53_13 [template = i32] // CHECK:STDOUT: %.loc53_13.2: type = converted %int.make_type_32.loc53_13, %.loc53_13.1 [template = i32] -// CHECK:STDOUT: %import_ref.11: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc53_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc53_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc53_22.1: type = value_of_initializer %int.make_type_32.loc53_22 [template = i32] // CHECK:STDOUT: %.loc53_22.2: type = converted %int.make_type_32.loc53_22, %.loc53_22.1 [template = i32] // CHECK:STDOUT: %.loc53_25: type = struct_type {.b: i32, .c: i32} [template = constants.%.5] diff --git a/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon b/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon index cebd220a1b25..2051d5b4a7dd 100644 --- a/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon +++ b/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon @@ -22,9 +22,9 @@ var y: {.b: i32} = x; // CHECK:STDOUT: --- fail_field_name_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] // CHECK:STDOUT: %.4: type = struct_type {.b: i32} [template] @@ -37,15 +37,15 @@ var y: {.b: i32} = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_13.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_13.2: type = converted %int.make_type_32.loc15, %.loc15_13.1 [template = i32] // CHECK:STDOUT: %.loc15_16: type = struct_type {.a: i32} [template = constants.%.2] // CHECK:STDOUT: %x.var: ref {.a: i32} = var x // CHECK:STDOUT: %x: ref {.a: i32} = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc20_13.1: type = value_of_initializer %int.make_type_32.loc20 [template = i32] // CHECK:STDOUT: %.loc20_13.2: type = converted %int.make_type_32.loc20, %.loc20_13.1 [template = i32] // CHECK:STDOUT: %.loc20_16: type = struct_type {.b: i32} [template = constants.%.4] diff --git a/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon b/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon index 1407f80ed901..bc48b07a4ebe 100644 --- a/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon +++ b/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon @@ -16,9 +16,9 @@ var x: {.a: i32} = {.b = 1.0}; // CHECK:STDOUT: --- fail_field_type_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %.3: f64 = float_literal 1 [template] // CHECK:STDOUT: %.4: type = struct_type {.b: f64} [template] @@ -30,8 +30,8 @@ var x: {.a: i32} = {.b = 1.0}; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_32, %.loc14_13.1 [template = i32] // CHECK:STDOUT: %.loc14_16: type = struct_type {.a: i32} [template = constants.%.2] diff --git a/toolchain/check/testdata/struct/fail_member_access_type.carbon b/toolchain/check/testdata/struct/fail_member_access_type.carbon index 627217bd344b..d5a5a3af71d6 100644 --- a/toolchain/check/testdata/struct/fail_member_access_type.carbon +++ b/toolchain/check/testdata/struct/fail_member_access_type.carbon @@ -18,14 +18,14 @@ var y: i32 = x.b; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Float = struct_value () [template] +// CHECK:STDOUT: %Float: = struct_value () [template] // CHECK:STDOUT: %.3: type = struct_type {.a: f64} [template] // CHECK:STDOUT: %.4: f64 = float_literal 4 [template] -// CHECK:STDOUT: %struct.2: {.a: f64} = struct_value (%.4) [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.3: Int32 = struct_value () [template] +// CHECK:STDOUT: %struct: {.a: f64} = struct_value (%.4) [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -36,15 +36,15 @@ var y: i32 = x.b; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %.loc11_13.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.1: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %float.make_type: init type = call constants.%struct.1(%.loc11_13.1) [template = f64] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc11_13.1) [template = f64] // CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc11_13.3: type = converted %float.make_type, %.loc11_13.2 [template = f64] // CHECK:STDOUT: %.loc11_16: type = struct_type {.a: f64} [template = constants.%.3] // CHECK:STDOUT: %x.var: ref {.a: f64} = var x // CHECK:STDOUT: %x: ref {.a: f64} = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct.3() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_32, %.loc15_8.1 [template = i32] // CHECK:STDOUT: %y.var: ref i32 = var y @@ -59,8 +59,8 @@ var y: i32 = x.b; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_26: f64 = float_literal 4 [template = constants.%.4] // CHECK:STDOUT: %.loc11_29.1: {.a: f64} = struct_literal (%.loc11_26) -// CHECK:STDOUT: %.loc11_29.2: init {.a: f64} = struct_init (%.loc11_26) to file.%x.var [template = constants.%struct.2] -// CHECK:STDOUT: %.loc11_30: init {.a: f64} = converted %.loc11_29.1, %.loc11_29.2 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc11_29.2: init {.a: f64} = struct_init (%.loc11_26) to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc11_30: init {.a: f64} = converted %.loc11_29.1, %.loc11_29.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc11_30 // CHECK:STDOUT: %x.ref: ref {.a: f64} = name_ref x, file.%x // CHECK:STDOUT: assign file.%y.var, diff --git a/toolchain/check/testdata/struct/fail_member_of_function.carbon b/toolchain/check/testdata/struct/fail_member_of_function.carbon index 2f6c8f39cf42..51530161b291 100644 --- a/toolchain/check/testdata/struct/fail_member_of_function.carbon +++ b/toolchain/check/testdata/struct/fail_member_of_function.carbon @@ -18,9 +18,9 @@ fn A() { // CHECK:STDOUT: --- fail_member_of_function.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %A: type = fn_type @A [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: A = struct_value () [template] +// CHECK:STDOUT: %A: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -29,12 +29,12 @@ fn A() { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct] {} +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: A = name_ref A, file.%A.decl [template = constants.%struct] +// CHECK:STDOUT: %A.ref: = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/fail_non_member_access.carbon b/toolchain/check/testdata/struct/fail_non_member_access.carbon index 2e4be71ef444..484354b11576 100644 --- a/toolchain/check/testdata/struct/fail_non_member_access.carbon +++ b/toolchain/check/testdata/struct/fail_non_member_access.carbon @@ -17,12 +17,12 @@ var y: i32 = x.b; // CHECK:STDOUT: --- fail_non_member_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %.3: i32 = int_literal 4 [template] -// CHECK:STDOUT: %struct.2: {.a: i32} = struct_value (%.3) [template] +// CHECK:STDOUT: %struct: {.a: i32} = struct_value (%.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -32,15 +32,15 @@ var y: i32 = x.b; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_32.loc11, %.loc11_13.1 [template = i32] // CHECK:STDOUT: %.loc11_16: type = struct_type {.a: i32} [template = constants.%.2] // CHECK:STDOUT: %x.var: ref {.a: i32} = var x // CHECK:STDOUT: %x: ref {.a: i32} = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_32.loc15, %.loc15_8.1 [template = i32] // CHECK:STDOUT: %y.var: ref i32 = var y @@ -53,8 +53,8 @@ var y: i32 = x.b; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_26: i32 = int_literal 4 [template = constants.%.3] // CHECK:STDOUT: %.loc11_27.1: {.a: i32} = struct_literal (%.loc11_26) -// CHECK:STDOUT: %.loc11_27.2: init {.a: i32} = struct_init (%.loc11_26) to file.%x.var [template = constants.%struct.2] -// CHECK:STDOUT: %.loc11_28: init {.a: i32} = converted %.loc11_27.1, %.loc11_27.2 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc11_27.2: init {.a: i32} = struct_init (%.loc11_26) to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc11_28: init {.a: i32} = converted %.loc11_27.1, %.loc11_27.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc11_28 // CHECK:STDOUT: %x.ref: ref {.a: i32} = name_ref x, file.%x // CHECK:STDOUT: assign file.%y.var, diff --git a/toolchain/check/testdata/struct/fail_too_few_values.carbon b/toolchain/check/testdata/struct/fail_too_few_values.carbon index 000fc764fd5b..cfebef0c7297 100644 --- a/toolchain/check/testdata/struct/fail_too_few_values.carbon +++ b/toolchain/check/testdata/struct/fail_too_few_values.carbon @@ -16,9 +16,9 @@ var x: {.a: i32, .b: i32} = {.a = 1}; // CHECK:STDOUT: --- fail_too_few_values.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %.3: type = ptr_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] @@ -31,12 +31,12 @@ var x: {.a: i32, .b: i32} = {.a = 1}; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc14_13: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc14_13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_32.loc14_13 [template = i32] // CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_32.loc14_13, %.loc14_13.1 [template = i32] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc14_22: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc14_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_22.1: type = value_of_initializer %int.make_type_32.loc14_22 [template = i32] // CHECK:STDOUT: %.loc14_22.2: type = converted %int.make_type_32.loc14_22, %.loc14_22.1 [template = i32] // CHECK:STDOUT: %.loc14_25: type = struct_type {.a: i32, .b: i32} [template = constants.%.2] diff --git a/toolchain/check/testdata/struct/fail_type_assign.carbon b/toolchain/check/testdata/struct/fail_type_assign.carbon index 2387842a07cc..7e3f023775ee 100644 --- a/toolchain/check/testdata/struct/fail_type_assign.carbon +++ b/toolchain/check/testdata/struct/fail_type_assign.carbon @@ -16,9 +16,9 @@ var x: {.a: i32} = {.a: i32}; // CHECK:STDOUT: --- fail_type_assign.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -28,21 +28,21 @@ var x: {.a: i32} = {.a: i32}; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_32, %.loc14_13.1 [template = i32] // CHECK:STDOUT: %.loc14_16: type = struct_type {.a: i32} [template = constants.%.2] // CHECK:STDOUT: %x.var: ref {.a: i32} = var x // CHECK:STDOUT: %x: ref {.a: i32} = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_25.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_25.2: type = converted %int.make_type_32, %.loc14_25.1 [template = i32] // CHECK:STDOUT: %.loc14_28: type = struct_type {.a: i32} [template = constants.%.2] diff --git a/toolchain/check/testdata/struct/import.carbon b/toolchain/check/testdata/struct/import.carbon index aac58c73b6b5..ca8b18eb300d 100644 --- a/toolchain/check/testdata/struct/import.carbon +++ b/toolchain/check/testdata/struct/import.carbon @@ -26,12 +26,12 @@ var b: {.a: {.b: i32, .c: (i32,)}, .d: i32} = b_ref; // CHECK:STDOUT: --- implicit.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %.3: i32 = int_literal 0 [template] -// CHECK:STDOUT: %struct.2: {.a: i32} = struct_value (%.3) [template] +// CHECK:STDOUT: %struct.1: {.a: i32} = struct_value (%.3) [template] // CHECK:STDOUT: %.4: type = tuple_type (type) [template] // CHECK:STDOUT: %.5: type = tuple_type (i32) [template] // CHECK:STDOUT: %.6: type = struct_type {.b: i32, .c: (i32,)} [template] @@ -40,8 +40,8 @@ var b: {.a: {.b: i32, .c: (i32,)}, .d: i32} = b_ref; // CHECK:STDOUT: %.9: type = struct_type {.a: {.b: i32, .c: (i32,)}*, .d: i32} [template] // CHECK:STDOUT: %.10: type = ptr_type {.a: {.b: i32, .c: (i32,)}*, .d: i32} [template] // CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.3) [template] -// CHECK:STDOUT: %struct.3: {.b: i32, .c: (i32,)} = struct_value (%.3, %tuple) [template] -// CHECK:STDOUT: %struct.4: {.a: {.b: i32, .c: (i32,)}, .d: i32} = struct_value (%struct.3, %.3) [template] +// CHECK:STDOUT: %struct.2: {.b: i32, .c: (i32,)} = struct_value (%.3, %tuple) [template] +// CHECK:STDOUT: %struct.3: {.a: {.b: i32, .c: (i32,)}, .d: i32} = struct_value (%struct.2, %.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -51,26 +51,26 @@ var b: {.a: {.b: i32, .c: (i32,)}, .d: i32} = b_ref; // CHECK:STDOUT: .b_ref = %b_ref // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_17.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_17.2: type = converted %int.make_type_32.loc4, %.loc4_17.1 [template = i32] // CHECK:STDOUT: %.loc4_20: type = struct_type {.a: i32} [template = constants.%.2] // CHECK:STDOUT: %a_ref.var: ref {.a: i32} = var a_ref // CHECK:STDOUT: %a_ref: ref {.a: i32} = bind_name a_ref, %a_ref.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc5_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_22.1: type = value_of_initializer %int.make_type_32.loc5_22 [template = i32] // CHECK:STDOUT: %.loc5_22.2: type = converted %int.make_type_32.loc5_22, %.loc5_22.1 [template = i32] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc5_32: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_36.1: (type,) = tuple_literal (%int.make_type_32.loc5_32) // CHECK:STDOUT: %.loc5_36.2: type = value_of_initializer %int.make_type_32.loc5_32 [template = i32] // CHECK:STDOUT: %.loc5_36.3: type = converted %int.make_type_32.loc5_32, %.loc5_36.2 [template = i32] // CHECK:STDOUT: %.loc5_36.4: type = converted %.loc5_36.1, constants.%.5 [template = constants.%.5] // CHECK:STDOUT: %.loc5_37: type = struct_type {.b: i32, .c: (i32,)} [template = constants.%.6] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc5_44: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5_44: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_44.1: type = value_of_initializer %int.make_type_32.loc5_44 [template = i32] // CHECK:STDOUT: %.loc5_44.2: type = converted %int.make_type_32.loc5_44, %.loc5_44.1 [template = i32] // CHECK:STDOUT: %.loc5_47: type = struct_type {.a: {.b: i32, .c: (i32,)}, .d: i32} [template = constants.%.7] @@ -84,8 +84,8 @@ var b: {.a: {.b: i32, .c: (i32,)}, .d: i32} = b_ref; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc4_30: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %.loc4_31.1: {.a: i32} = struct_literal (%.loc4_30) -// CHECK:STDOUT: %.loc4_31.2: init {.a: i32} = struct_init (%.loc4_30) to file.%a_ref.var [template = constants.%struct.2] -// CHECK:STDOUT: %.loc4_32: init {.a: i32} = converted %.loc4_31.1, %.loc4_31.2 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc4_31.2: init {.a: i32} = struct_init (%.loc4_30) to file.%a_ref.var [template = constants.%struct.1] +// CHECK:STDOUT: %.loc4_32: init {.a: i32} = converted %.loc4_31.1, %.loc4_31.2 [template = constants.%struct.1] // CHECK:STDOUT: assign file.%a_ref.var, %.loc4_32 // CHECK:STDOUT: %.loc6_17: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %.loc6_26: i32 = int_literal 0 [template = constants.%.3] @@ -100,12 +100,12 @@ var b: {.a: {.b: i32, .c: (i32,)}, .d: i32} = b_ref; // CHECK:STDOUT: %.loc6_28.2: init (i32,) = tuple_init (%.loc6_26) to %.loc6_29.4 [template = constants.%tuple] // CHECK:STDOUT: %.loc6_29.5: init (i32,) = converted %.loc6_28.1, %.loc6_28.2 [template = constants.%tuple] // CHECK:STDOUT: %.loc6_29.6: init (i32,) = initialize_from %.loc6_29.5 to %.loc6_29.4 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_29.7: init {.b: i32, .c: (i32,)} = struct_init (%.loc6_29.3, %.loc6_29.6) to %.loc6_38.2 [template = constants.%struct.3] -// CHECK:STDOUT: %.loc6_38.3: init {.b: i32, .c: (i32,)} = converted %.loc6_29.1, %.loc6_29.7 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc6_29.7: init {.b: i32, .c: (i32,)} = struct_init (%.loc6_29.3, %.loc6_29.6) to %.loc6_38.2 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc6_38.3: init {.b: i32, .c: (i32,)} = converted %.loc6_29.1, %.loc6_29.7 [template = constants.%struct.2] // CHECK:STDOUT: %.loc6_38.4: ref i32 = struct_access file.%b_ref.var, element1 // CHECK:STDOUT: %.loc6_38.5: init i32 = initialize_from %.loc6_37 to %.loc6_38.4 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_38.6: init {.a: {.b: i32, .c: (i32,)}, .d: i32} = struct_init (%.loc6_38.3, %.loc6_38.5) to file.%b_ref.var [template = constants.%struct.4] -// CHECK:STDOUT: %.loc6_39: init {.a: {.b: i32, .c: (i32,)}, .d: i32} = converted %.loc6_38.1, %.loc6_38.6 [template = constants.%struct.4] +// CHECK:STDOUT: %.loc6_38.6: init {.a: {.b: i32, .c: (i32,)}, .d: i32} = struct_init (%.loc6_38.3, %.loc6_38.5) to file.%b_ref.var [template = constants.%struct.3] +// CHECK:STDOUT: %.loc6_39: init {.a: {.b: i32, .c: (i32,)}, .d: i32} = converted %.loc6_38.1, %.loc6_38.6 [template = constants.%struct.3] // CHECK:STDOUT: assign file.%b_ref.var, %.loc6_39 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -113,9 +113,9 @@ var b: {.a: {.b: i32, .c: (i32,)}, .d: i32} = b_ref; // CHECK:STDOUT: --- implicit.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %.3: type = tuple_type (type) [template] // CHECK:STDOUT: %.4: type = tuple_type (i32) [template] @@ -137,26 +137,26 @@ var b: {.a: {.b: i32, .c: (i32,)}, .d: i32} = b_ref; // CHECK:STDOUT: %import_ref.1: ref {.a: i32} = import_ref ir0, inst+16, loaded // CHECK:STDOUT: %import_ref.2: ref {.a: {.b: i32, .c: (i32,)}, .d: i32} = import_ref ir0, inst+59, loaded // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_13.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_13.2: type = converted %int.make_type_32.loc4, %.loc4_13.1 [template = i32] // CHECK:STDOUT: %.loc4_16: type = struct_type {.a: i32} [template = constants.%.2] // CHECK:STDOUT: %a.var: ref {.a: i32} = var a // CHECK:STDOUT: %a: ref {.a: i32} = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc5_18: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_18.1: type = value_of_initializer %int.make_type_32.loc5_18 [template = i32] // CHECK:STDOUT: %.loc5_18.2: type = converted %int.make_type_32.loc5_18, %.loc5_18.1 [template = i32] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc5_28: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5_28: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_32.1: (type,) = tuple_literal (%int.make_type_32.loc5_28) // CHECK:STDOUT: %.loc5_32.2: type = value_of_initializer %int.make_type_32.loc5_28 [template = i32] // CHECK:STDOUT: %.loc5_32.3: type = converted %int.make_type_32.loc5_28, %.loc5_32.2 [template = i32] // CHECK:STDOUT: %.loc5_32.4: type = converted %.loc5_32.1, constants.%.4 [template = constants.%.4] // CHECK:STDOUT: %.loc5_33: type = struct_type {.b: i32, .c: (i32,)} [template = constants.%.5] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc5_40: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5_40: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_40.1: type = value_of_initializer %int.make_type_32.loc5_40 [template = i32] // CHECK:STDOUT: %.loc5_40.2: type = converted %int.make_type_32.loc5_40, %.loc5_40.1 [template = i32] // CHECK:STDOUT: %.loc5_43: type = struct_type {.a: {.b: i32, .c: (i32,)}, .d: i32} [template = constants.%.6] diff --git a/toolchain/check/testdata/struct/literal_member_access.carbon b/toolchain/check/testdata/struct/literal_member_access.carbon index 094fdd35ada2..a6a21cd4aefb 100644 --- a/toolchain/check/testdata/struct/literal_member_access.carbon +++ b/toolchain/check/testdata/struct/literal_member_access.carbon @@ -17,14 +17,14 @@ fn F() -> i32 { // CHECK:STDOUT: --- literal_member_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.x: i32, .y: i32, .z: i32} [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.2: G = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.3: F = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] // CHECK:STDOUT: %.4: type = ptr_type {.x: i32, .y: i32, .z: i32} [template] // CHECK:STDOUT: %.5: i32 = int_literal 3 [template] @@ -40,25 +40,25 @@ fn F() -> i32 { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11_16: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %int.make_type_32.loc11_16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_16.1: type = value_of_initializer %int.make_type_32.loc11_16 [template = i32] // CHECK:STDOUT: %.loc11_16.2: type = converted %int.make_type_32.loc11_16, %.loc11_16.1 [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc11_25: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_25.1: type = value_of_initializer %int.make_type_32.loc11_25 [template = i32] // CHECK:STDOUT: %.loc11_25.2: type = converted %int.make_type_32.loc11_25, %.loc11_25.1 [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc11_34: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_34.1: type = value_of_initializer %int.make_type_32.loc11_34 [template = i32] // CHECK:STDOUT: %.loc11_34.2: type = converted %int.make_type_32.loc11_34, %.loc11_34.1 [template = i32] // CHECK:STDOUT: %.loc11_37: type = struct_type {.x: i32, .y: i32, .z: i32} [template = constants.%.2] // CHECK:STDOUT: @G.%return: ref {.x: i32, .y: i32, .z: i32} = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.3] { -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_11.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_11.2: type = converted %int.make_type_32.loc13, %.loc13_11.1 [template = i32] // CHECK:STDOUT: @F.%return: ref i32 = var @@ -72,7 +72,7 @@ fn F() -> i32 { // CHECK:STDOUT: fn @F() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc14_16: i32 = int_literal 1 [template = constants.%.3] -// CHECK:STDOUT: %G.ref: G = name_ref G, file.%G.decl [template = constants.%struct.2] +// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %.loc14_25.1: ref {.x: i32, .y: i32, .z: i32} = temporary_storage // CHECK:STDOUT: %G.call: init {.x: i32, .y: i32, .z: i32} = call %G.ref() to %.loc14_25.1 // CHECK:STDOUT: %.loc14_34: i32 = int_literal 3 [template = constants.%.5] diff --git a/toolchain/check/testdata/struct/member_access.carbon b/toolchain/check/testdata/struct/member_access.carbon index aaf41b4eba33..b746ba3a98b8 100644 --- a/toolchain/check/testdata/struct/member_access.carbon +++ b/toolchain/check/testdata/struct/member_access.carbon @@ -16,16 +16,16 @@ var z: i32 = y; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %.1: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Float = struct_value () [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] -// CHECK:STDOUT: %struct.2: Int32 = struct_value () [template] +// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.3: type = struct_type {.a: f64, .b: i32} [template] // CHECK:STDOUT: %.4: type = ptr_type {.a: f64, .b: i32} [template] // CHECK:STDOUT: %.5: f64 = float_literal 0 [template] // CHECK:STDOUT: %.6: i32 = int_literal 1 [template] -// CHECK:STDOUT: %struct.3: {.a: f64, .b: i32} = struct_value (%.5, %.6) [template] +// CHECK:STDOUT: %struct: {.a: f64, .b: i32} = struct_value (%.5, %.6) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -37,25 +37,25 @@ var z: i32 = y; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %.loc11_13.1: i32 = int_literal 64 [template = constants.%.1] -// CHECK:STDOUT: %import_ref.1: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %float.make_type: init type = call constants.%struct.1(%.loc11_13.1) [template = f64] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc11_13.1) [template = f64] // CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc11_13.3: type = converted %float.make_type, %.loc11_13.2 [template = f64] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_22.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_22.2: type = converted %int.make_type_32.loc11, %.loc11_22.1 [template = i32] // CHECK:STDOUT: %.loc11_25: type = struct_type {.a: f64, .b: i32} [template = constants.%.3] // CHECK:STDOUT: %x.var: ref {.a: f64, .b: i32} = var x // CHECK:STDOUT: %x: ref {.a: f64, .b: i32} = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_32.loc12, %.loc12_8.1 [template = i32] // CHECK:STDOUT: %y.var: ref i32 = var y // CHECK:STDOUT: %y: ref i32 = bind_name y, %y.var -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.2] -// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%struct.2() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_8.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_8.2: type = converted %int.make_type_32.loc13, %.loc13_8.1 [template = i32] // CHECK:STDOUT: %z.var: ref i32 = var z @@ -75,8 +75,8 @@ var z: i32 = y; // CHECK:STDOUT: %.loc11_46.3: init f64 = initialize_from %.loc11_35 to %.loc11_46.2 [template = constants.%.5] // CHECK:STDOUT: %.loc11_46.4: ref i32 = struct_access file.%x.var, element1 // CHECK:STDOUT: %.loc11_46.5: init i32 = initialize_from %.loc11_45 to %.loc11_46.4 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_46.6: init {.a: f64, .b: i32} = struct_init (%.loc11_46.3, %.loc11_46.5) to file.%x.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc11_47: init {.a: f64, .b: i32} = converted %.loc11_46.1, %.loc11_46.6 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc11_46.6: init {.a: f64, .b: i32} = struct_init (%.loc11_46.3, %.loc11_46.5) to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc11_47: init {.a: f64, .b: i32} = converted %.loc11_46.1, %.loc11_46.6 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc11_47 // CHECK:STDOUT: %x.ref: ref {.a: f64, .b: i32} = name_ref x, file.%x // CHECK:STDOUT: %.loc12_15.1: ref i32 = struct_access %x.ref, element1 diff --git a/toolchain/check/testdata/struct/nested_struct_in_place.carbon b/toolchain/check/testdata/struct/nested_struct_in_place.carbon index 6335abd88ac5..b8134d1fc47e 100644 --- a/toolchain/check/testdata/struct/nested_struct_in_place.carbon +++ b/toolchain/check/testdata/struct/nested_struct_in_place.carbon @@ -17,15 +17,15 @@ fn G() { // CHECK:STDOUT: --- nested_struct_in_place.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type, type, type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32, i32, i32) [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.4: type = struct_type {.a: (i32, i32, i32), .b: (i32, i32, i32)} [template] // CHECK:STDOUT: %.5: type = ptr_type (i32, i32, i32) [template] // CHECK:STDOUT: %.6: type = struct_type {.a: (i32, i32, i32)*, .b: (i32, i32, i32)*} [template] @@ -39,13 +39,13 @@ fn G() { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11_12: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc11_17: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc11_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc11_12: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_17: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_25.1: (type, type, type) = tuple_literal (%int.make_type_32.loc11_12, %int.make_type_32.loc11_17, %int.make_type_32.loc11_22) // CHECK:STDOUT: %.loc11_25.2: type = value_of_initializer %int.make_type_32.loc11_12 [template = i32] // CHECK:STDOUT: %.loc11_25.3: type = converted %int.make_type_32.loc11_12, %.loc11_25.2 [template = i32] @@ -56,13 +56,13 @@ fn G() { // CHECK:STDOUT: %.loc11_25.8: type = converted %.loc11_25.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: @F.%return: ref (i32, i32, i32) = var // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] {} -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.9: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -71,9 +71,9 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32.loc14_16: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc14_21: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc14_26: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_16: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_21: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_29.1: (type, type, type) = tuple_literal (%int.make_type_32.loc14_16, %int.make_type_32.loc14_21, %int.make_type_32.loc14_26) // CHECK:STDOUT: %.loc14_29.2: type = value_of_initializer %int.make_type_32.loc14_16 [template = i32] // CHECK:STDOUT: %.loc14_29.3: type = converted %int.make_type_32.loc14_16, %.loc14_29.2 [template = i32] @@ -82,9 +82,9 @@ fn G() { // CHECK:STDOUT: %.loc14_29.6: type = value_of_initializer %int.make_type_32.loc14_26 [template = i32] // CHECK:STDOUT: %.loc14_29.7: type = converted %int.make_type_32.loc14_26, %.loc14_29.6 [template = i32] // CHECK:STDOUT: %.loc14_29.8: type = converted %.loc14_29.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_32.loc14_37: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc14_42: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc14_47: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_37: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_42: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_47: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_50.1: (type, type, type) = tuple_literal (%int.make_type_32.loc14_37, %int.make_type_32.loc14_42, %int.make_type_32.loc14_47) // CHECK:STDOUT: %.loc14_50.2: type = value_of_initializer %int.make_type_32.loc14_37 [template = i32] // CHECK:STDOUT: %.loc14_50.3: type = converted %int.make_type_32.loc14_37, %.loc14_50.2 [template = i32] @@ -96,10 +96,10 @@ fn G() { // CHECK:STDOUT: %.loc14_51: type = struct_type {.a: (i32, i32, i32), .b: (i32, i32, i32)} [template = constants.%.4] // CHECK:STDOUT: %v.var: ref {.a: (i32, i32, i32), .b: (i32, i32, i32)} = var v // CHECK:STDOUT: %v: ref {.a: (i32, i32, i32), .b: (i32, i32, i32)} = bind_name v, %v.var -// CHECK:STDOUT: %F.ref.loc14_61: F = name_ref F, file.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref.loc14_61: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc14_74.1: ref (i32, i32, i32) = struct_access %v.var, element0 // CHECK:STDOUT: %F.call.loc14_62: init (i32, i32, i32) = call %F.ref.loc14_61() to %.loc14_74.1 -// CHECK:STDOUT: %F.ref.loc14_71: F = name_ref F, file.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref.loc14_71: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc14_74.2: ref (i32, i32, i32) = struct_access %v.var, element1 // CHECK:STDOUT: %F.call.loc14_72: init (i32, i32, i32) = call %F.ref.loc14_71() to %.loc14_74.2 // CHECK:STDOUT: %.loc14_74.3: {.a: (i32, i32, i32), .b: (i32, i32, i32)} = struct_literal (%F.call.loc14_62, %F.call.loc14_72) diff --git a/toolchain/check/testdata/struct/one_entry.carbon b/toolchain/check/testdata/struct/one_entry.carbon index 1b506c7c997d..3ad16766a812 100644 --- a/toolchain/check/testdata/struct/one_entry.carbon +++ b/toolchain/check/testdata/struct/one_entry.carbon @@ -14,12 +14,12 @@ var y: {.a: i32} = x; // CHECK:STDOUT: --- one_entry.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32} [template] // CHECK:STDOUT: %.3: i32 = int_literal 4 [template] -// CHECK:STDOUT: %struct.2: {.a: i32} = struct_value (%.3) [template] +// CHECK:STDOUT: %struct: {.a: i32} = struct_value (%.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -29,15 +29,15 @@ var y: {.a: i32} = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_32.loc11, %.loc11_13.1 [template = i32] // CHECK:STDOUT: %.loc11_16: type = struct_type {.a: i32} [template = constants.%.2] // CHECK:STDOUT: %x.var: ref {.a: i32} = var x // CHECK:STDOUT: %x: ref {.a: i32} = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_32.loc12, %.loc12_13.1 [template = i32] // CHECK:STDOUT: %.loc12_16: type = struct_type {.a: i32} [template = constants.%.2] @@ -51,8 +51,8 @@ var y: {.a: i32} = x; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_26: i32 = int_literal 4 [template = constants.%.3] // CHECK:STDOUT: %.loc11_27.1: {.a: i32} = struct_literal (%.loc11_26) -// CHECK:STDOUT: %.loc11_27.2: init {.a: i32} = struct_init (%.loc11_26) to file.%x.var [template = constants.%struct.2] -// CHECK:STDOUT: %.loc11_28: init {.a: i32} = converted %.loc11_27.1, %.loc11_27.2 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc11_27.2: init {.a: i32} = struct_init (%.loc11_26) to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc11_28: init {.a: i32} = converted %.loc11_27.1, %.loc11_27.2 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc11_28 // CHECK:STDOUT: %x.ref: ref {.a: i32} = name_ref x, file.%x // CHECK:STDOUT: %.loc12_20.1: ref i32 = struct_access %x.ref, element0 diff --git a/toolchain/check/testdata/struct/reorder_fields.carbon b/toolchain/check/testdata/struct/reorder_fields.carbon index b7800bd96bec..fe698a868e9b 100644 --- a/toolchain/check/testdata/struct/reorder_fields.carbon +++ b/toolchain/check/testdata/struct/reorder_fields.carbon @@ -20,19 +20,19 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: --- reorder_fields.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] -// CHECK:STDOUT: %MakeI32: type = fn_type @MakeI32 [template] -// CHECK:STDOUT: %struct.2: MakeI32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] +// CHECK:STDOUT: %MakeI32.type: type = fn_type @MakeI32 [template] +// CHECK:STDOUT: %MakeI32: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 64 [template] -// CHECK:STDOUT: %Float: type = fn_type @Float [template] -// CHECK:STDOUT: %struct.3: Float = struct_value () [template] -// CHECK:STDOUT: %MakeF64: type = fn_type @MakeF64 [template] -// CHECK:STDOUT: %struct.4: MakeF64 = struct_value () [template] +// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] +// CHECK:STDOUT: %Float: = struct_value () [template] +// CHECK:STDOUT: %MakeF64.type: type = fn_type @MakeF64 [template] +// CHECK:STDOUT: %MakeF64: = struct_value () [template] // CHECK:STDOUT: %.3: type = struct_type {.a: i32, .b: f64} [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.5: F = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.4: type = ptr_type {.a: i32, .b: f64} [template] // CHECK:STDOUT: %.5: type = struct_type {.b: f64, .a: i32} [template] // CHECK:STDOUT: %.6: type = ptr_type {.b: f64, .a: i32} [template] @@ -46,38 +46,38 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %MakeI32.decl: MakeI32 = fn_decl @MakeI32 [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %MakeI32.decl: = fn_decl @MakeI32 [template = constants.%MakeI32] { +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_17.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_17.2: type = converted %int.make_type_32.loc11, %.loc11_17.1 [template = i32] // CHECK:STDOUT: @MakeI32.%return: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %MakeF64.decl: MakeF64 = fn_decl @MakeF64 [template = constants.%struct.4] { +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %MakeF64.decl: = fn_decl @MakeF64 [template = constants.%MakeF64] { // CHECK:STDOUT: %.loc12_17.1: i32 = int_literal 64 [template = constants.%.2] -// CHECK:STDOUT: %float.make_type.loc12: init type = call constants.%struct.3(%.loc12_17.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc12: init type = call constants.%Float(%.loc12_17.1) [template = f64] // CHECK:STDOUT: %.loc12_17.2: type = value_of_initializer %float.make_type.loc12 [template = f64] // CHECK:STDOUT: %.loc12_17.3: type = converted %float.make_type.loc12, %.loc12_17.2 [template = f64] // CHECK:STDOUT: @MakeF64.%return: ref f64 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.4: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.5] { -// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_16.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] // CHECK:STDOUT: %.loc14_16.2: type = converted %int.make_type_32.loc14, %.loc14_16.1 [template = i32] // CHECK:STDOUT: %.loc14_25.1: i32 = int_literal 64 [template = constants.%.2] -// CHECK:STDOUT: %float.make_type.loc14: init type = call constants.%struct.3(%.loc14_25.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc14: init type = call constants.%Float(%.loc14_25.1) [template = f64] // CHECK:STDOUT: %.loc14_25.2: type = value_of_initializer %float.make_type.loc14 [template = f64] // CHECK:STDOUT: %.loc14_25.3: type = converted %float.make_type.loc14, %.loc14_25.2 [template = f64] // CHECK:STDOUT: %.loc14_28: type = struct_type {.a: i32, .b: f64} [template = constants.%.3] // CHECK:STDOUT: @F.%return: ref {.a: i32, .b: f64} = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %import_ref.7: Float = import_ref ir3, inst+31, loaded [template = constants.%struct.3] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+31, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -90,17 +90,17 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %return: {.a: i32, .b: f64} { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_15.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_15.2: type = converted %int.make_type_32.loc15, %.loc15_15.1 [template = i32] // CHECK:STDOUT: %.loc15_24.1: i32 = int_literal 64 [template = constants.%.2] -// CHECK:STDOUT: %float.make_type.loc15: init type = call constants.%struct.3(%.loc15_24.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc15: init type = call constants.%Float(%.loc15_24.1) [template = f64] // CHECK:STDOUT: %.loc15_24.2: type = value_of_initializer %float.make_type.loc15 [template = f64] // CHECK:STDOUT: %.loc15_24.3: type = converted %float.make_type.loc15, %.loc15_24.2 [template = f64] // CHECK:STDOUT: %.loc15_27: type = struct_type {.a: i32, .b: f64} [template = constants.%.3] -// CHECK:STDOUT: %MakeF64.ref: MakeF64 = name_ref MakeF64, file.%MakeF64.decl [template = constants.%struct.4] +// CHECK:STDOUT: %MakeF64.ref: = name_ref MakeF64, file.%MakeF64.decl [template = constants.%MakeF64] // CHECK:STDOUT: %MakeF64.call: init f64 = call %MakeF64.ref() -// CHECK:STDOUT: %MakeI32.ref: MakeI32 = name_ref MakeI32, file.%MakeI32.decl [template = constants.%struct.2] +// CHECK:STDOUT: %MakeI32.ref: = name_ref MakeI32, file.%MakeI32.decl [template = constants.%MakeI32] // CHECK:STDOUT: %MakeI32.call: init i32 = call %MakeI32.ref() // CHECK:STDOUT: %.loc15_62.1: {.b: f64, .a: i32} = struct_literal (%MakeF64.call, %MakeI32.call) // CHECK:STDOUT: %.loc15_62.2: i32 = value_of_initializer %MakeI32.call @@ -111,10 +111,10 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: %.loc15_63: {.a: i32, .b: f64} = converted %.loc15_62.1, %struct.loc15 // CHECK:STDOUT: %x: {.a: i32, .b: f64} = bind_name x, %.loc15_63 // CHECK:STDOUT: %.loc16_15.1: i32 = int_literal 64 [template = constants.%.2] -// CHECK:STDOUT: %float.make_type.loc16: init type = call constants.%struct.3(%.loc16_15.1) [template = f64] +// CHECK:STDOUT: %float.make_type.loc16: init type = call constants.%Float(%.loc16_15.1) [template = f64] // CHECK:STDOUT: %.loc16_15.2: type = value_of_initializer %float.make_type.loc16 [template = f64] // CHECK:STDOUT: %.loc16_15.3: type = converted %float.make_type.loc16, %.loc16_15.2 [template = f64] -// CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_24.1: type = value_of_initializer %int.make_type_32.loc16 [template = i32] // CHECK:STDOUT: %.loc16_24.2: type = converted %int.make_type_32.loc16, %.loc16_24.1 [template = i32] // CHECK:STDOUT: %.loc16_27: type = struct_type {.b: f64, .a: i32} [template = constants.%.5] diff --git a/toolchain/check/testdata/struct/tuple_as_element.carbon b/toolchain/check/testdata/struct/tuple_as_element.carbon index 158daa1b9f84..bdddd110a466 100644 --- a/toolchain/check/testdata/struct/tuple_as_element.carbon +++ b/toolchain/check/testdata/struct/tuple_as_element.carbon @@ -14,9 +14,9 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: --- tuple_as_element.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32) [template] // CHECK:STDOUT: %.4: type = struct_type {.a: i32, .b: (i32,)} [template] @@ -24,7 +24,7 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: %.6: i32 = int_literal 1 [template] // CHECK:STDOUT: %.7: i32 = int_literal 2 [template] // CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.7) [template] -// CHECK:STDOUT: %struct.2: {.a: i32, .b: (i32,)} = struct_value (%.6, %tuple) [template] +// CHECK:STDOUT: %struct: {.a: i32, .b: (i32,)} = struct_value (%.6, %tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -34,12 +34,12 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc11_13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_32.loc11_13 [template = i32] // CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_32.loc11_13, %.loc11_13.1 [template = i32] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc11_23: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_27.1: (type,) = tuple_literal (%int.make_type_32.loc11_23) // CHECK:STDOUT: %.loc11_27.2: type = value_of_initializer %int.make_type_32.loc11_23 [template = i32] // CHECK:STDOUT: %.loc11_27.3: type = converted %int.make_type_32.loc11_23, %.loc11_27.2 [template = i32] @@ -47,12 +47,12 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: %.loc11_28: type = struct_type {.a: i32, .b: (i32,)} [template = constants.%.4] // CHECK:STDOUT: %x.var: ref {.a: i32, .b: (i32,)} = var x // CHECK:STDOUT: %x: ref {.a: i32, .b: (i32,)} = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc12_13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc12_13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_32.loc12_13 [template = i32] // CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_32.loc12_13, %.loc12_13.1 [template = i32] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc12_23: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc12_23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_27.1: (type,) = tuple_literal (%int.make_type_32.loc12_23) // CHECK:STDOUT: %.loc12_27.2: type = value_of_initializer %int.make_type_32.loc12_23 [template = i32] // CHECK:STDOUT: %.loc12_27.3: type = converted %int.make_type_32.loc12_23, %.loc12_27.2 [template = i32] @@ -76,8 +76,8 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: %.loc11_49.2: init (i32,) = tuple_init (%.loc11_47) to %.loc11_50.4 [template = constants.%tuple] // CHECK:STDOUT: %.loc11_50.5: init (i32,) = converted %.loc11_49.1, %.loc11_49.2 [template = constants.%tuple] // CHECK:STDOUT: %.loc11_50.6: init (i32,) = initialize_from %.loc11_50.5 to %.loc11_50.4 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_50.7: init {.a: i32, .b: (i32,)} = struct_init (%.loc11_50.3, %.loc11_50.6) to file.%x.var [template = constants.%struct.2] -// CHECK:STDOUT: %.loc11_51: init {.a: i32, .b: (i32,)} = converted %.loc11_50.1, %.loc11_50.7 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc11_50.7: init {.a: i32, .b: (i32,)} = struct_init (%.loc11_50.3, %.loc11_50.6) to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc11_51: init {.a: i32, .b: (i32,)} = converted %.loc11_50.1, %.loc11_50.7 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc11_51 // CHECK:STDOUT: %x.ref: ref {.a: i32, .b: (i32,)} = name_ref x, file.%x // CHECK:STDOUT: %.loc12_32.1: ref i32 = struct_access %x.ref, element0 diff --git a/toolchain/check/testdata/struct/two_entries.carbon b/toolchain/check/testdata/struct/two_entries.carbon index 3f435696d751..e4a03e64ccbf 100644 --- a/toolchain/check/testdata/struct/two_entries.carbon +++ b/toolchain/check/testdata/struct/two_entries.carbon @@ -17,14 +17,14 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: --- two_entries.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %.3: type = ptr_type {.a: i32, .b: i32} [template] // CHECK:STDOUT: %.4: i32 = int_literal 1 [template] // CHECK:STDOUT: %.5: i32 = int_literal 2 [template] -// CHECK:STDOUT: %struct.2: {.a: i32, .b: i32} = struct_value (%.4, %.5) [template] +// CHECK:STDOUT: %struct: {.a: i32, .b: i32} = struct_value (%.4, %.5) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -34,49 +34,49 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc11_13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_32.loc11_13 [template = i32] // CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_32.loc11_13, %.loc11_13.1 [template = i32] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc11_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_22.1: type = value_of_initializer %int.make_type_32.loc11_22 [template = i32] // CHECK:STDOUT: %.loc11_22.2: type = converted %int.make_type_32.loc11_22, %.loc11_22.1 [template = i32] // CHECK:STDOUT: %.loc11_25: type = struct_type {.a: i32, .b: i32} [template = constants.%.2] // CHECK:STDOUT: %.loc11_35: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc11_43: i32 = int_literal 2 [template = constants.%.5] // CHECK:STDOUT: %.loc11_44: {.a: i32, .b: i32} = struct_literal (%.loc11_35, %.loc11_43) -// CHECK:STDOUT: %struct: {.a: i32, .b: i32} = struct_value (%.loc11_35, %.loc11_43) [template = constants.%struct.2] -// CHECK:STDOUT: %.loc11_45: {.a: i32, .b: i32} = converted %.loc11_44, %struct [template = constants.%struct.2] +// CHECK:STDOUT: %struct: {.a: i32, .b: i32} = struct_value (%.loc11_35, %.loc11_43) [template = constants.%struct] +// CHECK:STDOUT: %.loc11_45: {.a: i32, .b: i32} = converted %.loc11_44, %struct [template = constants.%struct] // CHECK:STDOUT: %v: {.a: i32, .b: i32} = bind_name v, %.loc11_45 -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc12_13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc12_13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_32.loc12_13 [template = i32] // CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_32.loc12_13, %.loc12_13.1 [template = i32] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc12_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc12_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_22.1: type = value_of_initializer %int.make_type_32.loc12_22 [template = i32] // CHECK:STDOUT: %.loc12_22.2: type = converted %int.make_type_32.loc12_22, %.loc12_22.1 [template = i32] // CHECK:STDOUT: %.loc12_25: type = struct_type {.a: i32, .b: i32} [template = constants.%.2] // CHECK:STDOUT: %v.ref: {.a: i32, .b: i32} = name_ref v, %v // CHECK:STDOUT: %w: {.a: i32, .b: i32} = bind_name w, %v.ref -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc14_13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc14_13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_32.loc14_13 [template = i32] // CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_32.loc14_13, %.loc14_13.1 [template = i32] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc14_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc14_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_22.1: type = value_of_initializer %int.make_type_32.loc14_22 [template = i32] // CHECK:STDOUT: %.loc14_22.2: type = converted %int.make_type_32.loc14_22, %.loc14_22.1 [template = i32] // CHECK:STDOUT: %.loc14_25: type = struct_type {.a: i32, .b: i32} [template = constants.%.2] // CHECK:STDOUT: %x.var: ref {.a: i32, .b: i32} = var x // CHECK:STDOUT: %x: ref {.a: i32, .b: i32} = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc15_13: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15_13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_13.1: type = value_of_initializer %int.make_type_32.loc15_13 [template = i32] // CHECK:STDOUT: %.loc15_13.2: type = converted %int.make_type_32.loc15_13, %.loc15_13.1 [template = i32] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %int.make_type_32.loc15_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_22.1: type = value_of_initializer %int.make_type_32.loc15_22 [template = i32] // CHECK:STDOUT: %.loc15_22.2: type = converted %int.make_type_32.loc15_22, %.loc15_22.1 [template = i32] // CHECK:STDOUT: %.loc15_25: type = struct_type {.a: i32, .b: i32} [template = constants.%.2] @@ -95,8 +95,8 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %.loc14_44.3: init i32 = initialize_from %.loc14_35 to %.loc14_44.2 [template = constants.%.4] // CHECK:STDOUT: %.loc14_44.4: ref i32 = struct_access file.%x.var, element1 // CHECK:STDOUT: %.loc14_44.5: init i32 = initialize_from %.loc14_43 to %.loc14_44.4 [template = constants.%.5] -// CHECK:STDOUT: %.loc14_44.6: init {.a: i32, .b: i32} = struct_init (%.loc14_44.3, %.loc14_44.5) to file.%x.var [template = constants.%struct.2] -// CHECK:STDOUT: %.loc14_45: init {.a: i32, .b: i32} = converted %.loc14_44.1, %.loc14_44.6 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc14_44.6: init {.a: i32, .b: i32} = struct_init (%.loc14_44.3, %.loc14_44.5) to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc14_45: init {.a: i32, .b: i32} = converted %.loc14_44.1, %.loc14_44.6 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc14_45 // CHECK:STDOUT: %x.ref: ref {.a: i32, .b: i32} = name_ref x, file.%x // CHECK:STDOUT: %.loc15_29.1: ref i32 = struct_access %x.ref, element0 diff --git a/toolchain/check/testdata/tuples/fail_assign_nested.carbon b/toolchain/check/testdata/tuples/fail_assign_nested.carbon index 4c922fb17208..e98709d423eb 100644 --- a/toolchain/check/testdata/tuples/fail_assign_nested.carbon +++ b/toolchain/check/testdata/tuples/fail_assign_nested.carbon @@ -16,9 +16,9 @@ var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6)); // CHECK:STDOUT: --- fail_assign_nested.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.3: type = tuple_type ((type, type), (type, type)) [template] // CHECK:STDOUT: %.4: type = tuple_type (i32, i32) [template] @@ -42,15 +42,15 @@ var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6)); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc14_10: init type = call constants.%struct() [template = i32] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc14_15: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc14_10: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc14_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_18: (type, type) = tuple_literal (%int.make_type_32.loc14_10, %int.make_type_32.loc14_15) -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc14_22: init type = call constants.%struct() [template = i32] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc14_27: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc14_22: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc14_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_30: (type, type) = tuple_literal (%int.make_type_32.loc14_22, %int.make_type_32.loc14_27) // CHECK:STDOUT: %.loc14_31.1: ((type, type), (type, type)) = tuple_literal (%.loc14_18, %.loc14_30) // CHECK:STDOUT: %.loc14_31.2: type = value_of_initializer %int.make_type_32.loc14_10 [template = i32] diff --git a/toolchain/check/testdata/tuples/fail_element_type_mismatch.carbon b/toolchain/check/testdata/tuples/fail_element_type_mismatch.carbon index 97830a6e00fa..e6c4625d7b49 100644 --- a/toolchain/check/testdata/tuples/fail_element_type_mismatch.carbon +++ b/toolchain/check/testdata/tuples/fail_element_type_mismatch.carbon @@ -16,9 +16,9 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: --- fail_element_type_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %.4: type = ptr_type (i32, i32) [template] @@ -33,10 +33,10 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc14_9: init type = call constants.%struct() [template = i32] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc14_14: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc14_9: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc14_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_17.1: (type, type) = tuple_literal (%int.make_type_32.loc14_9, %int.make_type_32.loc14_14) // CHECK:STDOUT: %.loc14_17.2: type = value_of_initializer %int.make_type_32.loc14_9 [template = i32] // CHECK:STDOUT: %.loc14_17.3: type = converted %int.make_type_32.loc14_9, %.loc14_17.2 [template = i32] diff --git a/toolchain/check/testdata/tuples/fail_nested_incomplete.carbon b/toolchain/check/testdata/tuples/fail_nested_incomplete.carbon index e05eb05886c4..d39718b25412 100644 --- a/toolchain/check/testdata/tuples/fail_nested_incomplete.carbon +++ b/toolchain/check/testdata/tuples/fail_nested_incomplete.carbon @@ -24,9 +24,9 @@ var p: Incomplete* = &t[1]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32, Incomplete) [template] // CHECK:STDOUT: %.4: type = ptr_type Incomplete [template] @@ -42,8 +42,8 @@ var p: Incomplete* = &t[1]; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %Incomplete.decl: type = class_decl @Incomplete [template = constants.%Incomplete] {} -// CHECK:STDOUT: %import_ref: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %Incomplete.ref.loc19: type = name_ref Incomplete, %Incomplete.decl [template = constants.%Incomplete] // CHECK:STDOUT: %.loc19_24.1: (type, type) = tuple_literal (%int.make_type_32, %Incomplete.ref.loc19) // CHECK:STDOUT: %.loc19_24.2: type = value_of_initializer %int.make_type_32 [template = i32] diff --git a/toolchain/check/testdata/tuples/fail_too_few_element.carbon b/toolchain/check/testdata/tuples/fail_too_few_element.carbon index c8511b4d1326..d079bb258697 100644 --- a/toolchain/check/testdata/tuples/fail_too_few_element.carbon +++ b/toolchain/check/testdata/tuples/fail_too_few_element.carbon @@ -16,9 +16,9 @@ var x: (i32, i32) = (2, ); // CHECK:STDOUT: --- fail_too_few_element.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %.4: type = ptr_type (i32, i32) [template] @@ -32,10 +32,10 @@ var x: (i32, i32) = (2, ); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc14_9: init type = call constants.%struct() [template = i32] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc14_14: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc14_9: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc14_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_17.1: (type, type) = tuple_literal (%int.make_type_32.loc14_9, %int.make_type_32.loc14_14) // CHECK:STDOUT: %.loc14_17.2: type = value_of_initializer %int.make_type_32.loc14_9 [template = i32] // CHECK:STDOUT: %.loc14_17.3: type = converted %int.make_type_32.loc14_9, %.loc14_17.2 [template = i32] diff --git a/toolchain/check/testdata/tuples/fail_type_assign.carbon b/toolchain/check/testdata/tuples/fail_type_assign.carbon index 165afefb2ef9..b226e8143a85 100644 --- a/toolchain/check/testdata/tuples/fail_type_assign.carbon +++ b/toolchain/check/testdata/tuples/fail_type_assign.carbon @@ -16,9 +16,9 @@ var x: (i32, ) = (i32, ); // CHECK:STDOUT: --- fail_type_assign.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32) [template] // CHECK:STDOUT: } @@ -29,22 +29,22 @@ var x: (i32, ) = (i32, ); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_14.1: (type,) = tuple_literal (%int.make_type_32) // CHECK:STDOUT: %.loc14_14.2: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_14.3: type = converted %int.make_type_32, %.loc14_14.2 [template = i32] // CHECK:STDOUT: %.loc14_14.4: type = converted %.loc14_14.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %x.var: ref (i32,) = var x // CHECK:STDOUT: %x: ref (i32,) = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14: (type,) = tuple_literal (%int.make_type_32) // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/tuples/import.carbon b/toolchain/check/testdata/tuples/import.carbon index e3ea8a113ced..14898600c54e 100644 --- a/toolchain/check/testdata/tuples/import.carbon +++ b/toolchain/check/testdata/tuples/import.carbon @@ -25,9 +25,9 @@ var b: (((i32,), i32), (i32, i32)) = b_ref; // CHECK:STDOUT: --- implicit.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32) [template] // CHECK:STDOUT: %.4: i32 = int_literal 0 [template] @@ -57,24 +57,24 @@ var b: (((i32,), i32), (i32, i32)) = b_ref; // CHECK:STDOUT: .b_ref = %b_ref // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_17.1: (type,) = tuple_literal (%int.make_type_32.loc4) // CHECK:STDOUT: %.loc4_17.2: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_17.3: type = converted %int.make_type_32.loc4, %.loc4_17.2 [template = i32] // CHECK:STDOUT: %.loc4_17.4: type = converted %.loc4_17.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %a_ref.var: ref (i32,) = var a_ref // CHECK:STDOUT: %a_ref: ref (i32,) = bind_name a_ref, %a_ref.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc5_15: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_19: (type,) = tuple_literal (%int.make_type_32.loc5_15) -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc5_22: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_25: ((type,), type) = tuple_literal (%.loc5_19, %int.make_type_32.loc5_22) -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc5_29: init type = call constants.%struct() [template = i32] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc5_34: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5_29: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5_34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_37: (type, type) = tuple_literal (%int.make_type_32.loc5_29, %int.make_type_32.loc5_34) // CHECK:STDOUT: %.loc5_38.1: (((type,), type), (type, type)) = tuple_literal (%.loc5_25, %.loc5_37) // CHECK:STDOUT: %.loc5_38.2: type = value_of_initializer %int.make_type_32.loc5_15 [template = i32] @@ -135,9 +135,9 @@ var b: (((i32,), i32), (i32, i32)) = b_ref; // CHECK:STDOUT: --- implicit.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32) [template] // CHECK:STDOUT: %.4: type = tuple_type ((type,), type) [template] @@ -163,24 +163,24 @@ var b: (((i32,), i32), (i32, i32)) = b_ref; // CHECK:STDOUT: %import_ref.1: ref (i32,) = import_ref ir0, inst+16, loaded // CHECK:STDOUT: %import_ref.2: ref (((i32,), i32), (i32, i32)) = import_ref ir0, inst+60, loaded // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_13.1: (type,) = tuple_literal (%int.make_type_32.loc4) // CHECK:STDOUT: %.loc4_13.2: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_13.3: type = converted %int.make_type_32.loc4, %.loc4_13.2 [template = i32] // CHECK:STDOUT: %.loc4_13.4: type = converted %.loc4_13.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %a.var: ref (i32,) = var a // CHECK:STDOUT: %a: ref (i32,) = bind_name a, %a.var -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_15: (type,) = tuple_literal (%int.make_type_32.loc5_11) -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc5_18: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_21: ((type,), type) = tuple_literal (%.loc5_15, %int.make_type_32.loc5_18) -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc5_25: init type = call constants.%struct() [template = i32] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc5_30: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5_25: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc5_30: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_33: (type, type) = tuple_literal (%int.make_type_32.loc5_25, %int.make_type_32.loc5_30) // CHECK:STDOUT: %.loc5_34.1: (((type,), type), (type, type)) = tuple_literal (%.loc5_21, %.loc5_33) // CHECK:STDOUT: %.loc5_34.2: type = value_of_initializer %int.make_type_32.loc5_11 [template = i32] diff --git a/toolchain/check/testdata/tuples/nested_tuple.carbon b/toolchain/check/testdata/tuples/nested_tuple.carbon index c15754095d24..cebaa605445b 100644 --- a/toolchain/check/testdata/tuples/nested_tuple.carbon +++ b/toolchain/check/testdata/tuples/nested_tuple.carbon @@ -13,9 +13,9 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: --- nested_tuple.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.3: type = tuple_type ((type, type), type) [template] // CHECK:STDOUT: %.4: type = tuple_type (i32, i32) [template] @@ -36,13 +36,13 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11_10: init type = call constants.%struct() [template = i32] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11_15: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_10: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_18: (type, type) = tuple_literal (%int.make_type_32.loc11_10, %int.make_type_32.loc11_15) -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11_21: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_24.1: ((type, type), type) = tuple_literal (%.loc11_18, %int.make_type_32.loc11_21) // CHECK:STDOUT: %.loc11_24.2: type = value_of_initializer %int.make_type_32.loc11_10 [template = i32] // CHECK:STDOUT: %.loc11_24.3: type = converted %int.make_type_32.loc11_10, %.loc11_24.2 [template = i32] diff --git a/toolchain/check/testdata/tuples/nested_tuple_in_place.carbon b/toolchain/check/testdata/tuples/nested_tuple_in_place.carbon index 4a48f31f3728..d55150ce522f 100644 --- a/toolchain/check/testdata/tuples/nested_tuple_in_place.carbon +++ b/toolchain/check/testdata/tuples/nested_tuple_in_place.carbon @@ -21,22 +21,22 @@ fn H() { // CHECK:STDOUT: --- nested_tuple_in_place.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type, type, type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32, i32, i32) [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.2: F = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.3: G = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] // CHECK:STDOUT: %.4: type = tuple_type ((type, type, type), (type, type, type)) [template] // CHECK:STDOUT: %.5: type = tuple_type ((i32, i32, i32), (i32, i32, i32)) [template] // CHECK:STDOUT: %.6: type = ptr_type (i32, i32, i32) [template] // CHECK:STDOUT: %.7: type = tuple_type ((i32, i32, i32)*, (i32, i32, i32)*) [template] // CHECK:STDOUT: %.8: type = ptr_type ((i32, i32, i32)*, (i32, i32, i32)*) [template] -// CHECK:STDOUT: %H: type = fn_type @H [template] -// CHECK:STDOUT: %struct.4: H = struct_value () [template] +// CHECK:STDOUT: %H.type: type = fn_type @H [template] +// CHECK:STDOUT: %H: = struct_value () [template] // CHECK:STDOUT: %.9: type = tuple_type (type, (type, type, type), type) [template] // CHECK:STDOUT: %.10: type = tuple_type (i32, (i32, i32, i32), i32) [template] // CHECK:STDOUT: %.11: type = tuple_type (i32, (i32, i32, i32)*, i32) [template] @@ -53,13 +53,13 @@ fn H() { // CHECK:STDOUT: .H = %H.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.2] { -// CHECK:STDOUT: %int.make_type_32.loc11_12: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc11_17: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc11_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %int.make_type_32.loc11_12: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_17: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc11_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_25.1: (type, type, type) = tuple_literal (%int.make_type_32.loc11_12, %int.make_type_32.loc11_17, %int.make_type_32.loc11_22) // CHECK:STDOUT: %.loc11_25.2: type = value_of_initializer %int.make_type_32.loc11_12 [template = i32] // CHECK:STDOUT: %.loc11_25.3: type = converted %int.make_type_32.loc11_12, %.loc11_25.2 [template = i32] @@ -70,19 +70,19 @@ fn H() { // CHECK:STDOUT: %.loc11_25.8: type = converted %.loc11_25.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: @F.%return: ref (i32, i32, i32) = var // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.3] {} -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.9: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %H.decl: H = fn_decl @H [template = constants.%struct.4] {} -// CHECK:STDOUT: %import_ref.10: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.11: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.12: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.13: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %import_ref.14: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct.1] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.9: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] {} +// CHECK:STDOUT: %import_ref.10: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.11: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.12: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.13: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %import_ref.14: = import_ref ir3, inst+3, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -91,13 +91,13 @@ fn H() { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32.loc14_12: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc14_17: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc14_22: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_12: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_17: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_25: (type, type, type) = tuple_literal (%int.make_type_32.loc14_12, %int.make_type_32.loc14_17, %int.make_type_32.loc14_22) -// CHECK:STDOUT: %int.make_type_32.loc14_29: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc14_34: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc14_39: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_29: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_34: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc14_39: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_42: (type, type, type) = tuple_literal (%int.make_type_32.loc14_29, %int.make_type_32.loc14_34, %int.make_type_32.loc14_39) // CHECK:STDOUT: %.loc14_43.1: ((type, type, type), (type, type, type)) = tuple_literal (%.loc14_25, %.loc14_42) // CHECK:STDOUT: %.loc14_43.2: type = value_of_initializer %int.make_type_32.loc14_12 [template = i32] @@ -117,10 +117,10 @@ fn H() { // CHECK:STDOUT: %.loc14_43.16: type = converted %.loc14_43.1, constants.%.5 [template = constants.%.5] // CHECK:STDOUT: %v.var: ref ((i32, i32, i32), (i32, i32, i32)) = var v // CHECK:STDOUT: %v: ref ((i32, i32, i32), (i32, i32, i32)) = bind_name v, %v.var -// CHECK:STDOUT: %F.ref.loc14_48: F = name_ref F, file.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref.loc14_48: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc14_56.1: ref (i32, i32, i32) = tuple_access %v.var, element0 // CHECK:STDOUT: %F.call.loc14_49: init (i32, i32, i32) = call %F.ref.loc14_48() to %.loc14_56.1 -// CHECK:STDOUT: %F.ref.loc14_53: F = name_ref F, file.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref.loc14_53: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc14_56.2: ref (i32, i32, i32) = tuple_access %v.var, element1 // CHECK:STDOUT: %F.call.loc14_54: init (i32, i32, i32) = call %F.ref.loc14_53() to %.loc14_56.2 // CHECK:STDOUT: %.loc14_56.3: ((i32, i32, i32), (i32, i32, i32)) = tuple_literal (%F.call.loc14_49, %F.call.loc14_54) @@ -132,12 +132,12 @@ fn H() { // CHECK:STDOUT: // CHECK:STDOUT: fn @H() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int.make_type_32.loc18_11: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc18_17: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc18_22: init type = call constants.%struct.1() [template = i32] -// CHECK:STDOUT: %int.make_type_32.loc18_27: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc18_11: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc18_17: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc18_22: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc18_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_30: (type, type, type) = tuple_literal (%int.make_type_32.loc18_17, %int.make_type_32.loc18_22, %int.make_type_32.loc18_27) -// CHECK:STDOUT: %int.make_type_32.loc18_33: init type = call constants.%struct.1() [template = i32] +// CHECK:STDOUT: %int.make_type_32.loc18_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_36.1: (type, (type, type, type), type) = tuple_literal (%int.make_type_32.loc18_11, %.loc18_30, %int.make_type_32.loc18_33) // CHECK:STDOUT: %.loc18_36.2: type = value_of_initializer %int.make_type_32.loc18_11 [template = i32] // CHECK:STDOUT: %.loc18_36.3: type = converted %int.make_type_32.loc18_11, %.loc18_36.2 [template = i32] @@ -154,7 +154,7 @@ fn H() { // CHECK:STDOUT: %v.var: ref (i32, (i32, i32, i32), i32) = var v // CHECK:STDOUT: %v: ref (i32, (i32, i32, i32), i32) = bind_name v, %v.var // CHECK:STDOUT: %.loc18_41: i32 = int_literal 1 [template = constants.%.13] -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%F.decl [template = constants.%struct.2] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc18_50.1: ref (i32, i32, i32) = tuple_access %v.var, element1 // CHECK:STDOUT: %F.call: init (i32, i32, i32) = call %F.ref() to %.loc18_50.1 // CHECK:STDOUT: %.loc18_49: i32 = int_literal 2 [template = constants.%.14] diff --git a/toolchain/check/testdata/tuples/one_element.carbon b/toolchain/check/testdata/tuples/one_element.carbon index e9d7b45cb7e9..76efb4182a02 100644 --- a/toolchain/check/testdata/tuples/one_element.carbon +++ b/toolchain/check/testdata/tuples/one_element.carbon @@ -14,9 +14,9 @@ var y: (i32,) = x; // CHECK:STDOUT: --- one_element.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32) [template] // CHECK:STDOUT: %.4: i32 = int_literal 4 [template] @@ -30,16 +30,16 @@ var y: (i32,) = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_13.1: (type,) = tuple_literal (%int.make_type_32.loc11) // CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_13.3: type = converted %int.make_type_32.loc11, %.loc11_13.2 [template = i32] // CHECK:STDOUT: %.loc11_13.4: type = converted %.loc11_13.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %x.var: ref (i32,) = var x // CHECK:STDOUT: %x: ref (i32,) = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_13.1: (type,) = tuple_literal (%int.make_type_32.loc12) // CHECK:STDOUT: %.loc12_13.2: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_13.3: type = converted %int.make_type_32.loc12, %.loc12_13.2 [template = i32] diff --git a/toolchain/check/testdata/tuples/two_elements.carbon b/toolchain/check/testdata/tuples/two_elements.carbon index 77a181fc69a2..38e83ebab6cd 100644 --- a/toolchain/check/testdata/tuples/two_elements.carbon +++ b/toolchain/check/testdata/tuples/two_elements.carbon @@ -17,9 +17,9 @@ var y: (i32, i32) = x; // CHECK:STDOUT: --- two_elements.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32: type = fn_type @Int32 [template] +// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Int32 = struct_value () [template] +// CHECK:STDOUT: %Int32: = struct_value () [template] // CHECK:STDOUT: %.2: type = tuple_type (type, type) [template] // CHECK:STDOUT: %.3: type = tuple_type (i32, i32) [template] // CHECK:STDOUT: %.4: type = ptr_type (i32, i32) [template] @@ -35,10 +35,10 @@ var y: (i32, i32) = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%struct() [template = i32] -// CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.1: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %import_ref.2: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_17.1: (type, type) = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14) // CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_32.loc11_9, %.loc11_17.2 [template = i32] @@ -51,10 +51,10 @@ var y: (i32, i32) = x; // CHECK:STDOUT: %tuple: (i32, i32) = tuple_value (%.loc11_22, %.loc11_25) [template = constants.%tuple] // CHECK:STDOUT: %.loc11_29: (i32, i32) = converted %.loc11_28, %tuple [template = constants.%tuple] // CHECK:STDOUT: %v: (i32, i32) = bind_name v, %.loc11_29 -// CHECK:STDOUT: %import_ref.3: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc12_9: init type = call constants.%struct() [template = i32] -// CHECK:STDOUT: %import_ref.4: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc12_14: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.3: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc12_9: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %import_ref.4: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc12_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_17.1: (type, type) = tuple_literal (%int.make_type_32.loc12_9, %int.make_type_32.loc12_14) // CHECK:STDOUT: %.loc12_17.2: type = value_of_initializer %int.make_type_32.loc12_9 [template = i32] // CHECK:STDOUT: %.loc12_17.3: type = converted %int.make_type_32.loc12_9, %.loc12_17.2 [template = i32] @@ -63,10 +63,10 @@ var y: (i32, i32) = x; // CHECK:STDOUT: %.loc12_17.6: type = converted %.loc12_17.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %v.ref: (i32, i32) = name_ref v, %v // CHECK:STDOUT: %w: (i32, i32) = bind_name w, %v.ref -// CHECK:STDOUT: %import_ref.5: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc14_9: init type = call constants.%struct() [template = i32] -// CHECK:STDOUT: %import_ref.6: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc14_14: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.5: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc14_9: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %import_ref.6: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc14_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_17.1: (type, type) = tuple_literal (%int.make_type_32.loc14_9, %int.make_type_32.loc14_14) // CHECK:STDOUT: %.loc14_17.2: type = value_of_initializer %int.make_type_32.loc14_9 [template = i32] // CHECK:STDOUT: %.loc14_17.3: type = converted %int.make_type_32.loc14_9, %.loc14_17.2 [template = i32] @@ -75,10 +75,10 @@ var y: (i32, i32) = x; // CHECK:STDOUT: %.loc14_17.6: type = converted %.loc14_17.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %x.var: ref (i32, i32) = var x // CHECK:STDOUT: %x: ref (i32, i32) = bind_name x, %x.var -// CHECK:STDOUT: %import_ref.7: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc15_9: init type = call constants.%struct() [template = i32] -// CHECK:STDOUT: %import_ref.8: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct] -// CHECK:STDOUT: %int.make_type_32.loc15_14: init type = call constants.%struct() [template = i32] +// CHECK:STDOUT: %import_ref.7: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15_9: init type = call constants.%Int32() [template = i32] +// CHECK:STDOUT: %import_ref.8: = import_ref ir3, inst+3, loaded [template = constants.%Int32] +// CHECK:STDOUT: %int.make_type_32.loc15_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_17.1: (type, type) = tuple_literal (%int.make_type_32.loc15_9, %int.make_type_32.loc15_14) // CHECK:STDOUT: %.loc15_17.2: type = value_of_initializer %int.make_type_32.loc15_9 [template = i32] // CHECK:STDOUT: %.loc15_17.3: type = converted %int.make_type_32.loc15_9, %.loc15_17.2 [template = i32] diff --git a/toolchain/check/testdata/var/fail_not_copyable.carbon b/toolchain/check/testdata/var/fail_not_copyable.carbon index af97cd52443e..efc32314a479 100644 --- a/toolchain/check/testdata/var/fail_not_copyable.carbon +++ b/toolchain/check/testdata/var/fail_not_copyable.carbon @@ -32,9 +32,9 @@ fn F(x: X) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %X: type = class_type @X [template] // CHECK:STDOUT: %.1: type = struct_type {} [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] -// CHECK:STDOUT: %struct: F = struct_value () [template] +// CHECK:STDOUT: %F: = struct_value () [template] // CHECK:STDOUT: %.3: type = ptr_type {} [template] // CHECK:STDOUT: %.4: type = ptr_type String [template] // CHECK:STDOUT: %.5: String = string_literal "hello" [template] @@ -48,7 +48,7 @@ fn F(x: X) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct] { +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %X.ref: type = name_ref X, %X.decl [template = constants.%X] // CHECK:STDOUT: %x.loc14_6.1: X = param x // CHECK:STDOUT: @F.%x: X = bind_name x, %x.loc14_6.1 diff --git a/toolchain/check/testdata/var/fail_storage_is_literal.carbon b/toolchain/check/testdata/var/fail_storage_is_literal.carbon index 67d96de9d18a..9e2c499c02a5 100644 --- a/toolchain/check/testdata/var/fail_storage_is_literal.carbon +++ b/toolchain/check/testdata/var/fail_storage_is_literal.carbon @@ -18,9 +18,9 @@ fn Main() { // CHECK:STDOUT: --- fail_storage_is_literal.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Main: type = fn_type @Main [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Main = struct_value () [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -30,7 +30,7 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { diff --git a/toolchain/check/testdata/var/fail_todo_control_flow_init.carbon b/toolchain/check/testdata/var/fail_todo_control_flow_init.carbon index 0b66deebf959..529c524acc82 100644 --- a/toolchain/check/testdata/var/fail_todo_control_flow_init.carbon +++ b/toolchain/check/testdata/var/fail_todo_control_flow_init.carbon @@ -62,8 +62,8 @@ var y2: bool = false or true; // CHECK:STDOUT: %.2: bool = bool_literal true [template] // CHECK:STDOUT: %tuple: () = tuple_value () [template] // CHECK:STDOUT: %.3: bool = bool_literal false [template] -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] -// CHECK:STDOUT: %struct: Bool = struct_value () [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -83,14 +83,14 @@ var y2: bool = false or true; // CHECK:STDOUT: %.loc37_10.2: type = converted %.loc37_10.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %x2.var: ref () = var x2 // CHECK:STDOUT: %x2: ref () = bind_name x2, %x2.var -// CHECK:STDOUT: %import_ref.1: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct] -// CHECK:STDOUT: %bool.make_type.loc47: init type = call constants.%struct() [template = bool] +// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %bool.make_type.loc47: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc47_8.1: type = value_of_initializer %bool.make_type.loc47 [template = bool] // CHECK:STDOUT: %.loc47_8.2: type = converted %bool.make_type.loc47, %.loc47_8.1 [template = bool] // CHECK:STDOUT: %y.var: ref bool = var y // CHECK:STDOUT: %y: ref bool = bind_name y, %y.var -// CHECK:STDOUT: %import_ref.2: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct] -// CHECK:STDOUT: %bool.make_type.loc56: init type = call constants.%struct() [template = bool] +// CHECK:STDOUT: %import_ref.2: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %bool.make_type.loc56: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc56_9.1: type = value_of_initializer %bool.make_type.loc56 [template = bool] // CHECK:STDOUT: %.loc56_9.2: type = converted %bool.make_type.loc56, %.loc56_9.1 [template = bool] // CHECK:STDOUT: %y2.var: ref bool = var y2 diff --git a/toolchain/check/testdata/var/no_prelude/decl.carbon b/toolchain/check/testdata/var/no_prelude/decl.carbon index 6997414bc136..840f58080fce 100644 --- a/toolchain/check/testdata/var/no_prelude/decl.carbon +++ b/toolchain/check/testdata/var/no_prelude/decl.carbon @@ -15,16 +15,16 @@ fn Main() { // CHECK:STDOUT: --- decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Main: type = fn_type @Main [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Main = struct_value () [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { diff --git a/toolchain/check/testdata/var/no_prelude/decl_with_init.carbon b/toolchain/check/testdata/var/no_prelude/decl_with_init.carbon index 164e8198ba80..9c836ac7e6cd 100644 --- a/toolchain/check/testdata/var/no_prelude/decl_with_init.carbon +++ b/toolchain/check/testdata/var/no_prelude/decl_with_init.carbon @@ -15,9 +15,9 @@ fn Main() { // CHECK:STDOUT: --- decl_with_init.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Main: type = fn_type @Main [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Main = struct_value () [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %tuple: () = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -25,7 +25,7 @@ fn Main() { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { diff --git a/toolchain/check/testdata/var/no_prelude/fail_duplicate_decl.carbon b/toolchain/check/testdata/var/no_prelude/fail_duplicate_decl.carbon index 7a77575d4022..5f52e9f8b4fe 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_duplicate_decl.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_duplicate_decl.carbon @@ -23,9 +23,9 @@ fn Main() { // CHECK:STDOUT: --- fail_duplicate_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Main: type = fn_type @Main [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Main = struct_value () [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %tuple: () = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -33,7 +33,7 @@ fn Main() { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { diff --git a/toolchain/check/testdata/var/no_prelude/fail_generic.carbon b/toolchain/check/testdata/var/no_prelude/fail_generic.carbon index b43b5a391b8f..a6534eeb888f 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_generic.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_generic.carbon @@ -18,9 +18,9 @@ fn Main() { // CHECK:STDOUT: --- fail_generic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Main: type = fn_type @Main [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Main = struct_value () [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %x: () = bind_symbolic_name x 0 [symbolic] // CHECK:STDOUT: %tuple: () = tuple_value () [template] // CHECK:STDOUT: } @@ -29,7 +29,7 @@ fn Main() { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { diff --git a/toolchain/check/testdata/var/no_prelude/fail_init_type_mismatch.carbon b/toolchain/check/testdata/var/no_prelude/fail_init_type_mismatch.carbon index 88e4b8a5a040..94b42a0ff1c5 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_init_type_mismatch.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_init_type_mismatch.carbon @@ -18,9 +18,9 @@ fn Main() { // CHECK:STDOUT: --- fail_init_type_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Main: type = fn_type @Main [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Main = struct_value () [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -28,7 +28,7 @@ fn Main() { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { diff --git a/toolchain/check/testdata/var/no_prelude/fail_init_with_self.carbon b/toolchain/check/testdata/var/no_prelude/fail_init_with_self.carbon index 5648fcecf31d..dad44adc9b70 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_init_with_self.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_init_with_self.carbon @@ -18,16 +18,16 @@ fn Main() { // CHECK:STDOUT: --- fail_init_with_self.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Main: type = fn_type @Main [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Main = struct_value () [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { diff --git a/toolchain/check/testdata/var/no_prelude/fail_lookup_outside_scope.carbon b/toolchain/check/testdata/var/no_prelude/fail_lookup_outside_scope.carbon index 716c6f48db5d..f07b559f574c 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_lookup_outside_scope.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_lookup_outside_scope.carbon @@ -20,9 +20,9 @@ var y: () = x; // CHECK:STDOUT: --- fail_lookup_outside_scope.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Main: type = fn_type @Main [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Main = struct_value () [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -30,7 +30,7 @@ var y: () = x; // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: %.loc18_9.1: () = tuple_literal () // CHECK:STDOUT: %.loc18_9.2: type = converted %.loc18_9.1, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %y.var: ref () = var y diff --git a/toolchain/check/testdata/var/no_prelude/global_lookup_in_scope.carbon b/toolchain/check/testdata/var/no_prelude/global_lookup_in_scope.carbon index 9af1d248311a..c620fa7ddc41 100644 --- a/toolchain/check/testdata/var/no_prelude/global_lookup_in_scope.carbon +++ b/toolchain/check/testdata/var/no_prelude/global_lookup_in_scope.carbon @@ -20,9 +20,9 @@ fn Main() { // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %.2: type = struct_type {.v: ()} [template] // CHECK:STDOUT: %tuple: () = tuple_value () [template] -// CHECK:STDOUT: %struct.1: {.v: ()} = struct_value (%tuple) [template] -// CHECK:STDOUT: %Main: type = fn_type @Main [template] -// CHECK:STDOUT: %struct.2: Main = struct_value () [template] +// CHECK:STDOUT: %struct: {.v: ()} = struct_value (%tuple) [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -35,7 +35,7 @@ fn Main() { // CHECK:STDOUT: %.loc11_15: type = struct_type {.v: ()} [template = constants.%.2] // CHECK:STDOUT: %x.var: ref {.v: ()} = var x // CHECK:STDOUT: %x: ref {.v: ()} = bind_name x, %x.var -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct.2] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { @@ -50,8 +50,8 @@ fn Main() { // CHECK:STDOUT: %.loc14_21.2: ref () = struct_access %y.var, element0 // CHECK:STDOUT: %.loc14_21.3: init () = tuple_init () to %.loc14_21.2 [template = constants.%tuple] // CHECK:STDOUT: %.loc14_21.4: init () = converted %.loc14_21.1, %.loc14_21.3 [template = constants.%tuple] -// CHECK:STDOUT: %.loc14_21.5: init {.v: ()} = struct_init (%.loc14_21.4) to %y.var [template = constants.%struct.1] -// CHECK:STDOUT: %.loc14_22: init {.v: ()} = converted %x.ref, %.loc14_21.5 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc14_21.5: init {.v: ()} = struct_init (%.loc14_21.4) to %y.var [template = constants.%struct] +// CHECK:STDOUT: %.loc14_22: init {.v: ()} = converted %x.ref, %.loc14_21.5 [template = constants.%struct] // CHECK:STDOUT: assign %y.var, %.loc14_22 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -63,8 +63,8 @@ fn Main() { // CHECK:STDOUT: %.loc11_27.2: ref () = struct_access file.%x.var, element0 // CHECK:STDOUT: %.loc11_26.2: init () = tuple_init () to %.loc11_27.2 [template = constants.%tuple] // CHECK:STDOUT: %.loc11_27.3: init () = converted %.loc11_26.1, %.loc11_26.2 [template = constants.%tuple] -// CHECK:STDOUT: %.loc11_27.4: init {.v: ()} = struct_init (%.loc11_27.3) to file.%x.var [template = constants.%struct.1] -// CHECK:STDOUT: %.loc11_28: init {.v: ()} = converted %.loc11_27.1, %.loc11_27.4 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc11_27.4: init {.v: ()} = struct_init (%.loc11_27.3) to file.%x.var [template = constants.%struct] +// CHECK:STDOUT: %.loc11_28: init {.v: ()} = converted %.loc11_27.1, %.loc11_27.4 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc11_28 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/no_prelude/lookup.carbon b/toolchain/check/testdata/var/no_prelude/lookup.carbon index e8f82d7089ba..cacce47dd079 100644 --- a/toolchain/check/testdata/var/no_prelude/lookup.carbon +++ b/toolchain/check/testdata/var/no_prelude/lookup.carbon @@ -16,9 +16,9 @@ fn Main() { // CHECK:STDOUT: --- lookup.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Main: type = fn_type @Main [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Main = struct_value () [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %tuple: () = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -26,7 +26,7 @@ fn Main() { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { diff --git a/toolchain/check/testdata/var/no_prelude/shadowing.carbon b/toolchain/check/testdata/var/no_prelude/shadowing.carbon index 80ec626205e9..8f51c066cbf3 100644 --- a/toolchain/check/testdata/var/no_prelude/shadowing.carbon +++ b/toolchain/check/testdata/var/no_prelude/shadowing.carbon @@ -26,9 +26,9 @@ fn Main() { // CHECK:STDOUT: --- shadowing.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Main: type = fn_type @Main [template] +// CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: Main = struct_value () [template] +// CHECK:STDOUT: %Main: = struct_value () [template] // CHECK:STDOUT: %tuple: () = tuple_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal true [template] // CHECK:STDOUT: } @@ -39,7 +39,7 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %NS: = namespace [template] {} -// CHECK:STDOUT: %Main.decl: Main = fn_decl @Main [template = constants.%struct] {} +// CHECK:STDOUT: %Main.decl: = fn_decl @Main [template = constants.%Main] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { diff --git a/toolchain/check/testdata/while/break_continue.carbon b/toolchain/check/testdata/while/break_continue.carbon index b0f20934fbd5..bbe074cfc1d7 100644 --- a/toolchain/check/testdata/while/break_continue.carbon +++ b/toolchain/check/testdata/while/break_continue.carbon @@ -33,27 +33,27 @@ fn While() { // CHECK:STDOUT: --- break_continue.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Bool = struct_value () [template] -// CHECK:STDOUT: %A: type = fn_type @A [template] -// CHECK:STDOUT: %struct.2: A = struct_value () [template] -// CHECK:STDOUT: %B: type = fn_type @B [template] -// CHECK:STDOUT: %struct.3: B = struct_value () [template] -// CHECK:STDOUT: %C: type = fn_type @C [template] -// CHECK:STDOUT: %struct.4: C = struct_value () [template] -// CHECK:STDOUT: %D: type = fn_type @D [template] -// CHECK:STDOUT: %struct.5: D = struct_value () [template] -// CHECK:STDOUT: %E: type = fn_type @E [template] -// CHECK:STDOUT: %struct.6: E = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.7: F = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.8: G = struct_value () [template] -// CHECK:STDOUT: %H: type = fn_type @H [template] -// CHECK:STDOUT: %struct.9: H = struct_value () [template] -// CHECK:STDOUT: %While: type = fn_type @While [template] -// CHECK:STDOUT: %struct.10: While = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %A.type: type = fn_type @A [template] +// CHECK:STDOUT: %A: = struct_value () [template] +// CHECK:STDOUT: %B.type: type = fn_type @B [template] +// CHECK:STDOUT: %B: = struct_value () [template] +// CHECK:STDOUT: %C.type: type = fn_type @C [template] +// CHECK:STDOUT: %C: = struct_value () [template] +// CHECK:STDOUT: %D.type: type = fn_type @D [template] +// CHECK:STDOUT: %D: = struct_value () [template] +// CHECK:STDOUT: %E.type: type = fn_type @E [template] +// CHECK:STDOUT: %E: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %H.type: type = fn_type @H [template] +// CHECK:STDOUT: %H: = struct_value () [template] +// CHECK:STDOUT: %While.type: type = fn_type @While [template] +// CHECK:STDOUT: %While: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -70,63 +70,63 @@ fn While() { // CHECK:STDOUT: .While = %While.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref.1: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %A.decl: A = fn_decl @A [template = constants.%struct.2] { -// CHECK:STDOUT: %bool.make_type.loc11: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.1: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %A.decl: = fn_decl @A [template = constants.%A] { +// CHECK:STDOUT: %bool.make_type.loc11: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %bool.make_type.loc11 [template = bool] // CHECK:STDOUT: %.loc11_11.2: type = converted %bool.make_type.loc11, %.loc11_11.1 [template = bool] // CHECK:STDOUT: @A.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %B.decl: B = fn_decl @B [template = constants.%struct.3] { -// CHECK:STDOUT: %bool.make_type.loc12: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.2: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %B.decl: = fn_decl @B [template = constants.%B] { +// CHECK:STDOUT: %bool.make_type.loc12: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_11.1: type = value_of_initializer %bool.make_type.loc12 [template = bool] // CHECK:STDOUT: %.loc12_11.2: type = converted %bool.make_type.loc12, %.loc12_11.1 [template = bool] // CHECK:STDOUT: @B.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %C.decl: C = fn_decl @C [template = constants.%struct.4] { -// CHECK:STDOUT: %bool.make_type.loc13: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.3: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %C.decl: = fn_decl @C [template = constants.%C] { +// CHECK:STDOUT: %bool.make_type.loc13: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc13_11.1: type = value_of_initializer %bool.make_type.loc13 [template = bool] // CHECK:STDOUT: %.loc13_11.2: type = converted %bool.make_type.loc13, %.loc13_11.1 [template = bool] // CHECK:STDOUT: @C.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %D.decl: D = fn_decl @D [template = constants.%struct.5] { -// CHECK:STDOUT: %bool.make_type.loc14: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.4: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %D.decl: = fn_decl @D [template = constants.%D] { +// CHECK:STDOUT: %bool.make_type.loc14: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc14_11.1: type = value_of_initializer %bool.make_type.loc14 [template = bool] // CHECK:STDOUT: %.loc14_11.2: type = converted %bool.make_type.loc14, %.loc14_11.1 [template = bool] // CHECK:STDOUT: @D.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %E.decl: E = fn_decl @E [template = constants.%struct.6] { -// CHECK:STDOUT: %bool.make_type.loc15: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.5: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %E.decl: = fn_decl @E [template = constants.%E] { +// CHECK:STDOUT: %bool.make_type.loc15: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc15_11.1: type = value_of_initializer %bool.make_type.loc15 [template = bool] // CHECK:STDOUT: %.loc15_11.2: type = converted %bool.make_type.loc15, %.loc15_11.1 [template = bool] // CHECK:STDOUT: @E.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.6: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.7] { -// CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.6: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_11.1: type = value_of_initializer %bool.make_type.loc16 [template = bool] // CHECK:STDOUT: %.loc16_11.2: type = converted %bool.make_type.loc16, %.loc16_11.1 [template = bool] // CHECK:STDOUT: @F.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.7: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.8] { -// CHECK:STDOUT: %bool.make_type.loc17: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.7: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] { +// CHECK:STDOUT: %bool.make_type.loc17: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc17_11.1: type = value_of_initializer %bool.make_type.loc17 [template = bool] // CHECK:STDOUT: %.loc17_11.2: type = converted %bool.make_type.loc17, %.loc17_11.1 [template = bool] // CHECK:STDOUT: @G.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.8: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %H.decl: H = fn_decl @H [template = constants.%struct.9] { -// CHECK:STDOUT: %bool.make_type.loc18: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref.8: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] { +// CHECK:STDOUT: %bool.make_type.loc18: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_11.1: type = value_of_initializer %bool.make_type.loc18 [template = bool] // CHECK:STDOUT: %.loc18_11.2: type = converted %bool.make_type.loc18, %.loc18_11.1 [template = bool] // CHECK:STDOUT: @H.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %While.decl: While = fn_decl @While [template = constants.%struct.10] {} +// CHECK:STDOUT: %While.decl: = fn_decl @While [template = constants.%While] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; @@ -152,14 +152,14 @@ fn While() { // CHECK:STDOUT: br !while.cond.loc21 // CHECK:STDOUT: // CHECK:STDOUT: !while.cond.loc21: -// CHECK:STDOUT: %A.ref: A = name_ref A, file.%A.decl [template = constants.%struct.2] +// CHECK:STDOUT: %A.ref: = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %A.call: init bool = call %A.ref() // CHECK:STDOUT: %.loc21_13.1: bool = value_of_initializer %A.call // CHECK:STDOUT: %.loc21_13.2: bool = converted %A.call, %.loc21_13.1 // CHECK:STDOUT: if %.loc21_13.2 br !while.body.loc21 else br !while.done.loc21 // CHECK:STDOUT: // CHECK:STDOUT: !while.body.loc21: -// CHECK:STDOUT: %B.ref: B = name_ref B, file.%B.decl [template = constants.%struct.3] +// CHECK:STDOUT: %B.ref: = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %B.call: init bool = call %B.ref() // CHECK:STDOUT: %.loc22_12.1: bool = value_of_initializer %B.call // CHECK:STDOUT: %.loc22_12.2: bool = converted %B.call, %.loc22_12.1 @@ -169,7 +169,7 @@ fn While() { // CHECK:STDOUT: br !while.cond.loc21 // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc22: -// CHECK:STDOUT: %C.ref: C = name_ref C, file.%C.decl [template = constants.%struct.4] +// CHECK:STDOUT: %C.ref: = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.call: init bool = call %C.ref() // CHECK:STDOUT: %.loc23_12.1: bool = value_of_initializer %C.call // CHECK:STDOUT: %.loc23_12.2: bool = converted %C.call, %.loc23_12.1 @@ -182,14 +182,14 @@ fn While() { // CHECK:STDOUT: br !while.cond.loc24 // CHECK:STDOUT: // CHECK:STDOUT: !while.cond.loc24: -// CHECK:STDOUT: %D.ref: D = name_ref D, file.%D.decl [template = constants.%struct.5] +// CHECK:STDOUT: %D.ref: = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %D.call: init bool = call %D.ref() // CHECK:STDOUT: %.loc24_15.1: bool = value_of_initializer %D.call // CHECK:STDOUT: %.loc24_15.2: bool = converted %D.call, %.loc24_15.1 // CHECK:STDOUT: if %.loc24_15.2 br !while.body.loc24 else br !while.done.loc24 // CHECK:STDOUT: // CHECK:STDOUT: !while.body.loc24: -// CHECK:STDOUT: %E.ref: E = name_ref E, file.%E.decl [template = constants.%struct.6] +// CHECK:STDOUT: %E.ref: = name_ref E, file.%E.decl [template = constants.%E] // CHECK:STDOUT: %E.call: init bool = call %E.ref() // CHECK:STDOUT: %.loc25_14.1: bool = value_of_initializer %E.call // CHECK:STDOUT: %.loc25_14.2: bool = converted %E.call, %.loc25_14.1 @@ -199,7 +199,7 @@ fn While() { // CHECK:STDOUT: br !while.cond.loc24 // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc25: -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%F.decl [template = constants.%struct.7] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init bool = call %F.ref() // CHECK:STDOUT: %.loc26_14.1: bool = value_of_initializer %F.call // CHECK:STDOUT: %.loc26_14.2: bool = converted %F.call, %.loc26_14.1 @@ -212,7 +212,7 @@ fn While() { // CHECK:STDOUT: br !while.cond.loc24 // CHECK:STDOUT: // CHECK:STDOUT: !while.done.loc24: -// CHECK:STDOUT: %G.ref: G = name_ref G, file.%G.decl [template = constants.%struct.8] +// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %G.call: init bool = call %G.ref() // CHECK:STDOUT: %.loc28_12.1: bool = value_of_initializer %G.call // CHECK:STDOUT: %.loc28_12.2: bool = converted %G.call, %.loc28_12.1 @@ -222,7 +222,7 @@ fn While() { // CHECK:STDOUT: br !while.cond.loc21 // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc28: -// CHECK:STDOUT: %H.ref: H = name_ref H, file.%H.decl [template = constants.%struct.9] +// CHECK:STDOUT: %H.ref: = name_ref H, file.%H.decl [template = constants.%H] // CHECK:STDOUT: %H.call: init bool = call %H.ref() // CHECK:STDOUT: %.loc29_12.1: bool = value_of_initializer %H.call // CHECK:STDOUT: %.loc29_12.2: bool = converted %H.call, %.loc29_12.1 diff --git a/toolchain/check/testdata/while/fail_bad_condition.carbon b/toolchain/check/testdata/while/fail_bad_condition.carbon index df85366b82f2..b9d3ac8ec4b2 100644 --- a/toolchain/check/testdata/while/fail_bad_condition.carbon +++ b/toolchain/check/testdata/while/fail_bad_condition.carbon @@ -18,9 +18,9 @@ fn While() { // CHECK:STDOUT: --- fail_bad_condition.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %While: type = fn_type @While [template] +// CHECK:STDOUT: %While.type: type = fn_type @While [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: While = struct_value () [template] +// CHECK:STDOUT: %While: = struct_value () [template] // CHECK:STDOUT: %.2: type = ptr_type String [template] // CHECK:STDOUT: %.3: String = string_literal "Hello" [template] // CHECK:STDOUT: } @@ -31,7 +31,7 @@ fn While() { // CHECK:STDOUT: .While = %While.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %While.decl: While = fn_decl @While [template = constants.%struct] {} +// CHECK:STDOUT: %While.decl: = fn_decl @While [template = constants.%While] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @While() { diff --git a/toolchain/check/testdata/while/fail_break_continue.carbon b/toolchain/check/testdata/while/fail_break_continue.carbon index 5ae9347d836d..27f24fbcb004 100644 --- a/toolchain/check/testdata/while/fail_break_continue.carbon +++ b/toolchain/check/testdata/while/fail_break_continue.carbon @@ -37,9 +37,9 @@ fn While() { // CHECK:STDOUT: --- fail_break_continue.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %While: type = fn_type @While [template] +// CHECK:STDOUT: %While.type: type = fn_type @While [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct: While = struct_value () [template] +// CHECK:STDOUT: %While: = struct_value () [template] // CHECK:STDOUT: %.2: bool = bool_literal false [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -49,7 +49,7 @@ fn While() { // CHECK:STDOUT: .While = %While.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %While.decl: While = fn_decl @While [template = constants.%struct] {} +// CHECK:STDOUT: %While.decl: = fn_decl @While [template = constants.%While] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @While() { diff --git a/toolchain/check/testdata/while/unreachable_end.carbon b/toolchain/check/testdata/while/unreachable_end.carbon index bf547e23787a..9785d80f113a 100644 --- a/toolchain/check/testdata/while/unreachable_end.carbon +++ b/toolchain/check/testdata/while/unreachable_end.carbon @@ -26,19 +26,19 @@ fn While() { // CHECK:STDOUT: --- unreachable_end.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Bool = struct_value () [template] -// CHECK:STDOUT: %Cond: type = fn_type @Cond [template] -// CHECK:STDOUT: %struct.2: Cond = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.3: F = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.4: G = struct_value () [template] -// CHECK:STDOUT: %H: type = fn_type @H [template] -// CHECK:STDOUT: %struct.5: H = struct_value () [template] -// CHECK:STDOUT: %While: type = fn_type @While [template] -// CHECK:STDOUT: %struct.6: While = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Cond.type: type = fn_type @Cond [template] +// CHECK:STDOUT: %Cond: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %H.type: type = fn_type @H [template] +// CHECK:STDOUT: %H: = struct_value () [template] +// CHECK:STDOUT: %While.type: type = fn_type @While [template] +// CHECK:STDOUT: %While: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -51,17 +51,17 @@ fn While() { // CHECK:STDOUT: .While = %While.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Cond.decl: Cond = fn_decl @Cond [template = constants.%struct.2] { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Cond.decl: = fn_decl @Cond [template = constants.%Cond] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc11_14.2: type = converted %bool.make_type, %.loc11_14.1 [template = bool] // CHECK:STDOUT: @Cond.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.3] {} -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.4] {} -// CHECK:STDOUT: %H.decl: H = fn_decl @H [template = constants.%struct.5] {} -// CHECK:STDOUT: %While.decl: While = fn_decl @While [template = constants.%struct.6] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} +// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] {} +// CHECK:STDOUT: %While.decl: = fn_decl @While [template = constants.%While] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; @@ -76,24 +76,24 @@ fn While() { // CHECK:STDOUT: // CHECK:STDOUT: fn @While() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%F.decl [template = constants.%struct.3] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init () = call %F.ref() // CHECK:STDOUT: br !while.cond // CHECK:STDOUT: // CHECK:STDOUT: !while.cond: -// CHECK:STDOUT: %Cond.ref: Cond = name_ref Cond, file.%Cond.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Cond.ref: = name_ref Cond, file.%Cond.decl [template = constants.%Cond] // CHECK:STDOUT: %Cond.call: init bool = call %Cond.ref() // CHECK:STDOUT: %.loc19_16.1: bool = value_of_initializer %Cond.call // CHECK:STDOUT: %.loc19_16.2: bool = converted %Cond.call, %.loc19_16.1 // CHECK:STDOUT: if %.loc19_16.2 br !while.body else br !while.done // CHECK:STDOUT: // CHECK:STDOUT: !while.body: -// CHECK:STDOUT: %G.ref: G = name_ref G, file.%G.decl [template = constants.%struct.4] +// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %G.call: init () = call %G.ref() // CHECK:STDOUT: return // CHECK:STDOUT: // CHECK:STDOUT: !while.done: -// CHECK:STDOUT: %H.ref: H = name_ref H, file.%H.decl [template = constants.%struct.5] +// CHECK:STDOUT: %H.ref: = name_ref H, file.%H.decl [template = constants.%H] // CHECK:STDOUT: %H.call: init () = call %H.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/while/while.carbon b/toolchain/check/testdata/while/while.carbon index 3b28716770e7..1fc5c5c6e01b 100644 --- a/toolchain/check/testdata/while/while.carbon +++ b/toolchain/check/testdata/while/while.carbon @@ -25,19 +25,19 @@ fn While() { // CHECK:STDOUT: --- while.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Bool: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %struct.1: Bool = struct_value () [template] -// CHECK:STDOUT: %Cond: type = fn_type @Cond [template] -// CHECK:STDOUT: %struct.2: Cond = struct_value () [template] -// CHECK:STDOUT: %F: type = fn_type @F [template] -// CHECK:STDOUT: %struct.3: F = struct_value () [template] -// CHECK:STDOUT: %G: type = fn_type @G [template] -// CHECK:STDOUT: %struct.4: G = struct_value () [template] -// CHECK:STDOUT: %H: type = fn_type @H [template] -// CHECK:STDOUT: %struct.5: H = struct_value () [template] -// CHECK:STDOUT: %While: type = fn_type @While [template] -// CHECK:STDOUT: %struct.6: While = struct_value () [template] +// CHECK:STDOUT: %Bool: = struct_value () [template] +// CHECK:STDOUT: %Cond.type: type = fn_type @Cond [template] +// CHECK:STDOUT: %Cond: = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: = struct_value () [template] +// CHECK:STDOUT: %G.type: type = fn_type @G [template] +// CHECK:STDOUT: %G: = struct_value () [template] +// CHECK:STDOUT: %H.type: type = fn_type @H [template] +// CHECK:STDOUT: %H: = struct_value () [template] +// CHECK:STDOUT: %While.type: type = fn_type @While [template] +// CHECK:STDOUT: %While: = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -50,17 +50,17 @@ fn While() { // CHECK:STDOUT: .While = %While.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace [template] {} -// CHECK:STDOUT: %import_ref: Bool = import_ref ir7, inst+2, loaded [template = constants.%struct.1] -// CHECK:STDOUT: %Cond.decl: Cond = fn_decl @Cond [template = constants.%struct.2] { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%struct.1() [template = bool] +// CHECK:STDOUT: %import_ref: = import_ref ir7, inst+2, loaded [template = constants.%Bool] +// CHECK:STDOUT: %Cond.decl: = fn_decl @Cond [template = constants.%Cond] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc11_14.2: type = converted %bool.make_type, %.loc11_14.1 [template = bool] // CHECK:STDOUT: @Cond.%return: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: F = fn_decl @F [template = constants.%struct.3] {} -// CHECK:STDOUT: %G.decl: G = fn_decl @G [template = constants.%struct.4] {} -// CHECK:STDOUT: %H.decl: H = fn_decl @H [template = constants.%struct.5] {} -// CHECK:STDOUT: %While.decl: While = fn_decl @While [template = constants.%struct.6] {} +// CHECK:STDOUT: %F.decl: = fn_decl @F [template = constants.%F] {} +// CHECK:STDOUT: %G.decl: = fn_decl @G [template = constants.%G] {} +// CHECK:STDOUT: %H.decl: = fn_decl @H [template = constants.%H] {} +// CHECK:STDOUT: %While.decl: = fn_decl @While [template = constants.%While] {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; @@ -75,24 +75,24 @@ fn While() { // CHECK:STDOUT: // CHECK:STDOUT: fn @While() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: F = name_ref F, file.%F.decl [template = constants.%struct.3] +// CHECK:STDOUT: %F.ref: = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init () = call %F.ref() // CHECK:STDOUT: br !while.cond // CHECK:STDOUT: // CHECK:STDOUT: !while.cond: -// CHECK:STDOUT: %Cond.ref: Cond = name_ref Cond, file.%Cond.decl [template = constants.%struct.2] +// CHECK:STDOUT: %Cond.ref: = name_ref Cond, file.%Cond.decl [template = constants.%Cond] // CHECK:STDOUT: %Cond.call: init bool = call %Cond.ref() // CHECK:STDOUT: %.loc19_16.1: bool = value_of_initializer %Cond.call // CHECK:STDOUT: %.loc19_16.2: bool = converted %Cond.call, %.loc19_16.1 // CHECK:STDOUT: if %.loc19_16.2 br !while.body else br !while.done // CHECK:STDOUT: // CHECK:STDOUT: !while.body: -// CHECK:STDOUT: %G.ref: G = name_ref G, file.%G.decl [template = constants.%struct.4] +// CHECK:STDOUT: %G.ref: = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %G.call: init () = call %G.ref() // CHECK:STDOUT: br !while.cond // CHECK:STDOUT: // CHECK:STDOUT: !while.done: -// CHECK:STDOUT: %H.ref: H = name_ref H, file.%H.decl [template = constants.%struct.5] +// CHECK:STDOUT: %H.ref: = name_ref H, file.%H.decl [template = constants.%H] // CHECK:STDOUT: %H.call: init () = call %H.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/class/adapt.carbon b/toolchain/lower/testdata/class/adapt.carbon index 957d5fb3faeb..4504b669a805 100644 --- a/toolchain/lower/testdata/class/adapt.carbon +++ b/toolchain/lower/testdata/class/adapt.carbon @@ -54,13 +54,13 @@ fn DoStuff(a: Int) -> Int { // CHECK:STDOUT: ; ModuleID = 'adapt_class.carbon' // CHECK:STDOUT: source_filename = "adapt_class.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @struct.3.loc9_28 = internal constant { i32, i32 } { i32 1, i32 2 } +// CHECK:STDOUT: @struct.loc9_28 = internal constant { i32, i32 } { i32 1, i32 2 } // CHECK:STDOUT: // CHECK:STDOUT: define void @Make(ptr sret({ i32, i32 }) %return) { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc9_27.2.a = getelementptr inbounds { i32, i32 }, ptr %return, i32 0, i32 0 // CHECK:STDOUT: %.loc9_27.4.b = getelementptr inbounds { i32, i32 }, ptr %return, i32 0, i32 1 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @struct.3.loc9_28, i64 8, i1 false) +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @struct.loc9_28, i64 8, i1 false) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/class/base.carbon b/toolchain/lower/testdata/class/base.carbon index d63e3fcdb5bf..1fa96a4d543a 100644 --- a/toolchain/lower/testdata/class/base.carbon +++ b/toolchain/lower/testdata/class/base.carbon @@ -33,14 +33,14 @@ fn Convert(p: Derived*) -> Base* { // CHECK:STDOUT: ; ModuleID = 'base.carbon' // CHECK:STDOUT: source_filename = "base.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @struct.4.loc22_36 = internal constant { { i32 }, i32 } { { i32 } { i32 4 }, i32 7 } +// CHECK:STDOUT: @struct.2.loc22_36 = internal constant { { i32 }, i32 } { { i32 } { i32 4 }, i32 7 } // CHECK:STDOUT: // CHECK:STDOUT: define void @Make(ptr sret({ { i32 }, i32 }) %return) { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc22_35.2.base = getelementptr inbounds { { i32 }, i32 }, ptr %return, i32 0, i32 0 // CHECK:STDOUT: %.loc22_26.2.b = getelementptr inbounds { i32 }, ptr %.loc22_35.2.base, i32 0, i32 0 // CHECK:STDOUT: %.loc22_35.4.d = getelementptr inbounds { { i32 }, i32 }, ptr %return, i32 0, i32 1 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @struct.4.loc22_36, i64 8, i1 false) +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @struct.2.loc22_36, i64 8, i1 false) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/call/struct_param.carbon b/toolchain/lower/testdata/function/call/struct_param.carbon index 1082d69b1271..9315be9fa056 100644 --- a/toolchain/lower/testdata/function/call/struct_param.carbon +++ b/toolchain/lower/testdata/function/call/struct_param.carbon @@ -17,7 +17,7 @@ fn Main() { // CHECK:STDOUT: ; ModuleID = 'struct_param.carbon' // CHECK:STDOUT: source_filename = "struct_param.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @struct.6.loc14_4.3 = internal constant { i32, i32 } { i32 2, i32 3 } +// CHECK:STDOUT: @struct.3.loc14_4.3 = internal constant { i32, i32 } { i32 2, i32 3 } // CHECK:STDOUT: // CHECK:STDOUT: define void @F({ i32 } %b, ptr %c) { // CHECK:STDOUT: entry: @@ -26,6 +26,6 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: define void @Main() { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @F({ i32 } { i32 1 }, ptr @struct.6.loc14_4.3) +// CHECK:STDOUT: call void @F({ i32 } { i32 1 }, ptr @struct.3.loc14_4.3) // CHECK:STDOUT: ret void // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/pointer/address_of_field.carbon b/toolchain/lower/testdata/pointer/address_of_field.carbon index 343640f9df39..6268cdc63d9e 100644 --- a/toolchain/lower/testdata/pointer/address_of_field.carbon +++ b/toolchain/lower/testdata/pointer/address_of_field.carbon @@ -18,7 +18,7 @@ fn F() { // CHECK:STDOUT: ; ModuleID = 'address_of_field.carbon' // CHECK:STDOUT: source_filename = "address_of_field.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @struct.4.loc14_47 = internal constant { i32, i32 } { i32 1, i32 2 } +// CHECK:STDOUT: @struct.loc14_47 = internal constant { i32, i32 } { i32 1, i32 2 } // CHECK:STDOUT: // CHECK:STDOUT: declare void @G(ptr) // CHECK:STDOUT: @@ -27,7 +27,7 @@ fn F() { // CHECK:STDOUT: %s.var = alloca { i32, i32 }, align 8 // CHECK:STDOUT: %.loc14_46.2.a = getelementptr inbounds { i32, i32 }, ptr %s.var, i32 0, i32 0 // CHECK:STDOUT: %.loc14_46.4.b = getelementptr inbounds { i32, i32 }, ptr %s.var, i32 0, i32 1 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %s.var, ptr align 4 @struct.4.loc14_47, i64 8, i1 false) +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %s.var, ptr align 4 @struct.loc14_47, i64 8, i1 false) // CHECK:STDOUT: %.loc15_7.b = getelementptr inbounds { i32, i32 }, ptr %s.var, i32 0, i32 1 // CHECK:STDOUT: call void @G(ptr %.loc15_7.b) // CHECK:STDOUT: ret void diff --git a/toolchain/lower/testdata/struct/member_access.carbon b/toolchain/lower/testdata/struct/member_access.carbon index 8eb816567313..6c6f40519f57 100644 --- a/toolchain/lower/testdata/struct/member_access.carbon +++ b/toolchain/lower/testdata/struct/member_access.carbon @@ -18,14 +18,14 @@ fn Run() -> i32 { // CHECK:STDOUT: ; ModuleID = 'member_access.carbon' // CHECK:STDOUT: source_filename = "member_access.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @struct.4.loc12_49 = internal constant { double, i32 } { double 0.000000e+00, i32 1 } +// CHECK:STDOUT: @struct.loc12_49 = internal constant { double, i32 } { double 0.000000e+00, i32 1 } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @main() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %x.var = alloca { double, i32 }, align 8 // CHECK:STDOUT: %.loc12_48.2.a = getelementptr inbounds { double, i32 }, ptr %x.var, i32 0, i32 0 // CHECK:STDOUT: %.loc12_48.4.b = getelementptr inbounds { double, i32 }, ptr %x.var, i32 0, i32 1 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %x.var, ptr align 8 @struct.4.loc12_49, i64 16, i1 false) +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %x.var, ptr align 8 @struct.loc12_49, i64 16, i1 false) // CHECK:STDOUT: %y.var = alloca i32, align 4 // CHECK:STDOUT: %.loc13_17.1.b = getelementptr inbounds { double, i32 }, ptr %x.var, i32 0, i32 1 // CHECK:STDOUT: %.loc13_17.2 = load i32, ptr %.loc13_17.1.b, align 4 diff --git a/toolchain/lower/testdata/struct/two_entries.carbon b/toolchain/lower/testdata/struct/two_entries.carbon index 4ccd61ed0221..b18b9f18f004 100644 --- a/toolchain/lower/testdata/struct/two_entries.carbon +++ b/toolchain/lower/testdata/struct/two_entries.carbon @@ -17,14 +17,14 @@ fn Run() -> i32 { // CHECK:STDOUT: ; ModuleID = 'two_entries.carbon' // CHECK:STDOUT: source_filename = "two_entries.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @struct.3.loc12_47 = internal constant { i32, i32 } { i32 1, i32 2 } +// CHECK:STDOUT: @struct.loc12_47 = internal constant { i32, i32 } { i32 1, i32 2 } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @main() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %x.var = alloca { i32, i32 }, align 8 // CHECK:STDOUT: %.loc12_46.2.a = getelementptr inbounds { i32, i32 }, ptr %x.var, i32 0, i32 0 // CHECK:STDOUT: %.loc12_46.4.b = getelementptr inbounds { i32, i32 }, ptr %x.var, i32 0, i32 1 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %x.var, ptr align 4 @struct.3.loc12_47, i64 8, i1 false) +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %x.var, ptr align 4 @struct.loc12_47, i64 8, i1 false) // CHECK:STDOUT: %y.var = alloca { i32, i32 }, align 8 // CHECK:STDOUT: %.loc13_31.1.a = getelementptr inbounds { i32, i32 }, ptr %x.var, i32 0, i32 0 // CHECK:STDOUT: %.loc13_31.2 = load i32, ptr %.loc13_31.1.a, align 4 diff --git a/toolchain/sem_ir/file.cpp b/toolchain/sem_ir/file.cpp index f727f50dca78..638f56abefc7 100644 --- a/toolchain/sem_ir/file.cpp +++ b/toolchain/sem_ir/file.cpp @@ -319,14 +319,12 @@ static auto StringifyTypeExprImpl(const SemIR::File& outer_sem_ir, } case CARBON_KIND(FunctionType inst): { auto fn_name_id = sem_ir.functions().Get(inst.function_id).name_id; - // TODO: Consider formatting as `typeof(F)` instead. - out << sem_ir.names().GetFormatted(fn_name_id); + out << ""; break; } case CARBON_KIND(GenericClassType inst): { auto class_name_id = sem_ir.classes().Get(inst.class_id).name_id; - // TODO: Consider formatting as `typeof(C)` instead. - out << sem_ir.names().GetFormatted(class_name_id); + out << ""; break; } case CARBON_KIND(InterfaceType inst): { diff --git a/toolchain/sem_ir/inst_namer.cpp b/toolchain/sem_ir/inst_namer.cpp index c1d5fee30e3e..21f9748ebd20 100644 --- a/toolchain/sem_ir/inst_namer.cpp +++ b/toolchain/sem_ir/inst_namer.cpp @@ -433,11 +433,12 @@ auto InstNamer::CollectNamesInBlock(ScopeId scope_id, continue; } case CARBON_KIND(FunctionType inst): { - add_inst_name_id(sem_ir_.functions().Get(inst.function_id).name_id); + add_inst_name_id(sem_ir_.functions().Get(inst.function_id).name_id, + ".type"); continue; } case CARBON_KIND(GenericClassType inst): { - add_inst_name_id(sem_ir_.classes().Get(inst.class_id).name_id); + add_inst_name_id(sem_ir_.classes().Get(inst.class_id).name_id, ".type"); continue; } case CARBON_KIND(ImplDecl inst): { @@ -480,8 +481,17 @@ auto InstNamer::CollectNamesInBlock(ScopeId scope_id, CollectNamesInBlock(scope_id, inst.block_id); break; } - case StructValue::Kind: { - add_inst_name("struct"); + case CARBON_KIND(StructValue inst): { + if (auto fn_ty = sem_ir_.types().TryGetAs(inst.type_id)) { + add_inst_name_id(sem_ir_.functions().Get(fn_ty->function_id).name_id); + } else if (auto generic_class_ty = + sem_ir_.types().TryGetAs( + inst.type_id)) { + add_inst_name_id( + sem_ir_.classes().Get(generic_class_ty->class_id).name_id); + } else { + add_inst_name("struct"); + } continue; } case CARBON_KIND(TupleValue inst): {