Make SemIR::TypeType be an empty FacetType instruction (#7813)

The type `type` is now a `FacetType` inst with no constraints. This
brings the model implemented in the toolchain into better alignment with
the language design. The `SemIR::TypeType` struct remains as a scope for
holding the `TypeInstId`, `ConstantId`, and `TypeId` constants, but is
not an `InstKind` anymore.

The `TypeType` inst looks a lot like singletons, but there are many
`FacetType` insts so it doesn't quite fit that model. So we put it
alongside singletons with a fixed inst id but refer to it as a more
general "builtin" inst that is not a singleton.
`Namespace::PackageInstId` is similar, and we group it with `TypeType`
conceptually as another builtin instruction with a fixed id.

No conversion is needed anymore to use a `type` as a facet, since types
also have a `FacetType` type. This simplifies and removes a number of
helpers and branches throughout the code.

The `TypeType` inst is now part of the constant store, so we end up
printing it in the constants block in every test. But it's also named
`type` rather than `%type` to preserve the majority of existing
formatting behaviour, though this does look different from other
constants.

Assisted-by: Opus 5 was used to generate a first draft and validate the
refactoring. Though nearly everything non-trivial the tool wrote has
been modified or rewritten.
This commit is contained in:
Dana Jansens
2026-09-22 15:04:40 +00:00
committed by GitHub
parent 83ca5b71e3
commit fcae9610bd
795 changed files with 9505 additions and 8048 deletions
@@ -104,6 +104,7 @@ fn F() -> Cpp.AbstractFinal {
// CHECK:STDOUT: --- use_abstract_final.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %AbstractFinal: type = class_type @AbstractFinal [concrete]
// CHECK:STDOUT: %.dbd: Core.Form = init_form %AbstractFinal [concrete]
// CHECK:STDOUT: %pattern_type: type = pattern_type %AbstractFinal [concrete]
@@ -1621,6 +1621,7 @@ fn Call(var instance: Cpp.PublicPrivate) {
// CHECK:STDOUT: --- import_non_function_member_public.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %NonFunctionMemberPublic: type = class_type @NonFunctionMemberPublic [concrete]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
@@ -1670,6 +1671,7 @@ fn Call(var instance: Cpp.PublicPrivate) {
// CHECK:STDOUT: --- import_non_function_member_public_extend.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %Derived: type = class_type @Derived [concrete]
// CHECK:STDOUT: %NonFunctionMemberPublic: type = class_type @NonFunctionMemberPublic [concrete]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
@@ -1716,6 +1718,7 @@ fn Call(var instance: Cpp.PublicPrivate) {
// CHECK:STDOUT: --- import_non_function_member_protected_extend_call_in_member.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %Derived: type = class_type @Derived [concrete]
// CHECK:STDOUT: %NonFunctionMemberProtected: type = class_type @NonFunctionMemberProtected [concrete]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
@@ -1799,6 +1802,7 @@ fn Call(var instance: Cpp.PublicPrivate) {
// CHECK:STDOUT: --- import_function_member_public.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %FunctionMemberPublic: type = class_type @FunctionMemberPublic [concrete]
// CHECK:STDOUT: %ptr.9a9: type = ptr_type %FunctionMemberPublic [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
@@ -1845,6 +1849,7 @@ fn Call(var instance: Cpp.PublicPrivate) {
// CHECK:STDOUT: --- fail_todo_import_function_member_protected_extend_call_instance_in_member.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %Derived: type = class_type @Derived [concrete]
// CHECK:STDOUT: %FunctionMemberProtected.instance_fn.cpp_overload_set.type: type = cpp_overload_set_type @FunctionMemberProtected.instance_fn.cpp_overload_set [concrete]
// CHECK:STDOUT: %FunctionMemberProtected.instance_fn.cpp_overload_set.value: %FunctionMemberProtected.instance_fn.cpp_overload_set.type = cpp_overload_set_value @FunctionMemberProtected.instance_fn.cpp_overload_set [concrete]
@@ -1877,6 +1882,7 @@ fn Call(var instance: Cpp.PublicPrivate) {
// CHECK:STDOUT: --- import_function_member_protected_extend_call_static_in_member.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %Derived: type = class_type @Derived [concrete]
// CHECK:STDOUT: %FunctionMemberProtected: type = class_type @FunctionMemberProtected [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
@@ -1926,6 +1932,7 @@ fn Call(var instance: Cpp.PublicPrivate) {
// CHECK:STDOUT: --- import_overload_set_public.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %OverloadSet: type = class_type @OverloadSet [concrete]
// CHECK:STDOUT: %OverloadSet.OverloadSet.cpp_overload_set.type: type = cpp_overload_set_type @OverloadSet.OverloadSet.cpp_overload_set [concrete]
@@ -2025,6 +2032,7 @@ fn Call(var instance: Cpp.PublicPrivate) {
// CHECK:STDOUT: --- import_overload_set_protected_base.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %D: type = class_type @D [concrete]
// CHECK:STDOUT: %OverloadSet: type = class_type @OverloadSet [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
@@ -2225,6 +2233,7 @@ fn Call(var instance: Cpp.PublicPrivate) {
// CHECK:STDOUT: --- import_overload_set_public_base_class_call_public.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %OverloadPublic: type = class_type @OverloadPublic [concrete]
// CHECK:STDOUT: %OverloadPublic.Overload.cpp_overload_set.type: type = cpp_overload_set_type @OverloadPublic.Overload.cpp_overload_set [concrete]
@@ -2288,6 +2297,7 @@ fn Call(var instance: Cpp.PublicPrivate) {
// CHECK:STDOUT: --- import_overload_set_public_base_class_derived_call_non_private.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %Derived: type = class_type @Derived [concrete]
// CHECK:STDOUT: %OverloadPublic: type = class_type @OverloadPublic [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
@@ -2400,6 +2410,7 @@ fn Call(var instance: Cpp.PublicPrivate) {
// CHECK:STDOUT: --- import_overload_set_protected_base_class_derived_call_non_private.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %Derived: type = class_type @Derived [concrete]
// CHECK:STDOUT: %OverloadProtected: type = class_type @OverloadProtected [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
@@ -2512,6 +2523,7 @@ fn Call(var instance: Cpp.PublicPrivate) {
// CHECK:STDOUT: --- base_class_public_access_allowed.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %Derived: type = class_type @Derived [concrete]
// CHECK:STDOUT: %Public: type = class_type @Public [concrete]
// CHECK:STDOUT: %Base: type = class_type @Base [concrete]
@@ -2635,6 +2647,7 @@ fn Call(var instance: Cpp.PublicPrivate) {
// CHECK:STDOUT: --- fail_base_class_public_access_denied.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %Derived: type = class_type @Derived [concrete]
// CHECK:STDOUT: %Public: type = class_type @Public [concrete]
// CHECK:STDOUT: }
@@ -2663,6 +2676,7 @@ fn Call(var instance: Cpp.PublicPrivate) {
// CHECK:STDOUT: --- base_class_protected_access_allowed.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %Derived: type = class_type @Derived [concrete]
// CHECK:STDOUT: %Protected: type = class_type @Protected [concrete]
// CHECK:STDOUT: %Base: type = class_type @Base [concrete]
@@ -2762,6 +2776,7 @@ fn Call(var instance: Cpp.PublicPrivate) {
// CHECK:STDOUT: --- base_class_public_protected_access_allowed.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %Derived: type = class_type @Derived [concrete]
// CHECK:STDOUT: %PublicProtected: type = class_type @PublicProtected [concrete]
// CHECK:STDOUT: %Protected: type = class_type @Protected [concrete]
@@ -469,6 +469,7 @@ class V {
// CHECK:STDOUT: --- use_derived_to_base_conversion.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %Derived: type = class_type @Derived [concrete]
// CHECK:STDOUT: %ptr.976: type = ptr_type %Derived [concrete]
// CHECK:STDOUT: %pattern_type.d23: type = pattern_type %ptr.976 [concrete]
@@ -578,6 +579,7 @@ class V {
// CHECK:STDOUT: --- use_static_member.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %StaticBase: type = class_type @StaticBase [concrete]
// CHECK:STDOUT: %StaticBase.base_fn.cpp_overload_set.type: type = cpp_overload_set_type @StaticBase.base_fn.cpp_overload_set [concrete]
@@ -628,6 +630,7 @@ class V {
// CHECK:STDOUT: --- use_base_field.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %FieldDerived: type = class_type @FieldDerived [concrete]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
@@ -695,6 +698,7 @@ class V {
// CHECK:STDOUT: --- use_base_method.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %MethodDerived: type = class_type @MethodDerived [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %MethodBase: type = class_type @MethodBase [concrete]
@@ -255,6 +255,7 @@ fn GenericUse(p2: Generic(Cpp.Class1)) {
// CHECK:STDOUT: --- import_declaration.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %DeclBar: type = class_type @DeclBar [concrete]
// CHECK:STDOUT: %ptr: type = ptr_type %DeclBar [concrete]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [concrete]
@@ -292,6 +293,7 @@ fn GenericUse(p2: Generic(Cpp.Class1)) {
// CHECK:STDOUT: --- import_definition.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %DefBar: type = class_type @DefBar [concrete]
// CHECK:STDOUT: %ptr: type = ptr_type %DefBar [concrete]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [concrete]
@@ -329,6 +331,7 @@ fn GenericUse(p2: Generic(Cpp.Class1)) {
// CHECK:STDOUT: --- import_declaration_and_definition.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %DeclDefBar: type = class_type @DeclDefBar [concrete]
// CHECK:STDOUT: %ptr: type = ptr_type %DeclDefBar [concrete]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [concrete]
@@ -366,6 +369,7 @@ fn GenericUse(p2: Generic(Cpp.Class1)) {
// CHECK:STDOUT: --- import_static_member_function.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %StaticMemberFnBar: type = class_type @StaticMemberFnBar [concrete]
// CHECK:STDOUT: %StaticMemberFnBar.foo.cpp_overload_set.type: type = cpp_overload_set_type @StaticMemberFnBar.foo.cpp_overload_set [concrete]
@@ -396,6 +400,7 @@ fn GenericUse(p2: Generic(Cpp.Class1)) {
// CHECK:STDOUT: --- import_static_data_member.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %StaticDataMemberBar: type = class_type @StaticDataMemberBar [concrete]
// CHECK:STDOUT: %ptr.a89: type = ptr_type %StaticDataMemberBar [concrete]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.a89 [concrete]
@@ -436,6 +441,7 @@ fn GenericUse(p2: Generic(Cpp.Class1)) {
// CHECK:STDOUT: --- import_data_member.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %DataMemberBar: type = class_type @DataMemberBar [concrete]
// CHECK:STDOUT: %ptr.ec1: type = ptr_type %DataMemberBar [concrete]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.ec1 [concrete]
@@ -492,6 +498,7 @@ fn GenericUse(p2: Generic(Cpp.Class1)) {
// CHECK:STDOUT: --- call_dynamic.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %DynamicBar: type = class_type @DynamicBar [concrete]
// CHECK:STDOUT: %ptr.077: type = ptr_type %DynamicBar [concrete]
// CHECK:STDOUT: %pattern_type.e8d: type = pattern_type %ptr.077 [concrete]
@@ -554,6 +561,7 @@ fn GenericUse(p2: Generic(Cpp.Class1)) {
// CHECK:STDOUT: --- import_to_inherit_public.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %Derived: type = class_type @Derived [concrete]
// CHECK:STDOUT: %ToInheritBar: type = class_type @ToInheritBar [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
@@ -608,6 +616,7 @@ fn GenericUse(p2: Generic(Cpp.Class1)) {
// CHECK:STDOUT: --- import_template.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %TemplateBar.type: type = cpp_type_template_type TemplateBar [concrete]
// CHECK:STDOUT: %TemplateBar.template: %TemplateBar.type = struct_value () [concrete]
// CHECK:STDOUT: %X: type = class_type @X [concrete]
@@ -314,6 +314,7 @@ fn F() {
// CHECK:STDOUT: --- import_default.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %DefaultC: type = class_type @DefaultC [concrete]
// CHECK:STDOUT: %pattern_type.903: type = pattern_type %DefaultC [concrete]
@@ -368,6 +369,7 @@ fn F() {
// CHECK:STDOUT: --- implicit_default.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %DefaultC: type = class_type @DefaultC [concrete]
// CHECK:STDOUT: %pattern_type.903: type = pattern_type %DefaultC [concrete]
@@ -426,6 +428,7 @@ fn F() {
// CHECK:STDOUT: --- import_non_default.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %NonDefaultC: type = class_type @NonDefaultC [concrete]
// CHECK:STDOUT: %pattern_type.714: type = pattern_type %NonDefaultC [concrete]
@@ -519,6 +522,7 @@ fn F() {
// CHECK:STDOUT: --- import_multiple.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %MultipleC: type = class_type @MultipleC [concrete]
// CHECK:STDOUT: %pattern_type.56a: type = pattern_type %MultipleC [concrete]
@@ -639,6 +643,7 @@ fn F() {
// CHECK:STDOUT: --- import_default_arguments.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %DefaultArgsC: type = class_type @DefaultArgsC [concrete]
// CHECK:STDOUT: %pattern_type.52d: type = pattern_type %DefaultArgsC [concrete]
@@ -767,6 +772,7 @@ fn F() {
// CHECK:STDOUT: --- import_template.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %TemplateC: type = class_type @TemplateC [concrete]
// CHECK:STDOUT: %pattern_type.f20: type = pattern_type %TemplateC [concrete]
@@ -933,6 +939,7 @@ fn F() {
// CHECK:STDOUT: --- import_implicit_single_argument.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %SingleArgC: type = class_type @SingleArgC [concrete]
// CHECK:STDOUT: %pattern_type.bac: type = pattern_type %SingleArgC [concrete]
@@ -1055,6 +1062,7 @@ fn F() {
// CHECK:STDOUT: --- import_implicit_multi_arguments.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %MultiArgC: type = class_type @MultiArgC [concrete]
// CHECK:STDOUT: %pattern_type.b5c: type = pattern_type %MultiArgC [concrete]
@@ -65,6 +65,7 @@ auto DoThing() -> int {
// CHECK:STDOUT: --- dynamic_base_from_cpp.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %Base: type = class_type @Base [concrete]
// CHECK:STDOUT: %FurtherBase.further_base_func.type: type = fn_type @FurtherBase.further_base_func [concrete]
// CHECK:STDOUT: %FurtherBase.further_base_func: %FurtherBase.further_base_func.type = struct_value () [concrete]
@@ -200,6 +200,7 @@ fn Test(m: Cpp.UnsupportedMembers*) {
// CHECK:STDOUT: --- use_struct_fields.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %Struct: type = class_type @Struct [concrete]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
@@ -334,6 +335,7 @@ fn Test(m: Cpp.UnsupportedMembers*) {
// CHECK:STDOUT: --- use_union_fields.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %Union: type = class_type @Union [concrete]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
@@ -405,6 +407,7 @@ fn Test(m: Cpp.UnsupportedMembers*) {
// CHECK:STDOUT: --- use_non_bitfields_in_type_with_bitfields.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %BitfieldStruct: type = class_type @BitfieldStruct [concrete]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
@@ -460,6 +463,7 @@ fn Test(m: Cpp.UnsupportedMembers*) {
// CHECK:STDOUT: --- fail_todo_use_bitfields.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %BitfieldStruct: type = class_type @BitfieldStruct [concrete]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
@@ -269,6 +269,7 @@ fn Call(e: Cpp.ExplicitObjectParamOverloaded, n: i32, a: Cpp.AnotherOverloaded)
// CHECK:STDOUT: --- use_object_param_qualifiers.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %HasQualifiers: type = class_type @HasQualifiers [concrete]
// CHECK:STDOUT: %Make.type: type = fn_type @Make [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
@@ -496,6 +497,7 @@ fn Call(e: Cpp.ExplicitObjectParamOverloaded, n: i32, a: Cpp.AnotherOverloaded)
// CHECK:STDOUT: --- use_object_param_qualifiers_overloaded.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %NoRefQualifier: type = class_type @NoRefQualifier [concrete]
// CHECK:STDOUT: %ptr.f7d: type = ptr_type %NoRefQualifier [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
@@ -644,6 +646,7 @@ fn Call(e: Cpp.ExplicitObjectParamOverloaded, n: i32, a: Cpp.AnotherOverloaded)
// CHECK:STDOUT: --- call_explicit_object_param.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %ExplicitObjectParam: type = class_type @ExplicitObjectParam [concrete]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
@@ -721,6 +724,7 @@ fn Call(e: Cpp.ExplicitObjectParamOverloaded, n: i32, a: Cpp.AnotherOverloaded)
// CHECK:STDOUT: --- call_explicit_object_param_overloaded.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %ExplicitObjectParamOverloaded: type = class_type @ExplicitObjectParamOverloaded [concrete]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
@@ -31,6 +31,7 @@ fn MyF(bar: Cpp.Bar*);
// CHECK:STDOUT: --- import_declaration.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %Bar: type = class_type @Bar [concrete]
// CHECK:STDOUT: %ptr: type = ptr_type %Bar [concrete]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [concrete]
@@ -157,6 +157,7 @@ fn G() {
// CHECK:STDOUT: --- use_class_template.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %A.614: type = class_type @A.1 [concrete]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
@@ -242,6 +243,7 @@ fn G() {
// CHECK:STDOUT: --- fail_use_instantiation_error.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %X.816: type = class_type @X.1 [concrete]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
@@ -331,10 +333,10 @@ fn G() {
// CHECK:STDOUT: --- use_carbon_class_generic_in_cpp_template_param.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self]
// CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
// CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic]
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self]
// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete]
// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic]
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
// CHECK:STDOUT: %B.type: type = generic_class_type @B [concrete]
// CHECK:STDOUT: %B.generic: %B.type = struct_value () [concrete]
@@ -344,11 +346,11 @@ fn G() {
// CHECK:STDOUT: %.a92: type = template_inst %T [template]
// CHECK:STDOUT: %.32d: type = type_of_inst @B.%.loc12_17.4 [template]
// CHECK:STDOUT: %.8af: %.32d = splice_inst @B.%.loc12_17.4 [template]
// CHECK:STDOUT: %.897: type = splice_inst @B.%.loc12_17.7 [template]
// CHECK:STDOUT: %require_complete.5f2: <witness> = require_complete_type %.897 [template]
// CHECK:STDOUT: %B.elem.a93: type = unbound_element_type %B.60e, %.897 [template]
// CHECK:STDOUT: %struct_type.a.33e: type = struct_type {.a: %.897} [template]
// CHECK:STDOUT: %complete_type.6a6: <witness> = complete_type_witness %struct_type.a.33e [template]
// CHECK:STDOUT: %.d15: type = splice_inst @B.%.loc12_17.7 [template]
// CHECK:STDOUT: %require_complete.f74: <witness> = require_complete_type %.d15 [template]
// CHECK:STDOUT: %B.elem.d56: type = unbound_element_type %B.60e, %.d15 [template]
// CHECK:STDOUT: %struct_type.a.a60: type = struct_type {.a: %.d15} [template]
// CHECK:STDOUT: %complete_type.082: <witness> = complete_type_witness %struct_type.a.a60 [template]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
// CHECK:STDOUT: %B.bd8: type = class_type @B, @B(%i32) [concrete]
@@ -400,10 +402,10 @@ fn G() {
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: %B.decl: %B.type = class_decl @B [concrete = constants.%B.generic] {
// CHECK:STDOUT: %T.patt.loc11_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_10.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.patt.loc11_10.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_10.2 (constants.%T.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc11_12.1: type = splice_block %.loc11_12.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc11_12.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc11_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc11_10.1 (constants.%T)]
@@ -423,7 +425,7 @@ fn G() {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic class @B(%T.loc11_10.2: type) {
// CHECK:STDOUT: %T.patt.loc11_10.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_10.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.patt.loc11_10.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_10.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.loc11_10.1: type = symbolic_binding T, 0 [symbolic = %T.loc11_10.1 (constants.%T)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
@@ -432,24 +434,24 @@ fn G() {
// CHECK:STDOUT: %.loc12_17.5: type = type_of_inst %.loc12_17.4 [template = %.loc12_17.5 (constants.%.32d)]
// CHECK:STDOUT: %.loc12_17.6: @B.%.loc12_17.5 (%.32d) = splice_inst %.loc12_17.4 [template = %.loc12_17.6 (constants.%.8af)]
// CHECK:STDOUT: %.loc12_17.7: <instruction> = convert_to_value_action %.loc12_17.2, type [template]
// CHECK:STDOUT: %.loc12_17.8: type = splice_inst %.loc12_17.7 [template = %.loc12_17.8 (constants.%.897)]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %.loc12_17.8 [template = %require_complete (constants.%require_complete.5f2)]
// CHECK:STDOUT: %.loc12_17.8: type = splice_inst %.loc12_17.7 [template = %.loc12_17.8 (constants.%.d15)]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %.loc12_17.8 [template = %require_complete (constants.%require_complete.f74)]
// CHECK:STDOUT: %B: type = class_type @B, @B(%T.loc11_10.1) [symbolic = %B (constants.%B.60e)]
// CHECK:STDOUT: %B.elem: type = unbound_element_type %B, %.loc12_17.8 [template = %B.elem (constants.%B.elem.a93)]
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: @B.%.loc12_17.8 (%.897)} [template = %struct_type.a (constants.%struct_type.a.33e)]
// CHECK:STDOUT: %complete_type.loc13_1.2: <witness> = complete_type_witness %struct_type.a [template = %complete_type.loc13_1.2 (constants.%complete_type.6a6)]
// CHECK:STDOUT: %B.elem: type = unbound_element_type %B, %.loc12_17.8 [template = %B.elem (constants.%B.elem.d56)]
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: @B.%.loc12_17.8 (%.d15)} [template = %struct_type.a (constants.%struct_type.a.a60)]
// CHECK:STDOUT: %complete_type.loc13_1.2: <witness> = complete_type_witness %struct_type.a [template = %complete_type.loc13_1.2 (constants.%complete_type.082)]
// CHECK:STDOUT:
// CHECK:STDOUT: class {
// CHECK:STDOUT: %field_decl: @B.%B.elem (%B.elem.a93) = field_decl a, element0, %.loc12_17.3 in [concrete] {
// CHECK:STDOUT: %field_decl: @B.%B.elem (%B.elem.d56) = field_decl a, element0, %.loc12_17.3 in [concrete] {
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %A.ref: %A.type = name_ref A, imports.%A.template [concrete = constants.%A.template]
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_10.2 [symbolic = %T.loc11_10.1 (constants.%T)]
// CHECK:STDOUT: %.loc12_16.1: type = template_inst %T.ref [template = %.loc12_16.2 (constants.%.a92)]
// CHECK:STDOUT: %.loc12_17.1: type = type_of_inst %.loc12_17.4 [template = %.loc12_17.5 (constants.%.32d)]
// CHECK:STDOUT: %.loc12_17.2: @B.%.loc12_17.5 (%.32d) = splice_inst %.loc12_17.4 [template = %.loc12_17.6 (constants.%.8af)]
// CHECK:STDOUT: %.loc12_17.3: type = splice_inst %.loc12_17.7 [template = %.loc12_17.8 (constants.%.897)]
// CHECK:STDOUT: %.loc12_17.3: type = splice_inst %.loc12_17.7 [template = %.loc12_17.8 (constants.%.d15)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %complete_type.loc13_1.1: <witness> = complete_type_witness constants.%struct_type.a.33e [template = %complete_type.loc13_1.2 (constants.%complete_type.6a6)]
// CHECK:STDOUT: %complete_type.loc13_1.1: <witness> = complete_type_witness constants.%struct_type.a.a60 [template = %complete_type.loc13_1.2 (constants.%complete_type.082)]
// CHECK:STDOUT: complete_type_witness = %complete_type.loc13_1.1
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
@@ -503,10 +505,10 @@ fn G() {
// CHECK:STDOUT: --- let_cpp_template_constructor.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self]
// CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
// CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic]
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self]
// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete]
// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic]
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
@@ -516,17 +518,17 @@ fn G() {
// CHECK:STDOUT: %.a92: type = template_inst %T [template]
// CHECK:STDOUT: %.32dd98.1: type = type_of_inst @F.%.loc10_24.5 [template]
// CHECK:STDOUT: %.8af9c5.1: %.32dd98.1 = splice_inst @F.%.loc10_24.5 [template]
// CHECK:STDOUT: %.897: type = splice_inst @F.%.loc10_24.8 [template]
// CHECK:STDOUT: %require_complete.5f2: <witness> = require_complete_type %.897 [template]
// CHECK:STDOUT: %pattern_type.463: type = pattern_type %.897 [template]
// CHECK:STDOUT: %a.patt.d00: %pattern_type.463 = value_binding_pattern a [template]
// CHECK:STDOUT: %.d15: type = splice_inst @F.%.loc10_24.8 [template]
// CHECK:STDOUT: %require_complete.f74: <witness> = require_complete_type %.d15 [template]
// CHECK:STDOUT: %pattern_type.3c1: type = pattern_type %.d15 [template]
// CHECK:STDOUT: %a.patt.100: %pattern_type.3c1 = value_binding_pattern a [template]
// CHECK:STDOUT: %.32dd98.2: type = type_of_inst @F.%.loc10_35.3 [template]
// CHECK:STDOUT: %.8af9c5.2: %.32dd98.2 = splice_inst @F.%.loc10_35.3 [template]
// CHECK:STDOUT: %.e8f: type = type_of_inst @F.%.loc10_36.3 [template]
// CHECK:STDOUT: %.c84: %.e8f = splice_inst @F.%.loc10_36.3 [template]
// CHECK:STDOUT: %.08a: type = type_of_inst @F.%.loc10_39.4 [template]
// CHECK:STDOUT: %.47d: %.08a = splice_inst @F.%.loc10_39.4 [template]
// CHECK:STDOUT: %.bdb: %.897 = splice_inst @F.%.loc10_39.7 [template]
// CHECK:STDOUT: %.74a: %.d15 = splice_inst @F.%.loc10_39.7 [template]
// CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
// CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
@@ -587,10 +589,10 @@ fn G() {
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
// CHECK:STDOUT: %T.patt.loc9_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_15.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.patt.loc9_15.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_15.2 (constants.%T.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc9_17.1: type = splice_block %.loc9_17.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc9_17.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc9_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc9_15.1 (constants.%T)]
@@ -599,7 +601,7 @@ fn G() {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @F(%T.loc9_15.2: type) {
// CHECK:STDOUT: %T.patt.loc9_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_15.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.patt.loc9_15.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_15.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.loc9_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc9_15.1 (constants.%T)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
@@ -608,10 +610,10 @@ fn G() {
// CHECK:STDOUT: %.loc10_24.6: type = type_of_inst %.loc10_24.5 [template = %.loc10_24.6 (constants.%.32dd98.1)]
// CHECK:STDOUT: %.loc10_24.7: @F.%.loc10_24.6 (%.32dd98.1) = splice_inst %.loc10_24.5 [template = %.loc10_24.7 (constants.%.8af9c5.1)]
// CHECK:STDOUT: %.loc10_24.8: <instruction> = convert_to_value_action %.loc10_24.3, type [template]
// CHECK:STDOUT: %.loc10_24.9: type = splice_inst %.loc10_24.8 [template = %.loc10_24.9 (constants.%.897)]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %.loc10_24.9 [template = %require_complete (constants.%require_complete.5f2)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %.loc10_24.9 [template = %pattern_type (constants.%pattern_type.463)]
// CHECK:STDOUT: %a.patt.loc10_15.2: @F.%pattern_type (%pattern_type.463) = value_binding_pattern a [template = %a.patt.loc10_15.2 (constants.%a.patt.d00)]
// CHECK:STDOUT: %.loc10_24.9: type = splice_inst %.loc10_24.8 [template = %.loc10_24.9 (constants.%.d15)]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %.loc10_24.9 [template = %require_complete (constants.%require_complete.f74)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %.loc10_24.9 [template = %pattern_type (constants.%pattern_type.3c1)]
// CHECK:STDOUT: %a.patt.loc10_15.2: @F.%pattern_type (%pattern_type.3c1) = value_binding_pattern a [template = %a.patt.loc10_15.2 (constants.%a.patt.100)]
// CHECK:STDOUT: %.loc10_35.3: <instruction> = call_action (%A.ref.loc10_31, %.loc10_34), false [template]
// CHECK:STDOUT: %.loc10_35.4: type = type_of_inst %.loc10_35.3 [template = %.loc10_35.4 (constants.%.32dd98.2)]
// CHECK:STDOUT: %.loc10_35.5: @F.%.loc10_35.4 (%.32dd98.2) = splice_inst %.loc10_35.3 [template = %.loc10_35.5 (constants.%.8af9c5.2)]
@@ -622,7 +624,7 @@ fn G() {
// CHECK:STDOUT: %.loc10_39.5: type = type_of_inst %.loc10_39.4 [template = %.loc10_39.5 (constants.%.08a)]
// CHECK:STDOUT: %.loc10_39.6: @F.%.loc10_39.5 (%.08a) = splice_inst %.loc10_39.4 [template = %.loc10_39.6 (constants.%.47d)]
// CHECK:STDOUT: %.loc10_39.7: <instruction> = convert_to_value_action %.loc10_39.2, %.loc10_24.9 [template]
// CHECK:STDOUT: %.loc10_39.8: @F.%.loc10_24.9 (%.897) = splice_inst %.loc10_39.7 [template = %.loc10_39.8 (constants.%.bdb)]
// CHECK:STDOUT: %.loc10_39.8: @F.%.loc10_24.9 (%.d15) = splice_inst %.loc10_39.7 [template = %.loc10_39.8 (constants.%.74a)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() {
// CHECK:STDOUT: !entry:
@@ -636,19 +638,19 @@ fn G() {
// CHECK:STDOUT: %.loc10_36.2: @F.%.loc10_36.4 (%.e8f) = splice_inst %.loc10_36.3 [template = %.loc10_36.5 (constants.%.c84)]
// CHECK:STDOUT: %.loc10_39.1: type = type_of_inst %.loc10_39.4 [template = %.loc10_39.5 (constants.%.08a)]
// CHECK:STDOUT: %.loc10_39.2: @F.%.loc10_39.5 (%.08a) = splice_inst %.loc10_39.4 [template = %.loc10_39.6 (constants.%.47d)]
// CHECK:STDOUT: %.loc10_39.3: @F.%.loc10_24.9 (%.897) = splice_inst %.loc10_39.7 [template = %.loc10_39.8 (constants.%.bdb)]
// CHECK:STDOUT: %.loc10_24.1: type = splice_block %.loc10_24.4 [template = %.loc10_24.9 (constants.%.897)] {
// CHECK:STDOUT: %.loc10_39.3: @F.%.loc10_24.9 (%.d15) = splice_inst %.loc10_39.7 [template = %.loc10_39.8 (constants.%.74a)]
// CHECK:STDOUT: %.loc10_24.1: type = splice_block %.loc10_24.4 [template = %.loc10_24.9 (constants.%.d15)] {
// CHECK:STDOUT: %Cpp.ref.loc10_17: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %A.ref.loc10_20: %A.type = name_ref A, imports.%A.template [concrete = constants.%A.template]
// CHECK:STDOUT: %T.ref.loc10_23: type = name_ref T, %T.loc9_15.2 [symbolic = %T.loc9_15.1 (constants.%T)]
// CHECK:STDOUT: %.loc10_23.1: type = template_inst %T.ref.loc10_23 [template = %.loc10_23.2 (constants.%.a92)]
// CHECK:STDOUT: %.loc10_24.2: type = type_of_inst %.loc10_24.5 [template = %.loc10_24.6 (constants.%.32dd98.1)]
// CHECK:STDOUT: %.loc10_24.3: @F.%.loc10_24.6 (%.32dd98.1) = splice_inst %.loc10_24.5 [template = %.loc10_24.7 (constants.%.8af9c5.1)]
// CHECK:STDOUT: %.loc10_24.4: type = splice_inst %.loc10_24.8 [template = %.loc10_24.9 (constants.%.897)]
// CHECK:STDOUT: %.loc10_24.4: type = splice_inst %.loc10_24.8 [template = %.loc10_24.9 (constants.%.d15)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: @F.%.loc10_24.9 (%.897) = wrapper_binding a, %.loc10_39.3
// CHECK:STDOUT: %a: @F.%.loc10_24.9 (%.d15) = wrapper_binding a, %.loc10_39.3
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %a.patt.loc10_15.1: @F.%pattern_type (%pattern_type.463) = value_binding_pattern a [template = %a.patt.loc10_15.2 (constants.%a.patt.d00)]
// CHECK:STDOUT: %a.patt.loc10_15.1: @F.%pattern_type (%pattern_type.3c1) = value_binding_pattern a [template = %a.patt.loc10_15.2 (constants.%a.patt.100)]
// CHECK:STDOUT: }
// CHECK:STDOUT: return
// CHECK:STDOUT: }
@@ -698,10 +700,10 @@ fn G() {
// CHECK:STDOUT: --- var_cpp_template_constructor.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self]
// CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
// CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic]
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self]
// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete]
// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic]
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
@@ -711,11 +713,11 @@ fn G() {
// CHECK:STDOUT: %.a92: type = template_inst %T [template]
// CHECK:STDOUT: %.32dd98.1: type = type_of_inst @F.%.loc10_24.5 [template]
// CHECK:STDOUT: %.8af9c5.1: %.32dd98.1 = splice_inst @F.%.loc10_24.5 [template]
// CHECK:STDOUT: %.897: type = splice_inst @F.%.loc10_24.8 [template]
// CHECK:STDOUT: %require_complete.5f2: <witness> = require_complete_type %.897 [template]
// CHECK:STDOUT: %pattern_type.463: type = pattern_type %.897 [template]
// CHECK:STDOUT: %a.patt.577: %pattern_type.463 = ref_binding_pattern a [template]
// CHECK:STDOUT: %a.var_patt.c6d: %pattern_type.463 = var_pattern %a.patt.577 [template]
// CHECK:STDOUT: %.d15: type = splice_inst @F.%.loc10_24.8 [template]
// CHECK:STDOUT: %require_complete.f74: <witness> = require_complete_type %.d15 [template]
// CHECK:STDOUT: %pattern_type.3c1: type = pattern_type %.d15 [template]
// CHECK:STDOUT: %a.patt.b2a: %pattern_type.3c1 = ref_binding_pattern a [template]
// CHECK:STDOUT: %a.var_patt.66a: %pattern_type.3c1 = var_pattern %a.patt.b2a [template]
// CHECK:STDOUT: %.32dd98.2: type = type_of_inst @F.%.loc10_35.3 [template]
// CHECK:STDOUT: %.8af9c5.2: %.32dd98.2 = splice_inst @F.%.loc10_35.3 [template]
// CHECK:STDOUT: %.e8f: type = type_of_inst @F.%.loc10_36.3 [template]
@@ -724,25 +726,25 @@ fn G() {
// CHECK:STDOUT: %.47d: %.08a = splice_inst @F.%.loc10_39.3 [template]
// CHECK:STDOUT: %ImplicitAs.type.0ff: type = generic_interface_type @ImplicitAs [concrete]
// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.0ff = struct_value () [concrete]
// CHECK:STDOUT: %.d2cb4d.1: type = type_of_inst @F.%.loc10_3.15 [template]
// CHECK:STDOUT: %.20c9c2.1: %.d2cb4d.1 = splice_inst @F.%.loc10_3.15 [template]
// CHECK:STDOUT: %.aaff12.1: type = type_of_inst @F.%.loc10_3.18 [template]
// CHECK:STDOUT: %.c16b39.1: %.aaff12.1 = splice_inst @F.%.loc10_3.18 [template]
// CHECK:STDOUT: %.459: type = type_of_inst @F.%.loc10_3.21 [template]
// CHECK:STDOUT: %.5f8: %.459 = splice_inst @F.%.loc10_3.21 [template]
// CHECK:STDOUT: %.ec7: type = type_of_inst @F.%.loc10_3.24 [template]
// CHECK:STDOUT: %.fde: %.ec7 = splice_inst @F.%.loc10_3.24 [template]
// CHECK:STDOUT: %.589: %.897 = splice_inst @F.%.loc10_3.27 [template]
// CHECK:STDOUT: %.98306a.1: type = type_of_inst @F.%.loc10_3.15 [template]
// CHECK:STDOUT: %.21024f.1: %.98306a.1 = splice_inst @F.%.loc10_3.15 [template]
// CHECK:STDOUT: %.20fa30.1: type = type_of_inst @F.%.loc10_3.18 [template]
// CHECK:STDOUT: %.aae4fe.1: %.20fa30.1 = splice_inst @F.%.loc10_3.18 [template]
// CHECK:STDOUT: %.e2f: type = type_of_inst @F.%.loc10_3.21 [template]
// CHECK:STDOUT: %.8c6: %.e2f = splice_inst @F.%.loc10_3.21 [template]
// CHECK:STDOUT: %.4d4: type = type_of_inst @F.%.loc10_3.24 [template]
// CHECK:STDOUT: %.c8d: %.4d4 = splice_inst @F.%.loc10_3.24 [template]
// CHECK:STDOUT: %.972: %.d15 = splice_inst @F.%.loc10_3.27 [template]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %Self.0e7: %Destroy.type = symbolic_binding Self, 0 [symbolic]
// CHECK:STDOUT: %Destroy.WithSelf.Op.type.d3e: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Self.0e7) [symbolic]
// CHECK:STDOUT: %Destroy.WithSelf.Op.42b: %Destroy.WithSelf.Op.type.d3e = struct_value () [symbolic]
// CHECK:STDOUT: %Destroy.assoc_type: type = assoc_entity_type @Destroy [concrete]
// CHECK:STDOUT: %assoc0.ae8: %Destroy.assoc_type = assoc_entity element0, imports.%Core.import_ref.918 [concrete]
// CHECK:STDOUT: %.c1f: type = type_of_inst @F.%.loc10_3.29 [template]
// CHECK:STDOUT: %.7ec: %.c1f = splice_inst @F.%.loc10_3.29 [template]
// CHECK:STDOUT: %.2d0: type = type_of_inst @F.%.loc10_3.32 [template]
// CHECK:STDOUT: %.a5e: %.2d0 = splice_inst @F.%.loc10_3.32 [template]
// CHECK:STDOUT: %.e71: type = type_of_inst @F.%.loc10_3.29 [template]
// CHECK:STDOUT: %.1c0: %.e71 = splice_inst @F.%.loc10_3.29 [template]
// CHECK:STDOUT: %.920: type = type_of_inst @F.%.loc10_3.32 [template]
// CHECK:STDOUT: %.024: %.920 = splice_inst @F.%.loc10_3.32 [template]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
// CHECK:STDOUT: %A: type = class_type @A [concrete]
@@ -776,35 +778,35 @@ fn G() {
// CHECK:STDOUT: %.38d: init %A to %.3a8 = mark_in_place_init %A__carbon_thunk.call
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT: %.ca0: <instruction> = call_action (%ImplicitAs.generic, %.897), false [template]
// CHECK:STDOUT: %.d2cb4d.2: type = type_of_inst %.ca0 [template]
// CHECK:STDOUT: %.20c9c2.2: %.d2cb4d.2 = splice_inst %.ca0 [template]
// CHECK:STDOUT: %.da6: <instruction> = access_member_action %.20c9c2.2, Convert [template]
// CHECK:STDOUT: %.aaff12.2: type = type_of_inst %.da6 [template]
// CHECK:STDOUT: %.c16b39.2: %.aaff12.2 = splice_inst %.da6 [template]
// CHECK:STDOUT: %.ba2: <instruction> = compound_member_access_action %.78f, %.c16b39.2 [template]
// CHECK:STDOUT: %.d40: type = type_of_inst %.ba2 [template]
// CHECK:STDOUT: %.5da: %.d40 = splice_inst %.ba2 [template]
// CHECK:STDOUT: %.117: <instruction> = call_action (%.5da), true [template]
// CHECK:STDOUT: %.f91: type = type_of_inst %.117 [template]
// CHECK:STDOUT: %.519: %.f91 = splice_inst %.117 [template]
// CHECK:STDOUT: %.c79: <instruction> = convert_to_category_action %.519, element10 [template]
// CHECK:STDOUT: %.16a: %A = splice_inst %.c79 [template]
// CHECK:STDOUT: %.7ad: <instruction> = call_action (%ImplicitAs.generic, %.d15), false [template]
// CHECK:STDOUT: %.98306a.2: type = type_of_inst %.7ad [template]
// CHECK:STDOUT: %.21024f.2: %.98306a.2 = splice_inst %.7ad [template]
// CHECK:STDOUT: %.adc: <instruction> = access_member_action %.21024f.2, Convert [template]
// CHECK:STDOUT: %.20fa30.2: type = type_of_inst %.adc [template]
// CHECK:STDOUT: %.aae4fe.2: %.20fa30.2 = splice_inst %.adc [template]
// CHECK:STDOUT: %.311: <instruction> = compound_member_access_action %.78f, %.aae4fe.2 [template]
// CHECK:STDOUT: %.1be: type = type_of_inst %.311 [template]
// CHECK:STDOUT: %.3f6: %.1be = splice_inst %.311 [template]
// CHECK:STDOUT: %.787: <instruction> = call_action (%.3f6), true [template]
// CHECK:STDOUT: %.67b: type = type_of_inst %.787 [template]
// CHECK:STDOUT: %.c3f: %.67b = splice_inst %.787 [template]
// CHECK:STDOUT: %.9d9: <instruction> = convert_to_category_action %.c3f, element10 [template]
// CHECK:STDOUT: %.1a1: %A = splice_inst %.9d9 [template]
// CHECK:STDOUT: %A.cpp_destructor.type: type = fn_type @A.cpp_destructor [concrete]
// CHECK:STDOUT: %A.cpp_destructor: %A.cpp_destructor.type = struct_value () [concrete]
// CHECK:STDOUT: %custom_witness.294: <witness> = custom_witness (%A.cpp_destructor), @Destroy [concrete]
// CHECK:STDOUT: %Destroy.facet.bf5: %Destroy.type = facet_value %A, (%custom_witness.294) [concrete]
// CHECK:STDOUT: %Destroy.WithSelf.Op.type.d24: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet.bf5) [concrete]
// CHECK:STDOUT: %.429: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.d24, %Destroy.facet.bf5 [concrete]
// CHECK:STDOUT: %inst.splice_block.f70: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.62f: <bound method> = splice_block %bound_method {
// CHECK:STDOUT: %.07f: ref %A = specific_inst @F.%a.var, @F(%i32)
// CHECK:STDOUT: %inst.splice_block.1c7: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.d1c: <bound method> = splice_block %bound_method {
// CHECK:STDOUT: %.30e: ref %A = specific_inst @F.%a.var, @F(%i32)
// CHECK:STDOUT: %impl.elem0: %.429 = impl_witness_access %custom_witness.294, element0 [concrete = %A.cpp_destructor]
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.07f, %impl.elem0
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.30e, %impl.elem0
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT: %inst.call: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %A.cpp_destructor.call: init %empty_tuple.type = call %.62f(%.07f)
// CHECK:STDOUT: %A.cpp_destructor.call: init %empty_tuple.type = call %.d1c(%.30e)
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -826,10 +828,10 @@ fn G() {
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
// CHECK:STDOUT: %T.patt.loc9_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_15.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.patt.loc9_15.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_15.2 (constants.%T.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc9_17.1: type = splice_block %.loc9_17.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc9_17.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc9_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc9_15.1 (constants.%T)]
@@ -837,7 +839,7 @@ fn G() {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @F(%T.loc9_15.2: type) {
// CHECK:STDOUT: %T.patt.loc9_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_15.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.patt.loc9_15.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_15.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.loc9_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc9_15.1 (constants.%T)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
@@ -846,11 +848,11 @@ fn G() {
// CHECK:STDOUT: %.loc10_24.6: type = type_of_inst %.loc10_24.5 [template = %.loc10_24.6 (constants.%.32dd98.1)]
// CHECK:STDOUT: %.loc10_24.7: @F.%.loc10_24.6 (%.32dd98.1) = splice_inst %.loc10_24.5 [template = %.loc10_24.7 (constants.%.8af9c5.1)]
// CHECK:STDOUT: %.loc10_24.8: <instruction> = convert_to_value_action %.loc10_24.3, type [template]
// CHECK:STDOUT: %.loc10_24.9: type = splice_inst %.loc10_24.8 [template = %.loc10_24.9 (constants.%.897)]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %.loc10_24.9 [template = %require_complete (constants.%require_complete.5f2)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %.loc10_24.9 [template = %pattern_type (constants.%pattern_type.463)]
// CHECK:STDOUT: %a.patt.loc10_15.2: @F.%pattern_type (%pattern_type.463) = ref_binding_pattern a [template = %a.patt.loc10_15.2 (constants.%a.patt.577)]
// CHECK:STDOUT: %a.var_patt.loc10_3.2: @F.%pattern_type (%pattern_type.463) = var_pattern %a.patt.loc10_15.2 [template = %a.var_patt.loc10_3.2 (constants.%a.var_patt.c6d)]
// CHECK:STDOUT: %.loc10_24.9: type = splice_inst %.loc10_24.8 [template = %.loc10_24.9 (constants.%.d15)]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %.loc10_24.9 [template = %require_complete (constants.%require_complete.f74)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %.loc10_24.9 [template = %pattern_type (constants.%pattern_type.3c1)]
// CHECK:STDOUT: %a.patt.loc10_15.2: @F.%pattern_type (%pattern_type.3c1) = ref_binding_pattern a [template = %a.patt.loc10_15.2 (constants.%a.patt.b2a)]
// CHECK:STDOUT: %a.var_patt.loc10_3.2: @F.%pattern_type (%pattern_type.3c1) = var_pattern %a.patt.loc10_15.2 [template = %a.var_patt.loc10_3.2 (constants.%a.var_patt.66a)]
// CHECK:STDOUT: %.loc10_35.3: <instruction> = call_action (%A.ref.loc10_31, %.loc10_34), false [template]
// CHECK:STDOUT: %.loc10_35.4: type = type_of_inst %.loc10_35.3 [template = %.loc10_35.4 (constants.%.32dd98.2)]
// CHECK:STDOUT: %.loc10_35.5: @F.%.loc10_35.4 (%.32dd98.2) = splice_inst %.loc10_35.3 [template = %.loc10_35.5 (constants.%.8af9c5.2)]
@@ -860,30 +862,30 @@ fn G() {
// CHECK:STDOUT: %.loc10_39.3: <instruction> = call_action (%.loc10_36.2), false [template]
// CHECK:STDOUT: %.loc10_39.4: type = type_of_inst %.loc10_39.3 [template = %.loc10_39.4 (constants.%.08a)]
// CHECK:STDOUT: %.loc10_39.5: @F.%.loc10_39.4 (%.08a) = splice_inst %.loc10_39.3 [template = %.loc10_39.5 (constants.%.47d)]
// CHECK:STDOUT: %.loc10_3.15: <instruction> = call_action (constants.%ImplicitAs.generic, constants.%.897), false [template]
// CHECK:STDOUT: %.loc10_3.16: type = type_of_inst %.loc10_3.15 [template = %.loc10_3.16 (constants.%.d2cb4d.1)]
// CHECK:STDOUT: %.loc10_3.17: @F.%.loc10_3.16 (%.d2cb4d.1) = splice_inst %.loc10_3.15 [template = %.loc10_3.17 (constants.%.20c9c2.1)]
// CHECK:STDOUT: %.loc10_3.15: <instruction> = call_action (constants.%ImplicitAs.generic, constants.%.d15), false [template]
// CHECK:STDOUT: %.loc10_3.16: type = type_of_inst %.loc10_3.15 [template = %.loc10_3.16 (constants.%.98306a.1)]
// CHECK:STDOUT: %.loc10_3.17: @F.%.loc10_3.16 (%.98306a.1) = splice_inst %.loc10_3.15 [template = %.loc10_3.17 (constants.%.21024f.1)]
// CHECK:STDOUT: %.loc10_3.18: <instruction> = access_member_action %.loc10_3.2, Convert [template]
// CHECK:STDOUT: %.loc10_3.19: type = type_of_inst %.loc10_3.18 [template = %.loc10_3.19 (constants.%.aaff12.1)]
// CHECK:STDOUT: %.loc10_3.20: @F.%.loc10_3.19 (%.aaff12.1) = splice_inst %.loc10_3.18 [template = %.loc10_3.20 (constants.%.c16b39.1)]
// CHECK:STDOUT: %.loc10_3.19: type = type_of_inst %.loc10_3.18 [template = %.loc10_3.19 (constants.%.20fa30.1)]
// CHECK:STDOUT: %.loc10_3.20: @F.%.loc10_3.19 (%.20fa30.1) = splice_inst %.loc10_3.18 [template = %.loc10_3.20 (constants.%.aae4fe.1)]
// CHECK:STDOUT: %.loc10_3.21: <instruction> = compound_member_access_action %.loc10_39.2, %.loc10_3.4 [template]
// CHECK:STDOUT: %.loc10_3.22: type = type_of_inst %.loc10_3.21 [template = %.loc10_3.22 (constants.%.459)]
// CHECK:STDOUT: %.loc10_3.23: @F.%.loc10_3.22 (%.459) = splice_inst %.loc10_3.21 [template = %.loc10_3.23 (constants.%.5f8)]
// CHECK:STDOUT: %.loc10_3.22: type = type_of_inst %.loc10_3.21 [template = %.loc10_3.22 (constants.%.e2f)]
// CHECK:STDOUT: %.loc10_3.23: @F.%.loc10_3.22 (%.e2f) = splice_inst %.loc10_3.21 [template = %.loc10_3.23 (constants.%.8c6)]
// CHECK:STDOUT: %.loc10_3.24: <instruction> = call_action (%.loc10_3.6), true [template]
// CHECK:STDOUT: %.loc10_3.25: type = type_of_inst %.loc10_3.24 [template = %.loc10_3.25 (constants.%.ec7)]
// CHECK:STDOUT: %.loc10_3.26: @F.%.loc10_3.25 (%.ec7) = splice_inst %.loc10_3.24 [template = %.loc10_3.26 (constants.%.fde)]
// CHECK:STDOUT: %.loc10_3.25: type = type_of_inst %.loc10_3.24 [template = %.loc10_3.25 (constants.%.4d4)]
// CHECK:STDOUT: %.loc10_3.26: @F.%.loc10_3.25 (%.4d4) = splice_inst %.loc10_3.24 [template = %.loc10_3.26 (constants.%.c8d)]
// CHECK:STDOUT: %.loc10_3.27: <instruction> = convert_to_category_action %.loc10_3.9, element10 [template]
// CHECK:STDOUT: %.loc10_3.28: @F.%.loc10_24.9 (%.897) = splice_inst %.loc10_3.27 [template = %.loc10_3.28 (constants.%.589)]
// CHECK:STDOUT: %.loc10_3.28: @F.%.loc10_24.9 (%.d15) = splice_inst %.loc10_3.27 [template = %.loc10_3.28 (constants.%.972)]
// CHECK:STDOUT: %.loc10_3.29: <instruction> = compound_member_access_action %a.var, constants.%assoc0.ae8 [template]
// CHECK:STDOUT: %.loc10_3.30: type = type_of_inst %.loc10_3.29 [template = %.loc10_3.30 (constants.%.c1f)]
// CHECK:STDOUT: %.loc10_3.31: @F.%.loc10_3.30 (%.c1f) = splice_inst %.loc10_3.29 [template = %.loc10_3.31 (constants.%.7ec)]
// CHECK:STDOUT: %.loc10_3.30: type = type_of_inst %.loc10_3.29 [template = %.loc10_3.30 (constants.%.e71)]
// CHECK:STDOUT: %.loc10_3.31: @F.%.loc10_3.30 (%.e71) = splice_inst %.loc10_3.29 [template = %.loc10_3.31 (constants.%.1c0)]
// CHECK:STDOUT: %.loc10_3.32: <instruction> = call_action (%.loc10_3.12), true [template]
// CHECK:STDOUT: %.loc10_3.33: type = type_of_inst %.loc10_3.32 [template = %.loc10_3.33 (constants.%.2d0)]
// CHECK:STDOUT: %.loc10_3.34: @F.%.loc10_3.33 (%.2d0) = splice_inst %.loc10_3.32 [template = %.loc10_3.34 (constants.%.a5e)]
// CHECK:STDOUT: %.loc10_3.33: type = type_of_inst %.loc10_3.32 [template = %.loc10_3.33 (constants.%.920)]
// CHECK:STDOUT: %.loc10_3.34: @F.%.loc10_3.33 (%.920) = splice_inst %.loc10_3.32 [template = %.loc10_3.34 (constants.%.024)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %a.var: ref @F.%.loc10_24.9 (%.897) = var_storage %a.var_patt.loc10_3.1
// CHECK:STDOUT: %a.var: ref @F.%.loc10_24.9 (%.d15) = var_storage %a.var_patt.loc10_3.1
// CHECK:STDOUT: %Cpp.ref.loc10_28: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %A.ref.loc10_31: %A.type = name_ref A, imports.%A.template [concrete = constants.%A.template]
// CHECK:STDOUT: %T.ref.loc10_34: type = name_ref T, %T.loc9_15.2 [symbolic = %T.loc9_15.1 (constants.%T)]
@@ -894,35 +896,35 @@ fn G() {
// CHECK:STDOUT: %.loc10_36.2: @F.%.loc10_36.4 (%.e8f) = splice_inst %.loc10_36.3 [template = %.loc10_36.5 (constants.%.c84)]
// CHECK:STDOUT: %.loc10_39.1: type = type_of_inst %.loc10_39.3 [template = %.loc10_39.4 (constants.%.08a)]
// CHECK:STDOUT: %.loc10_39.2: @F.%.loc10_39.4 (%.08a) = splice_inst %.loc10_39.3 [template = %.loc10_39.5 (constants.%.47d)]
// CHECK:STDOUT: %.loc10_3.1: type = type_of_inst %.loc10_3.15 [template = %.loc10_3.16 (constants.%.d2cb4d.1)]
// CHECK:STDOUT: %.loc10_3.2: @F.%.loc10_3.16 (%.d2cb4d.1) = splice_inst %.loc10_3.15 [template = %.loc10_3.17 (constants.%.20c9c2.1)]
// CHECK:STDOUT: %.loc10_3.3: type = type_of_inst %.loc10_3.18 [template = %.loc10_3.19 (constants.%.aaff12.1)]
// CHECK:STDOUT: %.loc10_3.4: @F.%.loc10_3.19 (%.aaff12.1) = splice_inst %.loc10_3.18 [template = %.loc10_3.20 (constants.%.c16b39.1)]
// CHECK:STDOUT: %.loc10_3.5: type = type_of_inst %.loc10_3.21 [template = %.loc10_3.22 (constants.%.459)]
// CHECK:STDOUT: %.loc10_3.6: @F.%.loc10_3.22 (%.459) = splice_inst %.loc10_3.21 [template = %.loc10_3.23 (constants.%.5f8)]
// CHECK:STDOUT: %.loc10_3.7: type = type_of_inst %.loc10_3.24 [template = %.loc10_3.25 (constants.%.ec7)]
// CHECK:STDOUT: %.loc10_3.8: @F.%.loc10_3.25 (%.ec7) = splice_inst %.loc10_3.24 [template = %.loc10_3.26 (constants.%.fde)]
// CHECK:STDOUT: %.loc10_3.9: @F.%.loc10_24.9 (%.897) = converted %.loc10_39.2, %.loc10_3.8 [template = %.loc10_3.26 (constants.%.fde)]
// CHECK:STDOUT: %.loc10_3.10: @F.%.loc10_24.9 (%.897) = splice_inst %.loc10_3.27 [template = %.loc10_3.28 (constants.%.589)]
// CHECK:STDOUT: %.loc10_3.1: type = type_of_inst %.loc10_3.15 [template = %.loc10_3.16 (constants.%.98306a.1)]
// CHECK:STDOUT: %.loc10_3.2: @F.%.loc10_3.16 (%.98306a.1) = splice_inst %.loc10_3.15 [template = %.loc10_3.17 (constants.%.21024f.1)]
// CHECK:STDOUT: %.loc10_3.3: type = type_of_inst %.loc10_3.18 [template = %.loc10_3.19 (constants.%.20fa30.1)]
// CHECK:STDOUT: %.loc10_3.4: @F.%.loc10_3.19 (%.20fa30.1) = splice_inst %.loc10_3.18 [template = %.loc10_3.20 (constants.%.aae4fe.1)]
// CHECK:STDOUT: %.loc10_3.5: type = type_of_inst %.loc10_3.21 [template = %.loc10_3.22 (constants.%.e2f)]
// CHECK:STDOUT: %.loc10_3.6: @F.%.loc10_3.22 (%.e2f) = splice_inst %.loc10_3.21 [template = %.loc10_3.23 (constants.%.8c6)]
// CHECK:STDOUT: %.loc10_3.7: type = type_of_inst %.loc10_3.24 [template = %.loc10_3.25 (constants.%.4d4)]
// CHECK:STDOUT: %.loc10_3.8: @F.%.loc10_3.25 (%.4d4) = splice_inst %.loc10_3.24 [template = %.loc10_3.26 (constants.%.c8d)]
// CHECK:STDOUT: %.loc10_3.9: @F.%.loc10_24.9 (%.d15) = converted %.loc10_39.2, %.loc10_3.8 [template = %.loc10_3.26 (constants.%.c8d)]
// CHECK:STDOUT: %.loc10_3.10: @F.%.loc10_24.9 (%.d15) = splice_inst %.loc10_3.27 [template = %.loc10_3.28 (constants.%.972)]
// CHECK:STDOUT: assign %a.var, %.loc10_3.10
// CHECK:STDOUT: %.loc10_24.1: type = splice_block %.loc10_24.4 [template = %.loc10_24.9 (constants.%.897)] {
// CHECK:STDOUT: %.loc10_24.1: type = splice_block %.loc10_24.4 [template = %.loc10_24.9 (constants.%.d15)] {
// CHECK:STDOUT: %Cpp.ref.loc10_17: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %A.ref.loc10_20: %A.type = name_ref A, imports.%A.template [concrete = constants.%A.template]
// CHECK:STDOUT: %T.ref.loc10_23: type = name_ref T, %T.loc9_15.2 [symbolic = %T.loc9_15.1 (constants.%T)]
// CHECK:STDOUT: %.loc10_23.1: type = template_inst %T.ref.loc10_23 [template = %.loc10_23.2 (constants.%.a92)]
// CHECK:STDOUT: %.loc10_24.2: type = type_of_inst %.loc10_24.5 [template = %.loc10_24.6 (constants.%.32dd98.1)]
// CHECK:STDOUT: %.loc10_24.3: @F.%.loc10_24.6 (%.32dd98.1) = splice_inst %.loc10_24.5 [template = %.loc10_24.7 (constants.%.8af9c5.1)]
// CHECK:STDOUT: %.loc10_24.4: type = splice_inst %.loc10_24.8 [template = %.loc10_24.9 (constants.%.897)]
// CHECK:STDOUT: %.loc10_24.4: type = splice_inst %.loc10_24.8 [template = %.loc10_24.9 (constants.%.d15)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: ref @F.%.loc10_24.9 (%.897) = wrapper_binding a, %a.var
// CHECK:STDOUT: %a: ref @F.%.loc10_24.9 (%.d15) = wrapper_binding a, %a.var
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %a.patt.loc10_15.1: @F.%pattern_type (%pattern_type.463) = ref_binding_pattern a [template = %a.patt.loc10_15.2 (constants.%a.patt.577)]
// CHECK:STDOUT: %a.var_patt.loc10_3.1: @F.%pattern_type (%pattern_type.463) = var_pattern %a.patt.loc10_15.1 [template = %a.var_patt.loc10_3.2 (constants.%a.var_patt.c6d)]
// CHECK:STDOUT: %a.patt.loc10_15.1: @F.%pattern_type (%pattern_type.3c1) = ref_binding_pattern a [template = %a.patt.loc10_15.2 (constants.%a.patt.b2a)]
// CHECK:STDOUT: %a.var_patt.loc10_3.1: @F.%pattern_type (%pattern_type.3c1) = var_pattern %a.patt.loc10_15.1 [template = %a.var_patt.loc10_3.2 (constants.%a.var_patt.66a)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc10_3.11: type = type_of_inst %.loc10_3.29 [template = %.loc10_3.30 (constants.%.c1f)]
// CHECK:STDOUT: %.loc10_3.12: @F.%.loc10_3.30 (%.c1f) = splice_inst %.loc10_3.29 [template = %.loc10_3.31 (constants.%.7ec)]
// CHECK:STDOUT: %.loc10_3.13: type = type_of_inst %.loc10_3.32 [template = %.loc10_3.33 (constants.%.2d0)]
// CHECK:STDOUT: %.loc10_3.14: @F.%.loc10_3.33 (%.2d0) = splice_inst %.loc10_3.32 [template = %.loc10_3.34 (constants.%.a5e)]
// CHECK:STDOUT: %.loc10_3.11: type = type_of_inst %.loc10_3.29 [template = %.loc10_3.30 (constants.%.e71)]
// CHECK:STDOUT: %.loc10_3.12: @F.%.loc10_3.30 (%.e71) = splice_inst %.loc10_3.29 [template = %.loc10_3.31 (constants.%.1c0)]
// CHECK:STDOUT: %.loc10_3.13: type = type_of_inst %.loc10_3.32 [template = %.loc10_3.33 (constants.%.920)]
// CHECK:STDOUT: %.loc10_3.14: @F.%.loc10_3.33 (%.920) = splice_inst %.loc10_3.32 [template = %.loc10_3.34 (constants.%.024)]
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -956,21 +958,21 @@ fn G() {
// CHECK:STDOUT: %.loc10_39.3 => constants.%inst.splice_block.76c
// CHECK:STDOUT: %.loc10_39.4 => constants.%A
// CHECK:STDOUT: %.loc10_39.5 => invalid
// CHECK:STDOUT: %.loc10_3.15 => constants.%.ca0
// CHECK:STDOUT: %.loc10_3.16 => constants.%.d2cb4d.2
// CHECK:STDOUT: %.loc10_3.17 => constants.%.20c9c2.2
// CHECK:STDOUT: %.loc10_3.18 => constants.%.da6
// CHECK:STDOUT: %.loc10_3.19 => constants.%.aaff12.2
// CHECK:STDOUT: %.loc10_3.20 => constants.%.c16b39.2
// CHECK:STDOUT: %.loc10_3.21 => constants.%.ba2
// CHECK:STDOUT: %.loc10_3.22 => constants.%.d40
// CHECK:STDOUT: %.loc10_3.23 => constants.%.5da
// CHECK:STDOUT: %.loc10_3.24 => constants.%.117
// CHECK:STDOUT: %.loc10_3.25 => constants.%.f91
// CHECK:STDOUT: %.loc10_3.26 => constants.%.519
// CHECK:STDOUT: %.loc10_3.27 => constants.%.c79
// CHECK:STDOUT: %.loc10_3.28 => constants.%.16a
// CHECK:STDOUT: %.loc10_3.29 => constants.%inst.splice_block.f70
// CHECK:STDOUT: %.loc10_3.15 => constants.%.7ad
// CHECK:STDOUT: %.loc10_3.16 => constants.%.98306a.2
// CHECK:STDOUT: %.loc10_3.17 => constants.%.21024f.2
// CHECK:STDOUT: %.loc10_3.18 => constants.%.adc
// CHECK:STDOUT: %.loc10_3.19 => constants.%.20fa30.2
// CHECK:STDOUT: %.loc10_3.20 => constants.%.aae4fe.2
// CHECK:STDOUT: %.loc10_3.21 => constants.%.311
// CHECK:STDOUT: %.loc10_3.22 => constants.%.1be
// CHECK:STDOUT: %.loc10_3.23 => constants.%.3f6
// CHECK:STDOUT: %.loc10_3.24 => constants.%.787
// CHECK:STDOUT: %.loc10_3.25 => constants.%.67b
// CHECK:STDOUT: %.loc10_3.26 => constants.%.c3f
// CHECK:STDOUT: %.loc10_3.27 => constants.%.9d9
// CHECK:STDOUT: %.loc10_3.28 => constants.%.1a1
// CHECK:STDOUT: %.loc10_3.29 => constants.%inst.splice_block.1c7
// CHECK:STDOUT: %.loc10_3.30 => <bound method>
// CHECK:STDOUT: %.loc10_3.31 => invalid
// CHECK:STDOUT: %.loc10_3.32 => constants.%inst.call
@@ -176,6 +176,7 @@ fn MyF(bar: Cpp.TemplateBar(Cpp.X)*);
// CHECK:STDOUT: --- import_declaration.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %DeclBar: type = class_type @DeclBar [concrete]
// CHECK:STDOUT: %ptr: type = ptr_type %DeclBar [concrete]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [concrete]
@@ -213,6 +214,7 @@ fn MyF(bar: Cpp.TemplateBar(Cpp.X)*);
// CHECK:STDOUT: --- import_definition.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %DefBar: type = class_type @DefBar [concrete]
// CHECK:STDOUT: %ptr: type = ptr_type %DefBar [concrete]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [concrete]
@@ -250,6 +252,7 @@ fn MyF(bar: Cpp.TemplateBar(Cpp.X)*);
// CHECK:STDOUT: --- import_declaration_and_definition.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %DeclDefBar: type = class_type @DeclDefBar [concrete]
// CHECK:STDOUT: %ptr: type = ptr_type %DeclDefBar [concrete]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [concrete]
@@ -287,6 +290,7 @@ fn MyF(bar: Cpp.TemplateBar(Cpp.X)*);
// CHECK:STDOUT: --- import_static_member_function.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %StaticMemberFnBar: type = class_type @StaticMemberFnBar [concrete]
// CHECK:STDOUT: %StaticMemberFnBar.foo.cpp_overload_set.type: type = cpp_overload_set_type @StaticMemberFnBar.foo.cpp_overload_set [concrete]
@@ -317,6 +321,7 @@ fn MyF(bar: Cpp.TemplateBar(Cpp.X)*);
// CHECK:STDOUT: --- import_static_data_member.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %StaticDataMemberBar: type = class_type @StaticDataMemberBar [concrete]
// CHECK:STDOUT: %ptr.a89: type = ptr_type %StaticDataMemberBar [concrete]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.a89 [concrete]
@@ -357,6 +362,7 @@ fn MyF(bar: Cpp.TemplateBar(Cpp.X)*);
// CHECK:STDOUT: --- import_data_member.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %DataMemberBar: type = class_type @DataMemberBar [concrete]
// CHECK:STDOUT: %ptr.ec1: type = ptr_type %DataMemberBar [concrete]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.ec1 [concrete]
@@ -413,6 +419,7 @@ fn MyF(bar: Cpp.TemplateBar(Cpp.X)*);
// CHECK:STDOUT: --- import_template.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %TemplateBar.type: type = cpp_type_template_type TemplateBar [concrete]
// CHECK:STDOUT: %TemplateBar.template: %TemplateBar.type = struct_value () [concrete]
// CHECK:STDOUT: %X: type = class_type @X [concrete]